LLVM API Documentation
#include <TargetMachine.h>
Definition at line 239 of file TargetMachine.h.
| llvm::LLVMTargetMachine::LLVMTargetMachine | ( | ) | [inline, protected] |
Definition at line 241 of file TargetMachine.h.
| bool LLVMTargetMachine::addCommonCodeGenPasses | ( | PassManagerBase & | PM, | |
| bool | Fast | |||
| ) | [protected] |
addCommonCodeGenPasses - Add standard LLVM codegen passes used for both emitting to assembly files or machine code output.
addCommonCodeGenPasses - Add standard LLVM codegen passes used for both emitting to assembly files or machine code output.
Definition at line 147 of file LLVMTargetMachine.cpp.
References llvm::PassManagerBase::add(), addInstSelector(), addPostRegAlloc(), addPreRegAlloc(), llvm::cl::BOU_FALSE, llvm::cl::BOU_TRUE, llvm::cerr(), llvm::createBranchFoldingPass(), llvm::createCodeGenPreparePass(), llvm::createGCInfoPrinter(), llvm::createGCLoweringPass(), llvm::createGCMachineCodeAnalysisPass(), llvm::createLoopStrengthReducePass(), llvm::createLowerInvokePass(), llvm::createLowerSubregsPass(), llvm::createMachineFunctionPrinterPass(), llvm::createMachineLICMPass(), llvm::createMachineSinkingPass(), llvm::createPostRAScheduler(), llvm::createPrintFunctionPass(), llvm::createPrologEpilogCodeInserter(), llvm::createRegisterAllocator(), llvm::createStackProtectorPass(), llvm::createStackSlotColoringPass(), llvm::createUnreachableBlockEliminationPass(), DisablePostRAScheduler, llvm::EnableFastISel, EnableFastISelOption, EnableLICM, EnableSinking, llvm::errs(), getEnableTailMergeDefault(), llvm::TargetMachine::getTargetAsmInfo(), llvm::TargetMachine::getTargetLowering(), PrintGCInfo, PrintISelInput, PrintLSR, and llvm::PrintMachineCode.
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 64 of file LLVMTargetMachine.cpp.
References llvm::PassManagerBase::add(), addAssemblyEmitter(), addCommonCodeGenPasses(), addPreEmitPass(), llvm::FileModel::AsmFile, llvm::TargetMachine::AssemblyFile, llvm::cerr(), llvm::createDebugLabelFoldingPass(), llvm::createLoopAlignerPass(), llvm::createMachineFunctionPrinterPass(), llvm::FileModel::ElfFile, llvm::FileModel::Error, llvm::TargetMachine::getELFWriterInfo(), llvm::TargetMachine::getMachOWriterInfo(), llvm::FileModel::MachOFile, llvm::TargetMachine::ObjectFile, and llvm::PrintMachineCode.
| 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.
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 104 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.
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 should returns true if machine code emission is not supported.
Reimplemented from llvm::TargetMachine.
Definition at line 124 of file LLVMTargetMachine.cpp.
References llvm::PassManagerBase::add(), addCodeEmitter(), addCommonCodeGenPasses(), addPreEmitPass(), llvm::cerr(), llvm::createGCInfoDeleter(), llvm::createMachineCodeDeleter(), llvm::createMachineFunctionPrinterPass(), PrintEmittedAsm, and llvm::PrintMachineCode.
| 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, llvm::X86TargetMachine, and llvm::XCoreTargetMachine.
Definition at line 287 of file TargetMachine.h.
Referenced by addCommonCodeGenPasses().
| 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 294 of file TargetMachine.h.
Referenced by addCommonCodeGenPasses().
| 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 302 of file TargetMachine.h.
Referenced by addCommonCodeGenPasses().
| 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::PPCTargetMachine, and llvm::SparcTargetMachine.
Definition at line 309 of file TargetMachine.h.
Referenced by addPassesToEmitFile(), and addPassesToEmitMachineCode().
| 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, llvm::X86TargetMachine, and llvm::XCoreTargetMachine.
Definition at line 317 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 325 of file TargetMachine.h.
Referenced by 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 334 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 341 of file TargetMachine.h.
Referenced by addCommonCodeGenPasses().