LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::LLVMTargetMachine Class Reference

#include <TargetMachine.h>

Inheritance diagram for llvm::LLVMTargetMachine:

Inheritance graph
[legend]
Collaboration diagram for llvm::LLVMTargetMachine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual FileModel::Model addPassesToEmitFile (PassManagerBase &PM, raw_ostream &Out, CodeGenFileType FileType, bool Fast)
virtual bool addPassesToEmitFileFinish (PassManagerBase &PM, MachineCodeEmitter *MCE, bool Fast)
virtual bool addPassesToEmitMachineCode (PassManagerBase &PM, MachineCodeEmitter &MCE, bool Fast)
virtual bool addInstSelector (PassManagerBase &, bool)
 Target-Independent Code Generator Pass Configuration Options.
virtual bool addPreRegAlloc (PassManagerBase &, bool)
virtual bool addPostRegAlloc (PassManagerBase &, bool)
virtual bool addPreEmitPass (PassManagerBase &, bool)
virtual bool addAssemblyEmitter (PassManagerBase &, bool, raw_ostream &)
virtual bool addCodeEmitter (PassManagerBase &, bool, bool, MachineCodeEmitter &)
virtual bool addSimpleCodeEmitter (PassManagerBase &, bool, bool, MachineCodeEmitter &)
virtual bool getEnableTailMergeDefault () const

Protected Member Functions

 LLVMTargetMachine ()

Detailed Description

LLVMTargetMachine - This class describes a target machine that is implemented with the LLVM target-independent code generator.

Definition at line 240 of file TargetMachine.h.


Constructor & Destructor Documentation

llvm::LLVMTargetMachine::LLVMTargetMachine  )  [inline, protected]
 

Definition at line 242 of file TargetMachine.h.


Member Function Documentation

virtual bool llvm::LLVMTargetMachine::addAssemblyEmitter PassManagerBase ,
bool  ,
raw_ostream
[inline, virtual]
 

addAssemblyEmitter - This pass should be overridden by the target to add the asmprinter, if asm emission is supported. If this is not supported, 'true' should be returned.

Reimplemented in llvm::AlphaTargetMachine, llvm::ARMTargetMachine, llvm::SPUTargetMachine, llvm::IA64TargetMachine, llvm::MipsTargetMachine, llvm::PIC16TargetMachine, llvm::PPCTargetMachine, llvm::SparcTargetMachine, and llvm::X86TargetMachine.

Definition at line 312 of file TargetMachine.h.

Referenced by addPassesToEmitFile().

virtual bool llvm::LLVMTargetMachine::addCodeEmitter PassManagerBase ,
bool  ,
bool  ,
MachineCodeEmitter
[inline, virtual]
 

addCodeEmitter - This pass should be overridden by the target to add a code emitter, if supported. If this is not supported, 'true' should be returned. If DumpAsm is true, the generated assembly is printed to cerr.

Reimplemented in llvm::AlphaTargetMachine, llvm::ARMTargetMachine, llvm::PPCTargetMachine, and llvm::X86TargetMachine.

Definition at line 320 of file TargetMachine.h.

Referenced by addPassesToEmitMachineCode().

virtual bool llvm::LLVMTargetMachine::addInstSelector PassManagerBase ,
bool 
[inline, virtual]
 

Target-Independent Code Generator Pass Configuration Options.

addInstSelector - This method should add any "last minute" LLVM->LLVM passes, then install an instruction selector pass, which converts from LLVM code to machine instructions.

Reimplemented in llvm::AlphaTargetMachine, llvm::ARMTargetMachine, llvm::SPUTargetMachine, llvm::IA64TargetMachine, llvm::MipsTargetMachine, llvm::PIC16TargetMachine, llvm::PPCTargetMachine, llvm::SparcTargetMachine, and llvm::X86TargetMachine.

Definition at line 282 of file TargetMachine.h.

Referenced by addPassesToEmitFile(), and addPassesToEmitMachineCode().

FileModel::Model LLVMTargetMachine::addPassesToEmitFile PassManagerBase PM,
raw_ostream Out,
CodeGenFileType  FileType,
bool  Fast
[virtual]
 

addPassesToEmitFile - Add passes to the specified pass manager to get the specified file emitted. Typically this will involve several steps of code generation. If Fast is set to true, the code generator should emit code as fast as possible, though the generated code may be less efficient. This method should return FileModel::Error if emission of this file type is not supported.

The default implementation of this method adds components from the LLVM retargetable code generator, invoking the methods below to get target-specific passes in standard locations.

Reimplemented from llvm::TargetMachine.

Definition at line 53 of file LLVMTargetMachine.cpp.

References llvm::PassManagerBase::add(), addAssemblyEmitter(), addInstSelector(), addPostRegAlloc(), addPreEmitPass(), addPreRegAlloc(), llvm::createBranchFoldingPass(), llvm::createCodeGenPreparePass(), llvm::createDebugLabelFoldingPass(), llvm::createGCInfoPrinter(), llvm::createGCLoweringPass(), llvm::createGCMachineCodeAnalysisPass(), llvm::createLoopAlignerPass(), llvm::createLoopStrengthReducePass(), llvm::createLowerInvokePass(), llvm::createLowerSubregsPass(), llvm::createMachineFunctionPrinterPass(), llvm::createMachineLICMPass(), llvm::createMachineSinkingPass(), llvm::createPostRAScheduler(), llvm::createPrologEpilogCodeInserter(), llvm::createRegisterAllocator(), llvm::createStackSlotColoringPass(), llvm::createUnreachableBlockEliminationPass(), llvm::TargetAsmInfo::doesSupportExceptionHandling(), llvm::TargetMachine::getELFWriterInfo(), getEnableTailMergeDefault(), llvm::TargetMachine::getMachOWriterInfo(), llvm::TargetMachine::getTargetAsmInfo(), and llvm::TargetMachine::getTargetLowering().

