LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
llvm::TargetMachine Class Reference

#include <TargetMachine.h>

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

List of all members.

Public Types

enum  CodeGenFileType { CGFT_AssemblyFile, CGFT_ObjectFile, CGFT_Null }

Public Member Functions

virtual ~TargetMachine ()
const TargetgetTarget () const
const StringRef getTargetTriple () const
const StringRef getTargetCPU () const
const StringRef getTargetFeatureString () const
virtual const TargetInstrInfogetInstrInfo () const
virtual const TargetFrameLoweringgetFrameLowering () const
virtual const TargetLoweringgetTargetLowering () const
virtual const
TargetSelectionDAGInfo
getSelectionDAGInfo () const
virtual const TargetDatagetTargetData () 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
virtual const TargetELFWriterInfogetELFWriterInfo () 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.
void setMCNoExecStack (bool Value)
 setMCNoExecStack - Set whether an executabel stack is not needed.
bool hasMCUseLoc () const
 hasMCUseLoc - Check whether we should use dwarf's .loc directive.
void setMCUseLoc (bool Value)
 setMCUseLoc - Set whether all we should use dwarf's .loc directive.
bool hasMCUseCFI () const
 hasMCUseCFI - Check whether we should use dwarf's .cfi_* directives.
void setMCUseCFI (bool Value)
 setMCUseCFI - Set whether all we should use dwarf's .cfi_* directives.
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 setFastISel (bool Enable)
bool shouldPrintMachineCode () const
virtual bool addPassesToEmitFile (PassManagerBase &, formatted_raw_ostream &, CodeGenFileType, bool=true)
virtual bool addPassesToEmitMachineCode (PassManagerBase &, JITCodeEmitter &, bool=true)
virtual bool addPassesToEmitMC (PassManagerBase &, MCContext *&, raw_ostream &, bool=true)

Static Public Member Functions

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.
static void setFunctionSections (bool)

Public Attributes

TargetOptions Options

Protected Member Functions

 TargetMachine (const Target &T, StringRef TargetTriple, StringRef CPU, StringRef FS, const TargetOptions &Options)
virtual const TargetSubtargetInfogetSubtargetImpl () const

Protected Attributes

const TargetTheTarget
 TheTarget - The Target that this machine was created for.
std::string TargetTriple
std::string TargetCPU
std::string TargetFS
const MCCodeGenInfoCodeGenInfo
 CodeGenInfo - Low level target information such as relocation model.
const MCAsmInfoAsmInfo
unsigned MCRelaxAll: 1
unsigned MCNoExecStack: 1
unsigned MCSaveTempLabels: 1
unsigned MCUseLoc: 1
unsigned MCUseCFI: 1
unsigned MCUseDwarfDirectory: 1

Detailed Description

TargetMachine - Primary interface to the complete machine description for the target machine. All target-specific information should be accessible through this interface.

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


Member Enumeration Documentation

CodeGenFileType - These enums are meant to be passed into addPassesToEmitFile to indicate what type of file to emit, and returned by it to indicate what type of file could actually be made.

Enumerator:
CGFT_AssemblyFile 
CGFT_ObjectFile 
CGFT_Null 

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


Constructor & Destructor Documentation

TargetMachine::TargetMachine ( const Target T,
StringRef  TargetTriple,
StringRef  CPU,
StringRef  FS,
const TargetOptions Options 
) [protected]

Definition at line 43 of file TargetMachine.cpp.

TargetMachine::~TargetMachine ( ) [virtual]

Definition at line 57 of file TargetMachine.cpp.

References AsmInfo, and CodeGenInfo.


Member Function Documentation

virtual bool llvm::TargetMachine::addPassesToEmitFile ( PassManagerBase ,
formatted_raw_ostream ,
CodeGenFileType  ,
bool  = true 
) [inline, virtual]

addPassesToEmitFile - Add passes to the specified pass manager to get the specified file emitted. Typically this will involve several steps of code generation. This method should return true if emission of this file type is not supported, or false on success.

Reimplemented in llvm::LLVMTargetMachine, and llvm::CPPTargetMachine.

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

Referenced by LLVMTargetMachineEmitToFile().

