LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
llvm::LLVMTargetMachine Class Reference

#include <TargetMachine.h>

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

Public Member Functions

virtual void addAnalysisPasses (PassManagerBase &PM)
 Register analysis passes for this target with a pass manager. More...
 
virtual TargetPassConfigcreatePassConfig (PassManagerBase &PM)
 
virtual bool addPassesToEmitFile (PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify=true, AnalysisID StartAfter=0, AnalysisID StopAfter=0)
 
virtual bool addPassesToEmitMachineCode (PassManagerBase &PM, JITCodeEmitter &MCE, bool DisableVerify=true)
 
virtual bool addPassesToEmitMC (PassManagerBase &PM, MCContext *&Ctx, raw_ostream &OS, bool DisableVerify=true)
 
virtual bool addCodeEmitter (PassManagerBase &, JITCodeEmitter &)
 
- Public Member Functions inherited from llvm::TargetMachine
virtual ~TargetMachine ()
 
const TargetgetTarget () const
 
const StringRef getTargetTriple () const
 
const StringRef getTargetCPU () const
 
const StringRef getTargetFeatureString () const
 
virtual const TargetSubtargetInfogetSubtargetImpl () const
 
void resetTargetOptions (const MachineFunction *MF) const
 Reset the target options based on the function's attributes. More...
 
virtual const TargetInstrInfogetInstrInfo () const
 
virtual const TargetFrameLoweringgetFrameLowering () const
 
virtual const TargetLoweringgetTargetLowering () const
 
virtual const
TargetSelectionDAGInfo
getSelectionDAGInfo () const
 
virtual const DataLayoutgetDataLayout () const
 
const MCAsmInfogetMCAsmInfo () const
 
template<typename STC >
const STC & getSubtarget () const
 
virtual const TargetRegisterInfogetRegisterInfo () const
 
virtual const TargetIntrinsicInfogetIntrinsicInfo () const
 
virtual TargetJITInfogetJITInfo ()
 
virtual const InstrItineraryDatagetInstrItineraryData () const
 
bool hasMCRelaxAll () const
 
void setMCRelaxAll (bool Value)
 
bool hasMCSaveTempLabels () const
 
void setMCSaveTempLabels (bool Value)
 
bool hasMCNoExecStack () const
 hasMCNoExecStack - Check whether an executable stack is not needed. More...
 
void setMCNoExecStack (bool Value)
 setMCNoExecStack - Set whether an executabel stack is not needed. More...
 
bool hasMCUseLoc () const
 hasMCUseLoc - Check whether we should use dwarf's .loc directive. More...
 
void setMCUseLoc (bool Value)
 setMCUseLoc - Set whether all we should use dwarf's .loc directive. More...
 
bool hasMCUseCFI () const
 hasMCUseCFI - Check whether we should use dwarf's .cfi_* directives. More...
 
void setMCUseCFI (bool Value)
 setMCUseCFI - Set whether all we should use dwarf's .cfi_* directives. More...
 
bool hasMCUseDwarfDirectory () const
 
void setMCUseDwarfDirectory (bool Value)
 
Reloc::Model getRelocationModel () const
 
CodeModel::Model getCodeModel () const
 
TLSModel::Model getTLSModel (const GlobalValue *GV) const
 
CodeGenOpt::Level getOptLevel () const
 
void setOptLevel (CodeGenOpt::Level Level) const
 Overrides the optimization level. More...
 
void setFastISel (bool Enable)
 
bool shouldPrintMachineCode () const
 