bool LLVMTargetMachine::addPassesToEmitFileFinish PassManagerBase PM,
MachineCodeEmitter MCE,
bool  Fast
[virtual]
 

addPassesToEmitFileFinish - If the passes to emit the specified file had to be split up (e.g., to add an object writer pass), this method can be used to finish up adding passes to emit the file, if necessary.

Reimplemented from llvm::TargetMachine.

Definition at line 171 of file LLVMTargetMachine.cpp.

References llvm::PassManagerBase::add(), addSimpleCodeEmitter(), llvm::createGCInfoDeleter(), llvm::createMachineCodeDeleter(), and PrintEmittedAsm.

bool LLVMTargetMachine::addPassesToEmitMachineCode PassManagerBase PM,
MachineCodeEmitter MCE,
bool  Fast
[virtual]
 

addPassesToEmitMachineCode - Add passes to the specified pass manager to get machine code emitted. This uses a MachineCodeEmitter object to handle actually outputting the machine code and resolving things like the address of functions. This method returns true if machine code emission is not supported.

Reimplemented from llvm::TargetMachine.

Definition at line 191 of file LLVMTargetMachine.cpp.

References llvm::PassManagerBase::add(), addCodeEmitter(), addInstSelector(), addPostRegAlloc(), addPreEmitPass(), addPreRegAlloc(), llvm::createBranchFoldingPass(), llvm::createCodeGenPreparePass(), llvm::createGCInfoDeleter(), llvm::createGCInfoPrinter(), llvm::createGCLoweringPass(), llvm::createGCMachineCodeAnalysisPass(), llvm::createLoopStrengthReducePass(), llvm::createLowerInvokePass(), llvm::createLowerSubregsPass(), llvm::createMachineCodeDeleter(), llvm::createMachineFunctionPrinterPass(), llvm::createMachineLICMPass(), llvm::createMachineSinkingPass(), llvm::createPostRAScheduler(), llvm::createPrologEpilogCodeInserter(), llvm::createRegisterAllocator(), llvm::createStackSlotColoringPass(), llvm::createUnreachableBlockEliminationPass(), llvm::TargetAsmInfo::doesSupportExceptionHandling(), getEnableTailMergeDefault(), llvm::TargetMachine::getTargetAsmInfo(), llvm::TargetMachine::getTargetLowering(), and PrintEmittedAsm.

virtual bool llvm::LLVMTargetMachine::addPostRegAlloc PassManagerBase ,
bool 
[inline, virtual]
 

addPostRegAllocPasses - This method may be implemented by targets that want to run passes after register allocation but before prolog-epilog insertion. This should return true if -print-machineinstrs should print after these passes.

Reimplemented in llvm::X86TargetMachine.

Definition at line 297 of file TargetMachine.h.

Referenced by addPassesToEmitFile(), and addPassesToEmitMachineCode().

virtual bool llvm::LLVMTargetMachine::addPreEmitPass PassManagerBase ,
bool 
[inline, virtual]
 

addPreEmitPass - This pass may be implemented by targets that want to run passes immediately before machine code is emitted. This should return true if -print-machineinstrs should print out the code after the passes.

Reimplemented in llvm::AlphaTargetMachine, llvm::ARMTargetMachine, llvm::IA64TargetMachine, llvm::MipsTargetMachine, llvm::PIC16TargetMachine, llvm::PPCTargetMachine, and llvm::SparcTargetMachine.

Definition at line 304 of file TargetMachine.h.

Referenced by addPassesToEmitFile(), and addPassesToEmitMachineCode().

virtual bool llvm::LLVMTargetMachine::addPreRegAlloc PassManagerBase ,
bool 
[inline, virtual]
 

addPreRegAllocPasses - This method may be implemented by targets that want to run passes immediately before register allocation. This should return true if -print-machineinstrs should print after these passes.

Reimplemented in llvm::X86TargetMachine.

Definition at line 289 of file TargetMachine.h.

Referenced by addPassesToEmitFile(), and addPassesToEmitMachineCode().

virtual bool llvm::LLVMTargetMachine::addSimpleCodeEmitter PassManagerBase ,
bool  ,
bool  ,
MachineCodeEmitter
[inline, virtual]
 

addSimpleCodeEmitter - This pass should be overridden by the target to add a code emitter (without setting flags), if supported. If this is not supported, 'true' should be returned. If DumpAsm is true, the generated assembly is printed to cerr.

Reimplemented in llvm::AlphaTargetMachine, llvm::ARMTargetMachine, llvm::PPCTargetMachine, and llvm::X86TargetMachine.

Definition at line 329 of file TargetMachine.h.

Referenced by addPassesToEmitFileFinish().

virtual bool llvm::LLVMTargetMachine::getEnableTailMergeDefault  )  const [inline, virtual]
 

getEnableTailMergeDefault - the default setting for -enable-tail-merge on this target. User flag overrides.

Reimplemented from llvm::TargetMachine.

Reimplemented in llvm::PPCTargetMachine.

Definition at line 336 of file TargetMachine.h.

Referenced by addPassesToEmitFile(), and addPassesToEmitMachineCode().


The documentation for this class was generated from the following files:


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.