virtual bool llvm::TargetMachine::addPassesToEmitMachineCode ( PassManagerBase ,
JITCodeEmitter ,
bool  = true 
) [inline, 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.

Reimplemented in llvm::LLVMTargetMachine, llvm::NVPTXTargetMachine, and llvm::PTXTargetMachine.

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

Referenced by llvm::JIT::addModule(), and llvm::JIT::removeModule().

virtual bool llvm::TargetMachine::addPassesToEmitMC ( PassManagerBase ,
MCContext *&  ,
raw_ostream ,
bool  = true 
) [inline, virtual]

addPassesToEmitMC - Add passes to the specified pass manager to get machine code emitted with the MCJIT. This method returns true if machine code is not supported. It fills the MCContext Ctx pointer which can be used to build custom MCStreamer.

Reimplemented in llvm::LLVMTargetMachine, llvm::NVPTXTargetMachine, and llvm::PTXTargetMachine.

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

bool TargetMachine::getAsmVerbosityDefault ( ) [static]

getAsmVerbosityDefault - Returns the default value of asm verbosity.

Definition at line 107 of file TargetMachine.cpp.

References llvm::AsmVerbosityDefault().

Referenced by getVerboseAsm().

CodeModel::Model TargetMachine::getCodeModel ( ) const
bool TargetMachine::getDataSections ( ) [static]

getDataSections - Return true if data objects should be emitted into their own section, corresponds to -fdata-sections.

Definition at line 119 of file TargetMachine.cpp.

References DataSections.

Referenced by llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().

virtual const TargetELFWriterInfo* llvm::TargetMachine::getELFWriterInfo ( ) const [inline, virtual]

getELFWriterInfo - If this target supports an ELF writer, return information for it, otherwise return null.

Reimplemented in llvm::ThumbTargetMachine, llvm::ARMTargetMachine, llvm::MBlazeTargetMachine, and llvm::X86TargetMachine.

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

virtual const TargetFrameLowering* llvm::TargetMachine::getFrameLowering ( ) const [inline, virtual]

Reimplemented in llvm::ThumbTargetMachine, llvm::ARMTargetMachine, llvm::HexagonTargetMachine, llvm::NVPTXTargetMachine, llvm::MBlazeTargetMachine, llvm::SPUTargetMachine, llvm::MipsTargetMachine, llvm::X86TargetMachine, llvm::PPCTargetMachine, llvm::MSP430TargetMachine, llvm::PTXTargetMachine, llvm::SparcTargetMachine, and llvm::XCoreTargetMachine.

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

Referenced by llvm::ARMBaseRegisterInfo::canRealignStack(), checkNumAlignedDPRCS2Regs(), llvm::CompileUnit::constructVariableDIE(), determineFrameLayout(), llvm::MSP430RegisterInfo::eliminateCallFramePseudoInstr(), llvm::Thumb1RegisterInfo::eliminateCallFramePseudoInstr(), llvm::MBlazeRegisterInfo::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateCallFramePseudoInstr(), llvm::X86RegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::JITDwarfEmitter::EmitDwarfTable(), estimateStackSize(), llvm::MSP430RegisterInfo::getCalleeSavedRegs(), llvm::MSP430RegisterInfo::getFrameRegister(), llvm::MBlazeRegisterInfo::getFrameRegister(), llvm::XCoreRegisterInfo::getFrameRegister(), llvm::MipsRegisterInfo::getFrameRegister(), llvm::PPCRegisterInfo::getFrameRegister(), llvm::HexagonRegisterInfo::getFrameRegister(), llvm::X86RegisterInfo::getFrameRegister(), llvm::ARMBaseRegisterInfo::getFrameRegister(), llvm::ARMBaseRegisterInfo::getRawAllocationOrder(), llvm::PPCRegisterInfo::getRegPressureLimit(), llvm::X86RegisterInfo::getRegPressureLimit(), llvm::ARMBaseRegisterInfo::getRegPressureLimit(), llvm::MSP430RegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::XCoreRegisterInfo::getReservedRegs(), llvm::ARMBaseRegisterInfo::getReservedRegs(), llvm::X86RegisterInfo::getReservedRegs(), llvm::ARMBaseRegisterInfo::hasBasePointer(), llvm::X86RegisterInfo::hasReservedSpillSlot(), llvm::ARMBaseRegisterInfo::isReservedReg(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::MachineFunction::MachineFunction(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsStackRealignment(), llvm::MachineFrameInfo::print(), llvm::X86FrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::MSP430RegisterInfo::processFunctionBeforeFrameFinalized(), and llvm::XCoreRegisterInfo::requiresRegisterScavenging().

bool TargetMachine::getFunctionSections ( ) [static]

getFunctionSections - Return true if functions should be emitted into their own section, corresponding to -ffunction-sections.

Definition at line 115 of file TargetMachine.cpp.

References FunctionSections.

Referenced by llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().

virtual const TargetInstrInfo* llvm::TargetMachine::getInstrInfo ( ) const [inline, virtual]

Reimplemented in llvm::ThumbTargetMachine, llvm::X86_64TargetMachine, llvm::X86_32TargetMachine, llvm::ARMTargetMachine, llvm::NVPTXTargetMachine, llvm::MBlazeTargetMachine, llvm::MSP430TargetMachine, llvm::PTXTargetMachine, llvm::SPUTargetMachine, llvm::MipsTargetMachine, llvm::PPCTargetMachine, llvm::X86TargetMachine, llvm::HexagonTargetMachine, llvm::SparcTargetMachine, and llvm::XCoreTargetMachine.

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

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::PBQPBuilderWithCoalescing::build(), llvm::MachineBasicBlock::canFallThrough(), llvm::createBURRListDAGScheduler(), llvm::createHybridListDAGScheduler(), llvm::createILPListDAGScheduler(), llvm::createSourceListDAGScheduler(), llvm::SPUInstrInfo::CreateTargetHazardRecognizer(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), EmitComments(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::HexagonFrameLowering::emitEpilogue(), llvm::SparcFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::SPUFrameLowering::emitEpilogue(), llvm::MipsFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::MBlazeFrameLowering::emitEpilogue(), llvm::AsmPrinter::EmitFunctionBody(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::HexagonFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::SPUFrameLowering::emitPrologue(), llvm::MipsFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::MBlazeFrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), llvm::RegScavenger::enterBasicBlock(), llvm::finalizeBundle(), llvm::MBlazeInstrInfo::getGlobalBaseReg(), llvm::MSP430InstrInfo::GetInstSizeInBytes(), llvm::SDNode::getOperationName(), llvm::ARMTargetLowering::getSchedulingPreference(), INITIALIZE_PASS(), interruptFrameLayout(), llvm::MachineSSAUpdater::MachineSSAUpdater(), llvm::MachineInstr::print(), llvm::ARMFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::MachineRegisterInfo::recomputeRegClass(), llvm::ResourcePriorityQueue::ResourcePriorityQueue(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::HexagonFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::ProcessImplicitDefs::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), llvm::SelectionDAGISel::SelectCodeCommon(), llvm::FunctionLoweringInfo::set(), llvm::HexagonFrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::MachineBasicBlock::SplitCriticalEdge(), llvm::MachineBasicBlock::updateTerminator(), and llvm::VLIWPacketizerList::VLIWPacketizerList().

virtual const InstrItineraryData* llvm::TargetMachine::getInstrItineraryData ( ) const [inline, virtual]
virtual const TargetIntrinsicInfo* llvm::TargetMachine::getIntrinsicInfo ( ) const [inline, virtual]

getIntrinsicInfo - If intrinsic information is available, return it. If not, return null.

Reimplemented in llvm::MBlazeTargetMachine.

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

Referenced by llvm::SDNode::getOperationName().

virtual TargetJITInfo* llvm::TargetMachine::getJITInfo ( ) [inline, virtual]

getJITInfo - If this target supports a JIT, return information for it, otherwise return null.

Reimplemented in llvm::X86_64TargetMachine, llvm::X86_32TargetMachine, llvm::SPUTargetMachine, llvm::MipsTargetMachine, llvm::X86TargetMachine, llvm::PPCTargetMachine, and llvm::ARMBaseTargetMachine.

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

Referenced by llvm::MCJIT::createJIT(), and llvm::JIT::createJIT().

const MCAsmInfo* llvm::TargetMachine::getMCAsmInfo ( ) const [inline]
CodeGenOpt::Level TargetMachine::getOptLevel ( ) const

getOptLevel - Returns the optimization level: None, Less, Default, or Aggressive.

Definition at line 101 of file TargetMachine.cpp.

References CodeGenInfo, llvm::Reloc::Default, and llvm::MCCodeGenInfo::getOptLevel().

Referenced by addPassesToGenerateCode(), and llvm::TargetPassConfig::getOptLevel().

virtual const TargetRegisterInfo* llvm::TargetMachine::getRegisterInfo ( ) const [inline, virtual]

getRegisterInfo - If register information is available, return it. If not, return null. This is kept separate from RegInfo until RegInfo has details of graph coloring register allocation removed from it.

Reimplemented in llvm::ThumbTargetMachine, llvm::ARMTargetMachine, llvm::NVPTXTargetMachine, llvm::SPUTargetMachine, llvm::MBlazeTargetMachine, llvm::X86TargetMachine, llvm::MipsTargetMachine, llvm::PPCTargetMachine, llvm::MSP430TargetMachine, llvm::XCoreTargetMachine, llvm::HexagonTargetMachine, llvm::PTXTargetMachine, and llvm::SparcTargetMachine.

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

Referenced by llvm::CompileUnit::addBlockByrefAddress(), addPassesToGenerateCode(), llvm::CompileUnit::addRegisterOffset(), llvm::CompileUnit::addRegisterOp(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::PBQPBuilder::build(), llvm::PBQPBuilderWithCoalescing::build(), llvm::VirtRegAuxInfo::CalculateWeightAndHint(), checkNumAlignedDPRCS2Regs(), llvm::CompileUnit::constructVariableDIE(), llvm::createBURRListDAGScheduler(), llvm::createHybridListDAGScheduler(), llvm::createILPListDAGScheduler(), llvm::createSourceListDAGScheduler(), llvm::AsmPrinter::EmitCFIFrameMove(), EmitDebugValueComment(), llvm::ARMAsmPrinter::EmitDwarfRegOp(), llvm::AsmPrinter::EmitDwarfRegOp(), llvm::JITDwarfEmitter::EmitDwarfTable(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::MipsAsmPrinter::emitFrameDirective(), EmitImplicitDef(), EmitKill(), llvm::HexagonFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::MipsFrameLowering::emitPrologue(), llvm::RegScavenger::enterBasicBlock(), estimateStackSize(), llvm::finalizeBundle(), llvm::TargetLowering::findRepresentativeClass(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::X86FrameLowering::getFrameIndexOffset(), llvm::X86FrameLowering::getFrameIndexReference(), llvm::TargetFrameLowering::getFrameIndexReference(), llvm::MachineFrameInfo::getPristineRegs(), llvm::TargetLowering::getRegForInlineAsmConstraint(), llvm::ARMFrameLowering::hasFP(), llvm::RegPressureTracker::init(), llvm::MachineFunction::MachineFunction(), llvm::VirtRegMap::print(), llvm::MachineOperand::print(), llvm::MachineFunction::print(), llvm::MachineBasicBlock::print(), llvm::MachineInstr::print(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::XCoreFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::ARMFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::ResourcePriorityQueue::ResourcePriorityQueue(), llvm::ProcessImplicitDefs::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::RegisterClassInfo::runOnMachineFunction(), llvm::LiveStacks::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::RenderMachineFunction::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), and llvm::MachineBasicBlock::SplitCriticalEdge().

Reloc::Model TargetMachine::getRelocationModel ( ) const
virtual const TargetSelectionDAGInfo* llvm::TargetMachine::getSelectionDAGInfo ( ) const [inline, virtual]
template<typename STC >
const STC& llvm::TargetMachine::getSubtarget ( ) const [inline]

getSubtarget - This method returns a pointer to the specified type of TargetSubtargetInfo. In debug builds, it verifies that the object being returned is of the correct type.

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

References getSubtargetImpl().

Referenced by llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addVRegUseDeps(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::ARMAsmPrinter::ARMAsmPrinter(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::X86InstrInfo::breakPartialRegDependency(), checkNumAlignedDPRCS2Regs(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::copyPhysReg(), llvm::ARM::createFastISel(), createPPCAsmPrinterPass(), llvm::PPCInstrInfo::CreateTargetHazardRecognizer(), llvm::PPCInstrInfo::CreateTargetPostRAHazardRecognizer(), llvm::HexagonInstrInfo::CreateTargetScheduleState(), createTLOF(), llvm::PTXAsmPrinter::EmitFunctionEntryLabel(), llvm::PTXAsmPrinter::EmitStartOfAsmFile(), llvm::X86InstrInfo::expandPostRAPseudo(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::X86InstrInfo::getExecutionDomain(), llvm::MipsFunctionInfo::getGlobalBaseReg(), llvm::X86InstrInfo::getGlobalBaseReg(), GetLabelAccessInfo(), getLoadStoreRegOpcode(), llvm::X86RegisterInfo::getPointerRegClass(), llvm::X86RegisterInfo::getRegPressureLimit(), gvNeedsNonLazyPtr(), llvm::HexagonAsmPrinter::HexagonAsmPrinter(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::X86InstrInfo::isCoalescableExtInstr(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::PTXTargetLowering::LowerFormalArguments(), llvm::PTXTargetLowering::LowerReturn(), llvm::MBlazeTargetLowering::MBlazeTargetLowering(), llvm::MipsAsmPrinter::MipsAsmPrinter(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PPCTargetLowering(), PrepareCall(), llvm::PPCTargetLowering::ReplaceNodeResults(), llvm::X86InstrInfo::setExecutionDomain(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::X86InstrInfo::unfoldMemoryOperand(), llvm::X86AsmPrinter::X86AsmPrinter(), llvm::X86JITInfo::X86JITInfo(), llvm::X86RegisterInfo::X86RegisterInfo(), and llvm::X86TargetLowering::X86TargetLowering().

virtual const TargetSubtargetInfo* llvm::TargetMachine::getSubtargetImpl ( ) const [inline, protected, virtual]

getSubtargetImpl - virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInfo-derived member variable.

Reimplemented in llvm::NVPTXTargetMachine, llvm::PPCTargetMachine, llvm::MBlazeTargetMachine, llvm::PTXTargetMachine, llvm::X86TargetMachine, llvm::MipsTargetMachine, llvm::MSP430TargetMachine, llvm::ARMBaseTargetMachine, llvm::HexagonTargetMachine, llvm::SparcTargetMachine, llvm::SPUTargetMachine, and llvm::XCoreTargetMachine.

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

Referenced by getSubtarget().

const Target& llvm::TargetMachine::getTarget ( ) const [inline]
const StringRef llvm::TargetMachine::getTargetCPU ( ) const [inline]

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

References TargetCPU.

virtual const TargetData* llvm::TargetMachine::getTargetData ( ) const [inline, virtual]

Reimplemented in llvm::ThumbTargetMachine, llvm::X86_64TargetMachine, llvm::ARMTargetMachine, llvm::X86_32TargetMachine, llvm::SPUTargetMachine, llvm::HexagonTargetMachine, llvm::NVPTXTargetMachine, llvm::MBlazeTargetMachine, llvm::PPCTargetMachine, llvm::XCoreTargetMachine, llvm::SparcTargetMachine, llvm::MipsTargetMachine, llvm::MSP430TargetMachine, llvm::PTXTargetMachine, and llvm::CPPTargetMachine.

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

Referenced by llvm::JIT::addModule(), llvm::AsmPrinter::doInitialization(), llvm::AsmPrinter::EmitAlignment(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::AsmPrinter::EmitConstantPool(), llvm::JITDwarfEmitter::EmitDwarfTable(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::AsmPrinter::EmitGlobalConstant(), EmitGlobalConstantArray(), EmitGlobalConstantDataSequential(), EmitGlobalConstantFP(), EmitGlobalConstantImpl(), EmitGlobalConstantLargeInt(), EmitGlobalConstantStruct(), EmitGlobalConstantVector(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::X86FrameLowering::emitPrologue(), llvm::ARMAsmPrinter::EmitXXStructor(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::AsmPrinter::GetSizeOfEncodedValue(), llvm::AsmPrinter::getTargetData(), llvm::SelectionDAGBuilder::init(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::MBlazeTargetObjectFile::IsGlobalInSmallSection(), llvm::HexagonTargetObjectFile::IsGlobalInSmallSection(), isRepeatedByteSequence(), LLVMTargetMachineEmitToFile(), nvptx::LowerConstant(), LowerConstant(), llvm::MachineFunction::MachineFunction(), llvm::JIT::removeModule(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal().

const StringRef llvm::TargetMachine::getTargetFeatureString ( ) const [inline]

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

References TargetFS.

virtual const TargetLowering* llvm::TargetMachine::getTargetLowering ( ) const [inline, virtual]
const StringRef llvm::TargetMachine::getTargetTriple ( ) const [inline]
TLSModel::Model TargetMachine::getTLSModel ( const GlobalValue GV) const
bool llvm::TargetMachine::hasMCNoExecStack ( ) const [inline]

hasMCNoExecStack - Check whether an executable stack is not needed.

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

References MCNoExecStack.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().

bool llvm::TargetMachine::hasMCRelaxAll ( ) const [inline]

hasMCRelaxAll - Check whether all machine code instructions should be relaxed.

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

References MCRelaxAll.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().

bool llvm::TargetMachine::hasMCSaveTempLabels ( ) const [inline]

hasMCSaveTempLabels - Check whether temporary labels will be preserved (i.e., not treated as temporary).

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

References MCSaveTempLabels.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().

bool llvm::TargetMachine::hasMCUseCFI ( ) const [inline]

hasMCUseCFI - Check whether we should use dwarf's .cfi_* directives.

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

References MCUseCFI.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile().

bool llvm::TargetMachine::hasMCUseDwarfDirectory ( ) const [inline]

hasMCUseDwarfDirectory - Check whether we should use .file directives with explicit directories.

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

References MCUseDwarfDirectory.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile().

bool llvm::TargetMachine::hasMCUseLoc ( ) const [inline]

hasMCUseLoc - Check whether we should use dwarf's .loc directive.

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

References MCUseLoc.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::AsmPrinter::EmitFunctionBody().

void TargetMachine::setAsmVerbosityDefault ( bool  V) [static]

setAsmVerbosityDefault - Set the default value of asm verbosity. Default is false.

Definition at line 111 of file TargetMachine.cpp.

References llvm::AsmVerbosityDefault().

void TargetMachine::setDataSections ( bool  V) [static]

setDataSections - Set if the data are emit into separate sections.

Definition at line 127 of file TargetMachine.cpp.

References DataSections.

void llvm::TargetMachine::setFastISel ( bool  Enable) [inline]

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

References llvm::TargetOptions::EnableFastISel.

Referenced by addPassesToGenerateCode().

void TargetMachine::setFunctionSections ( bool  V) [static]

setFunctionSections - Set if the functions are emit into separate sections.

Definition at line 123 of file TargetMachine.cpp.

References FunctionSections.

void llvm::TargetMachine::setMCNoExecStack ( bool  Value) [inline]

setMCNoExecStack - Set whether an executabel stack is not needed.

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

References MCNoExecStack.

void llvm::TargetMachine::setMCRelaxAll ( bool  Value) [inline]

setMCRelaxAll - Set whether all machine code instructions should be relaxed.

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

References MCRelaxAll.

void llvm::TargetMachine::setMCSaveTempLabels ( bool  Value) [inline]

setMCSaveTempLabels - Set whether temporary labels will be preserved (i.e., not treated as temporary).

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

References MCSaveTempLabels.

void llvm::TargetMachine::setMCUseCFI ( bool  Value) [inline]

setMCUseCFI - Set whether all we should use dwarf's .cfi_* directives.

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

References MCUseCFI.

Referenced by llvm::HexagonTargetMachine::HexagonTargetMachine(), and llvm::PPCTargetMachine::PPCTargetMachine().

void llvm::TargetMachine::setMCUseDwarfDirectory ( bool  Value) [inline]

setMCUseDwarfDirectory - Set whether all we should use .file directives with explicit directories.

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

References MCUseDwarfDirectory.

void llvm::TargetMachine::setMCUseLoc ( bool  Value) [inline]

setMCUseLoc - Set whether all we should use dwarf's .loc directive.

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

References MCUseLoc.

bool llvm::TargetMachine::shouldPrintMachineCode ( ) const [inline]

Member Data Documentation

AsmInfo - Contains target specific asm information.

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

Referenced by getMCAsmInfo(), llvm::LLVMTargetMachine::LLVMTargetMachine(), and ~TargetMachine().

CodeGenInfo - Low level target information such as relocation model.

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

Referenced by getCodeModel(), getOptLevel(), getRelocationModel(), llvm::LLVMTargetMachine::LLVMTargetMachine(), and ~TargetMachine().

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

Referenced by hasMCNoExecStack(), and setMCNoExecStack().

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

Referenced by hasMCRelaxAll(), and setMCRelaxAll().

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

Referenced by hasMCSaveTempLabels(), and setMCSaveTempLabels().

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

Referenced by hasMCUseCFI(), and setMCUseCFI().

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

Referenced by hasMCUseDwarfDirectory(), and setMCUseDwarfDirectory().

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

Referenced by hasMCUseLoc(), and setMCUseLoc().

std::string llvm::TargetMachine::TargetCPU [protected]

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

Referenced by getTargetCPU().

std::string llvm::TargetMachine::TargetFS [protected]

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

Referenced by getTargetFeatureString().

std::string llvm::TargetMachine::TargetTriple [protected]

TargetTriple, TargetCPU, TargetFS - Triple string, CPU name, and target feature strings the TargetMachine instance is created with.

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

Referenced by getTargetTriple().

TheTarget - The Target that this machine was created for.

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

Referenced by getTarget().


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