Protected Member Functions

 LLVMTargetMachine (const Target &T, StringRef TargetTriple, StringRef CPU, StringRef FS, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
 
void initAsmInfo ()
 
- Protected Member Functions inherited from llvm::TargetMachine
 TargetMachine (const Target &T, StringRef TargetTriple, StringRef CPU, StringRef FS, const TargetOptions &Options)
 

Additional Inherited Members

- Public Types inherited from llvm::TargetMachine
enum  CodeGenFileType { CGFT_AssemblyFile, CGFT_ObjectFile, CGFT_Null }
 
- Static Public Member Functions inherited from llvm::TargetMachine
static bool getAsmVerbosityDefault ()
 
static void setAsmVerbosityDefault (bool)
 
static bool getDataSections ()
 
static bool getFunctionSections ()
 
static void setDataSections (bool)
 setDataSections - Set if the data are emit into separate sections. More...
 
static void setFunctionSections (bool)
 
- Public Attributes inherited from llvm::TargetMachine
TargetOptions Options
 
- Protected Attributes inherited from llvm::TargetMachine
const TargetTheTarget
 TheTarget - The Target that this machine was created for. More...
 
std::string TargetTriple
 
std::string TargetCPU
 
std::string TargetFS
 
MCCodeGenInfoCodeGenInfo
 
const MCAsmInfoAsmInfo
 
unsigned MCRelaxAll: 1
 
unsigned MCNoExecStack: 1
 
unsigned MCSaveTempLabels: 1
 
unsigned MCUseLoc: 1
 
unsigned MCUseCFI: 1
 
unsigned MCUseDwarfDirectory: 1
 

Detailed Description

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

Definition at line 300 of file Target/TargetMachine.h.

Constructor & Destructor Documentation

LLVMTargetMachine::LLVMTargetMachine ( const Target T,
StringRef  TargetTriple,
StringRef  CPU,
StringRef  FS,
TargetOptions  Options,
Reloc::Model  RM,
CodeModel::Model  CM,
CodeGenOpt::Level  OL 
)
protected

Member Function Documentation

void LLVMTargetMachine::addAnalysisPasses ( PassManagerBase &  PM)
virtual

Register analysis passes for this target with a pass manager.

This registers target independent analysis passes.

Reimplemented from llvm::TargetMachine.

Reimplemented in llvm::PPCTargetMachine, llvm::X86TargetMachine, llvm::AMDGPUTargetMachine, llvm::XCoreTargetMachine, llvm::MipsTargetMachine, and llvm::ARMBaseTargetMachine.

Definition at line 85 of file LLVMTargetMachine.cpp.

References llvm::createBasicTargetTransformInfoPass().

Referenced by llvm::MipsTargetMachine::addAnalysisPasses().

virtual bool llvm::LLVMTargetMachine::addCodeEmitter ( PassManagerBase &  ,
JITCodeEmitter  
)
inlinevirtual

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.

Reimplemented in llvm::MipsTargetMachine, llvm::X86TargetMachine, llvm::PPCTargetMachine, llvm::SparcTargetMachine, and llvm::ARMBaseTargetMachine.

Definition at line 351 of file Target/TargetMachine.h.

Referenced by addPassesToEmitMachineCode().

bool LLVMTargetMachine::addPassesToEmitFile ( PassManagerBase &  PM,
formatted_raw_ostream Out,
CodeGenFileType  FileType,
bool  DisableVerify = true,
AnalysisID  StartAfter = 0,
AnalysisID  StopAfter = 0 
)
virtual
bool LLVMTargetMachine::addPassesToEmitMachineCode ( PassManagerBase &  PM,
JITCodeEmitter JCE,
bool  DisableVerify = true 
)
virtual

addPassesToEmitMachineCode - Add passes to the specified pass manager to get machine code emitted. This uses a JITCodeEmitter 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 JITCodeEmitter object to handle actually outputting the machine code and resolving things like the address of functions. This method should return true if machine code emission is not supported.

Reimplemented from llvm::TargetMachine.

Reimplemented in llvm::NVPTXTargetMachine.

Definition at line 237 of file LLVMTargetMachine.cpp.

References addCodeEmitter(), and addPassesToGenerateCode().

bool LLVMTargetMachine::addPassesToEmitMC ( PassManagerBase &  PM,
MCContext *&  Ctx,
raw_ostream Out,
bool  DisableVerify = true 
)
virtual
TargetPassConfig * LLVMTargetMachine::createPassConfig ( PassManagerBase &  PM)
virtual

createPassConfig - Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of CodeGen passes.

createPassConfig - Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of CodeGen passes.

Targets may override this to extend TargetPassConfig.

Reimplemented in llvm::MipsTargetMachine, llvm::NVPTXTargetMachine, llvm::HexagonTargetMachine, llvm::X86TargetMachine, llvm::SystemZTargetMachine, llvm::PPCTargetMachine, llvm::AArch64TargetMachine, llvm::MSP430TargetMachine, llvm::AMDGPUTargetMachine, llvm::SparcTargetMachine, llvm::ARMBaseTargetMachine, and llvm::XCoreTargetMachine.

Definition at line 257 of file Passes.cpp.

Referenced by addPassesToGenerateCode().

void LLVMTargetMachine::initAsmInfo ( )
protected

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