LLVM API Documentation
#include <PPCSubtarget.h>
Public Types | |
| enum | AsmWriterFlavorTy { OldMnemonic, NewMnemonic, Unset } |
Public Member Functions | |
| PPCSubtarget (const TargetMachine &TM, const Module &M, const std::string &FS, bool is64Bit) | |
| void | ParseSubtargetFeatures (const std::string &FS, const std::string &CPU) |
| void | SetJITMode () |
| unsigned | getStackAlignment () const |
| unsigned | getDarwinDirective () const |
| const InstrItineraryData & | getInstrItineraryData () const |
| const char * | getTargetDataString () const |
| bool | isPPC64 () const |
| bool | has64BitSupport () const |
| bool | use64BitRegs () const |
| bool | hasLazyResolverStub (const GlobalValue *GV) const |
| bool | hasFSQRT () const |
| bool | hasSTFIWX () const |
| bool | hasAltivec () const |
| bool | isGigaProcessor () const |
| bool | isDarwin () const |
| isDarwin - True if this is any darwin platform. | |
| bool | isDarwin9 () const |
| isDarwin - True if this is darwin9 (leopard, 10.5) or above. | |
| unsigned | getDarwinVers () const |
| getDarwinVers - Return the darwin version number, 8 = tiger, 9 = leopard. | |
| bool | isMachoABI () const |
| bool | isELF32_ABI () const |
| unsigned | getAsmFlavor () const |
Protected Attributes | |
| const TargetMachine & | TM |
| unsigned | StackAlignment |
| InstrItineraryData | InstrItins |
| Selected instruction itineraries (one entry per itinerary class.). | |
| unsigned | DarwinDirective |
| Which cpu directive was used. | |
| AsmWriterFlavorTy | AsmFlavor |
| AsmFlavor - Which PPC asm dialect to use. | |
| bool | IsGigaProcessor |
| Used by the ISel to turn in optimizations for POWER4-derived architectures. | |
| bool | Has64BitSupport |
| bool | Use64BitRegs |
| bool | IsPPC64 |
| bool | HasAltivec |
| bool | HasFSQRT |
| bool | HasSTFIWX |
| bool | HasLazyResolverStubs |
| unsigned char | DarwinVers |
Definition at line 46 of file PPCSubtarget.h.
| PPCSubtarget::PPCSubtarget | ( | const TargetMachine & | TM, | |
| const Module & | M, | |||
| const std::string & | FS, | |||
| bool | is64Bit | |||
| ) |
This constructor initializes the data members to match that of the specified module.
Definition at line 60 of file PPCSubtarget.cpp.
References AsmFlavor, DarwinVers, llvm::Module::getTargetTriple(), has64BitSupport(), Has64BitSupport, HasLazyResolverStubs, isDarwin(), NewMnemonic, OldMnemonic, ParseSubtargetFeatures(), use64BitRegs(), and Use64BitRegs.
| void llvm::PPCSubtarget::ParseSubtargetFeatures | ( | const std::string & | FS, | |
| const std::string & | CPU | |||
| ) |
ParseSubtargetFeatures - Parses features string setting specified subtarget options. Definition of function is auto generated by tblgen.
Referenced by PPCSubtarget().
| void PPCSubtarget::SetJITMode | ( | ) |
SetJITMode - This is called to inform the subtarget info that we are producing code for the JIT.
SetJITMode - This is called to inform the subtarget info that we are producing code for the JIT.
Definition at line 130 of file PPCSubtarget.cpp.
References HasLazyResolverStubs.
Referenced by llvm::PPCTargetMachine::addCodeEmitter().
| unsigned llvm::PPCSubtarget::getStackAlignment | ( | ) | const [inline] |
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function for this subtarget.
Definition at line 98 of file PPCSubtarget.h.
References StackAlignment.
| unsigned llvm::PPCSubtarget::getDarwinDirective | ( | ) | const [inline] |
getDarwinDirective - Returns the -m directive specified for the cpu.
Definition at line 102 of file PPCSubtarget.h.
References DarwinDirective.
| const InstrItineraryData& llvm::PPCSubtarget::getInstrItineraryData | ( | ) | const [inline] |
getInstrItins - Return the instruction itineraies based on subtarget selection.
Definition at line 106 of file PPCSubtarget.h.
References InstrItins.
| const char* llvm::PPCSubtarget::getTargetDataString | ( | ) | const [inline] |
getTargetDataString - Return the pointer size and type alignment properties of this subtarget.
Definition at line 110 of file PPCSubtarget.h.
References isPPC64().
| bool llvm::PPCSubtarget::isPPC64 | ( | ) | const [inline] |
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
Definition at line 117 of file PPCSubtarget.h.
References IsPPC64.
Referenced by llvm::PPCTargetMachine::addCodeEmitter(), llvm::PPCRegisterInfo::determineFrameLayout(), llvm::PPCRegisterInfo::eliminateCallFramePseudoInstr(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::PPCRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::getCalleeSavedRegClasses(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCRegisterInfo::getEHExceptionRegister(), llvm::PPCRegisterInfo::getEHHandlerRegister(), llvm::PPCRegisterInfo::getFrameRegister(), llvm::PPCInstrInfo::getPointerRegClass(), llvm::PPCRegisterInfo::getRARegister(), llvm::PPCTargetLowering::getRegForInlineAsmConstraint(), llvm::PPCRegisterInfo::getReservedRegs(), getTargetDataString(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(), llvm::PPCTargetAsmInfo< llvm::ELFTargetAsmInfo >::PPCTargetAsmInfo(), and llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan().
| bool llvm::PPCSubtarget::has64BitSupport | ( | ) | const [inline] |
has64BitSupport - Return true if the selected CPU supports 64-bit instructions, regardless of whether we are in 32-bit or 64-bit mode.
Definition at line 121 of file PPCSubtarget.h.
References Has64BitSupport.
Referenced by PPCSubtarget().
| bool llvm::PPCSubtarget::use64BitRegs | ( | ) | const [inline] |
use64BitRegs - Return true if in 64-bit mode or if we should use 64-bit registers in 32-bit mode when possible. This can only true if has64BitSupport() returns true.
Definition at line 126 of file PPCSubtarget.h.
References Use64BitRegs.
Referenced by PPCSubtarget().
| bool PPCSubtarget::hasLazyResolverStub | ( | const GlobalValue * | GV | ) | const |
hasLazyResolverStub - Return true if accesses to the specified global have to go through a dyld lazy resolution stub. This means that an extra load is required to get the address of the global.
hasLazyResolverStub - Return true if accesses to the specified global have to go through a dyld lazy resolution stub. This means that an extra load is required to get the address of the global.
Definition at line 141 of file PPCSubtarget.cpp.
References llvm::TargetMachine::getRelocationModel(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasHiddenVisibility(), HasLazyResolverStubs, llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasNotBeenReadFromBitcode(), llvm::GlobalValue::hasWeakLinkage(), llvm::GlobalValue::isDeclaration(), llvm::Reloc::Static, and TM.
| bool llvm::PPCSubtarget::hasFSQRT | ( | ) | const [inline] |
| bool llvm::PPCSubtarget::hasSTFIWX | ( | ) | const [inline] |
| bool llvm::PPCSubtarget::hasAltivec | ( | ) | const [inline] |
| bool llvm::PPCSubtarget::isGigaProcessor | ( | ) | const [inline] |
| bool llvm::PPCSubtarget::isDarwin | ( | ) | const [inline] |
isDarwin - True if this is any darwin platform.
Definition at line 140 of file PPCSubtarget.h.
References DarwinVers.
Referenced by llvm::createPPCAsmPrinterPass(), llvm::PPCTargetMachine::createTargetAsmInfo(), llvm::PPCRegisterInfo::getReservedRegs(), isELF32_ABI(), isMachoABI(), PPCSubtarget(), and llvm::PPCTargetMachine::PPCTargetMachine().
| bool llvm::PPCSubtarget::isDarwin9 | ( | ) | const [inline] |
isDarwin - True if this is darwin9 (leopard, 10.5) or above.
Definition at line 142 of file PPCSubtarget.h.
References DarwinVers.
| unsigned llvm::PPCSubtarget::getDarwinVers | ( | ) | const [inline] |
getDarwinVers - Return the darwin version number, 8 = tiger, 9 = leopard.
Definition at line 145 of file PPCSubtarget.h.
References DarwinVers.
Referenced by llvm::PPCDarwinTargetAsmInfo::getEHGlobalPrefix().
| bool llvm::PPCSubtarget::isMachoABI | ( | ) | const [inline] |
Definition at line 147 of file PPCSubtarget.h.
References isDarwin(), and IsPPC64.
Referenced by llvm::PPCRegisterInfo::determineFrameLayout(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::PPCJITInfo::emitFunctionStub(), llvm::PPCRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::getCalleeSavedRegClasses(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), GetFPR(), and llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan().
| bool llvm::PPCSubtarget::isELF32_ABI | ( | ) | const [inline] |
Definition at line 148 of file PPCSubtarget.h.
References isDarwin(), and IsPPC64.
Referenced by llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan().
| unsigned llvm::PPCSubtarget::getAsmFlavor | ( | ) | const [inline] |
Definition at line 150 of file PPCSubtarget.h.
References AsmFlavor, and Unset.
Referenced by llvm::PPCTargetAsmInfo< llvm::ELFTargetAsmInfo >::PPCTargetAsmInfo().
const TargetMachine& llvm::PPCSubtarget::TM [protected] |
unsigned llvm::PPCSubtarget::StackAlignment [protected] |
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function.
Definition at line 56 of file PPCSubtarget.h.
Referenced by getStackAlignment().
InstrItineraryData llvm::PPCSubtarget::InstrItins [protected] |
Selected instruction itineraries (one entry per itinerary class.).
Definition at line 59 of file PPCSubtarget.h.
Referenced by getInstrItineraryData().
unsigned llvm::PPCSubtarget::DarwinDirective [protected] |
Which cpu directive was used.
Definition at line 62 of file PPCSubtarget.h.
Referenced by getDarwinDirective().
AsmWriterFlavorTy llvm::PPCSubtarget::AsmFlavor [protected] |
AsmFlavor - Which PPC asm dialect to use.
Definition at line 65 of file PPCSubtarget.h.
Referenced by getAsmFlavor(), and PPCSubtarget().
bool llvm::PPCSubtarget::IsGigaProcessor [protected] |
Used by the ISel to turn in optimizations for POWER4-derived architectures.
Definition at line 68 of file PPCSubtarget.h.
Referenced by isGigaProcessor().
bool llvm::PPCSubtarget::Has64BitSupport [protected] |
bool llvm::PPCSubtarget::Use64BitRegs [protected] |
bool llvm::PPCSubtarget::IsPPC64 [protected] |
Definition at line 71 of file PPCSubtarget.h.
Referenced by isELF32_ABI(), isMachoABI(), and isPPC64().
bool llvm::PPCSubtarget::HasAltivec [protected] |
bool llvm::PPCSubtarget::HasFSQRT [protected] |
bool llvm::PPCSubtarget::HasSTFIWX [protected] |
bool llvm::PPCSubtarget::HasLazyResolverStubs [protected] |
Definition at line 75 of file PPCSubtarget.h.
Referenced by hasLazyResolverStub(), PPCSubtarget(), and SetJITMode().
unsigned char llvm::PPCSubtarget::DarwinVers [protected] |
DarwinVers - Nonzero if this is a darwin platform. Otherwise, the numeric version of the platform, e.g. 8 = 10.4 (Tiger), 9 = 10.5 (Leopard), etc.
Definition at line 79 of file PPCSubtarget.h.
Referenced by getDarwinVers(), isDarwin(), isDarwin9(), and PPCSubtarget().