LLVM API Documentation
#include <PPCSubtarget.h>


Public Member Functions | |
| PPCSubtarget (const std::string &TT, const std::string &CPU, const std::string &FS, bool is64Bit) | |
| void | ParseSubtargetFeatures (StringRef CPU, StringRef FS) |
| void | SetJITMode () |
| unsigned | getStackAlignment () const |
| unsigned | getDarwinDirective () const |
| const InstrItineraryData & | getInstrItineraryData () const |
| const char * | getDataLayoutString () const |
| bool | isPPC64 () const |
| bool | has64BitSupport () const |
| bool | use64BitRegs () const |
| bool | hasLazyResolverStub (const GlobalValue *GV, const TargetMachine &TM) const |
| bool | isJITCodeModel () const |
| bool | hasFSQRT () const |
| bool | hasFRE () const |
| bool | hasFRES () const |
| bool | hasFRSQRTE () const |
| bool | hasFRSQRTES () const |
| bool | hasRecipPrec () const |
| bool | hasSTFIWX () const |
| bool | hasLFIWAX () const |
| bool | hasFPRND () const |
| bool | hasFPCVT () const |
| bool | hasAltivec () const |
| bool | hasQPX () const |
| bool | hasMFOCRF () const |
| bool | hasISEL () const |
| bool | hasPOPCNTD () const |
| bool | hasLDBRX () const |
| bool | isBookE () const |
| const Triple & | getTargetTriple () const |
| bool | isDarwin () const |
| isDarwin - True if this is any darwin platform. | |
| bool | isBGP () const |
| isBGP - True if this is a BG/P platform. | |
| bool | isBGQ () const |
| isBGQ - True if this is a BG/Q platform. | |
| bool | isDarwinABI () const |
| bool | isSVR4ABI () const |
| bool | enablePostRAScheduler (CodeGenOpt::Level OptLevel, TargetSubtargetInfo::AntiDepBreakMode &Mode, RegClassVector &CriticalPathRCs) const |
| enablePostRAScheduler - True at 'More' optimization. | |
Protected Attributes | |
| unsigned | StackAlignment |
| InstrItineraryData | InstrItins |
| Selected instruction itineraries (one entry per itinerary class.) | |
| unsigned | DarwinDirective |
| Which cpu directive was used. | |
| bool | HasMFOCRF |
| Used by the ISel to turn in optimizations for POWER4-derived architectures. | |
| bool | Has64BitSupport |
| bool | Use64BitRegs |
| bool | IsPPC64 |
| bool | HasAltivec |
| bool | HasQPX |
| bool | HasFSQRT |
| bool | HasFRE |
| bool | HasFRES |
| bool | HasFRSQRTE |
| bool | HasFRSQRTES |
| bool | HasRecipPrec |
| bool | HasSTFIWX |
| bool | HasLFIWAX |
| bool | HasFPRND |
| bool | HasFPCVT |
| bool | HasISEL |
| bool | HasPOPCNTD |
| bool | HasLDBRX |
| bool | IsBookE |
| bool | HasLazyResolverStubs |
| bool | IsJITCodeModel |
| Triple | TargetTriple |
| TargetTriple - What processor and OS we're targeting. | |
Definition at line 60 of file PPCSubtarget.h.
| PPCSubtarget::PPCSubtarget | ( | const std::string & | TT, |
| const std::string & | CPU, | ||
| const std::string & | FS, | ||
| bool | is64Bit | ||
| ) |
This constructor initializes the data members to match that of the specified triple.
Definition at line 29 of file PPCSubtarget.cpp.
References llvm::X86II::FS, llvm::sys::getHostCPUName(), Has64BitSupport, has64BitSupport(), HasLazyResolverStubs, hasQPX(), InstrItins, isBGQ(), isDarwin(), ParseSubtargetFeatures(), StackAlignment, Use64BitRegs, and use64BitRegs().
| bool PPCSubtarget::enablePostRAScheduler | ( | CodeGenOpt::Level | OptLevel, |
| TargetSubtargetInfo::AntiDepBreakMode & | Mode, | ||
| RegClassVector & | CriticalPathRCs | ||
| ) | const |
enablePostRAScheduler - True at 'More' optimization.
Definition at line 134 of file PPCSubtarget.cpp.
References llvm::TargetSubtargetInfo::ANTIDEP_CRITICAL, llvm::Reloc::Default, and isPPC64().
| unsigned llvm::PPCSubtarget::getDarwinDirective | ( | ) | const [inline] |
getDarwinDirective - Returns the -m directive specified for the cpu.
Definition at line 118 of file PPCSubtarget.h.
References DarwinDirective.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| const char* llvm::PPCSubtarget::getDataLayoutString | ( | ) | const [inline] |
getDataLayoutString - Return the pointer size and type alignment properties of this subtarget.
Definition at line 126 of file PPCSubtarget.h.
References llvm::Triple::FreeBSD, llvm::Triple::getOS(), isPPC64(), isSVR4ABI(), and TargetTriple.
| const InstrItineraryData& llvm::PPCSubtarget::getInstrItineraryData | ( | ) | const [inline] |
getInstrItins - Return the instruction itineraies based on subtarget selection.
Definition at line 122 of file PPCSubtarget.h.
References InstrItins.
| 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 114 of file PPCSubtarget.h.
References StackAlignment.
| const Triple& llvm::PPCSubtarget::getTargetTriple | ( | ) | const [inline] |
Definition at line 181 of file PPCSubtarget.h.
References TargetTriple.
Referenced by PrepareCall().
| 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 146 of file PPCSubtarget.h.
References Has64BitSupport.
Referenced by llvm::PPCTargetLowering::PerformDAGCombine(), PPCSubtarget(), and llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasAltivec | ( | ) | const [inline] |
Definition at line 173 of file PPCSubtarget.h.
References HasAltivec.
Referenced by llvm::PPCRegisterInfo::getNoPreservedMask(), and llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFPCVT | ( | ) | const [inline] |
Definition at line 172 of file PPCSubtarget.h.
References HasFPCVT.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFPRND | ( | ) | const [inline] |
Definition at line 171 of file PPCSubtarget.h.
References HasFPRND.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFRE | ( | ) | const [inline] |
Definition at line 164 of file PPCSubtarget.h.
References HasFRE.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFRES | ( | ) | const [inline] |
Definition at line 165 of file PPCSubtarget.h.
References HasFRES.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFRSQRTE | ( | ) | const [inline] |
Definition at line 166 of file PPCSubtarget.h.
References HasFRSQRTE.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFRSQRTES | ( | ) | const [inline] |
Definition at line 167 of file PPCSubtarget.h.
References HasFRSQRTES.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasFSQRT | ( | ) | const [inline] |
Definition at line 163 of file PPCSubtarget.h.
References HasFSQRT.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasISEL | ( | ) | const [inline] |
Definition at line 176 of file PPCSubtarget.h.
References HasISEL.
Referenced by llvm::PPCInstrInfo::canInsertSelect(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), and llvm::PPCInstrInfo::insertSelect().
| bool PPCSubtarget::hasLazyResolverStub | ( | const GlobalValue * | GV, |
| const TargetMachine & | TM | ||
| ) | 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.
Definition at line 120 of file PPCSubtarget.cpp.
References llvm::TargetMachine::getRelocationModel(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasHiddenVisibility(), HasLazyResolverStubs, llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasWeakLinkage(), llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isMaterializable(), and llvm::Reloc::Static.
Referenced by GetLabelAccessInfo().
| bool llvm::PPCSubtarget::hasLDBRX | ( | ) | const [inline] |
Definition at line 178 of file PPCSubtarget.h.
References HasLDBRX.
| bool llvm::PPCSubtarget::hasLFIWAX | ( | ) | const [inline] |
Definition at line 170 of file PPCSubtarget.h.
References HasLFIWAX.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasMFOCRF | ( | ) | const [inline] |
Definition at line 175 of file PPCSubtarget.h.
References HasMFOCRF.
| bool llvm::PPCSubtarget::hasPOPCNTD | ( | ) | const [inline] |
Definition at line 177 of file PPCSubtarget.h.
References HasPOPCNTD.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::hasQPX | ( | ) | const [inline] |
| bool llvm::PPCSubtarget::hasRecipPrec | ( | ) | const [inline] |
Definition at line 168 of file PPCSubtarget.h.
References HasRecipPrec.
| bool llvm::PPCSubtarget::hasSTFIWX | ( | ) | const [inline] |
Definition at line 169 of file PPCSubtarget.h.
References HasSTFIWX.
Referenced by llvm::PPCTargetLowering::PerformDAGCombine().
| bool llvm::PPCSubtarget::isBGP | ( | ) | const [inline] |
isBGP - True if this is a BG/P platform.
Definition at line 186 of file PPCSubtarget.h.
References llvm::Triple::BGP, llvm::Triple::getVendor(), and TargetTriple.
Referenced by llvm::PPCTargetMachine::PPCTargetMachine().
| bool llvm::PPCSubtarget::isBGQ | ( | ) | const [inline] |
isBGQ - True if this is a BG/Q platform.
Definition at line 188 of file PPCSubtarget.h.
References llvm::Triple::BGQ, llvm::Triple::getVendor(), and TargetTriple.
Referenced by PPCSubtarget().
| bool llvm::PPCSubtarget::isBookE | ( | ) | const [inline] |
Definition at line 179 of file PPCSubtarget.h.
References IsBookE.
| bool llvm::PPCSubtarget::isDarwin | ( | ) | const [inline] |
isDarwin - True if this is any darwin platform.
Definition at line 184 of file PPCSubtarget.h.
References llvm::Triple::isMacOSX(), and TargetTriple.
Referenced by createPPCAsmPrinterPass(), CreateTLOF(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::PPCRegisterInfo::getNoPreservedMask(), isDarwinABI(), isSVR4ABI(), PPCSubtarget(), and llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::isDarwinABI | ( | ) | const [inline] |
Definition at line 190 of file PPCSubtarget.h.
References isDarwin().
Referenced by llvm::PPCFrameLowering::determineFrameLayout(), llvm::PPCFrameLowering::emitEpilogue(), llvm::PPCJITInfo::emitFunctionStub(), llvm::PPCFrameLowering::emitPrologue(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCFrameLowering::getCalleeSavedSpillSlots(), llvm::PPCRegisterInfo::getCallPreservedMask(), and llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan().
| bool llvm::PPCSubtarget::isJITCodeModel | ( | ) | const [inline] |
Definition at line 160 of file PPCSubtarget.h.
References IsJITCodeModel.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
| bool llvm::PPCSubtarget::isPPC64 | ( | ) | const [inline] |
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
Definition at line 142 of file PPCSubtarget.h.
References IsPPC64.
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::PPCFrameLowering::emitEpilogue(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::PPCFrameLowering::emitPrologue(), enablePostRAScheduler(), llvm::PPCInstrInfo::FoldImmediate(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCFrameLowering::getCalleeSavedSpillSlots(), llvm::PPCRegisterInfo::getCallPreservedMask(), getDataLayoutString(), llvm::PPCRegisterInfo::getEHExceptionRegister(), llvm::PPCRegisterInfo::getEHHandlerRegister(), llvm::PPCRegisterInfo::getFrameRegister(), llvm::PPCTargetLowering::getOptimalMemOpType(), llvm::PPCRegisterInfo::getPointerRegClass(), llvm::PPCTargetLowering::getRegForInlineAsmConstraint(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::hasReservedSpillSlot(), llvm::PPCInstrInfo::InsertBranch(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::PPCInstrInfo::PredicateInstruction(), PrepareCall(), llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegRegOnly(), and llvm::PPCFrameLowering::spillCalleeSavedRegisters().
| bool llvm::PPCSubtarget::isSVR4ABI | ( | ) | const [inline] |
Definition at line 191 of file PPCSubtarget.h.
References isDarwin().
Referenced by CreateTLOF(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::PPCFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitPrologue(), llvm::PPCFrameLowering::getCalleeSavedSpillSlots(), getDataLayoutString(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::hasReservedSpillSlot(), llvm::PPCTargetLowering::PPCTargetLowering(), PrepareCall(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::PPCTargetLowering::ReplaceNodeResults(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), and llvm::PPCFrameLowering::spillCalleeSavedRegisters().
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.
Definition at line 106 of file PPCSubtarget.cpp.
References HasLazyResolverStubs, and IsJITCodeModel.
Referenced by llvm::PPCTargetMachine::addCodeEmitter().
| 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 151 of file PPCSubtarget.h.
References Use64BitRegs.
Referenced by PPCSubtarget(), and llvm::PPCTargetLowering::PPCTargetLowering().
unsigned llvm::PPCSubtarget::DarwinDirective [protected] |
Which cpu directive was used.
Definition at line 70 of file PPCSubtarget.h.
Referenced by getDarwinDirective().
bool llvm::PPCSubtarget::Has64BitSupport [protected] |
Definition at line 74 of file PPCSubtarget.h.
Referenced by has64BitSupport(), and PPCSubtarget().
bool llvm::PPCSubtarget::HasAltivec [protected] |
Definition at line 77 of file PPCSubtarget.h.
Referenced by hasAltivec().
bool llvm::PPCSubtarget::HasFPCVT [protected] |
Definition at line 85 of file PPCSubtarget.h.
Referenced by hasFPCVT().
bool llvm::PPCSubtarget::HasFPRND [protected] |
Definition at line 84 of file PPCSubtarget.h.
Referenced by hasFPRND().
bool llvm::PPCSubtarget::HasFRE [protected] |
Definition at line 80 of file PPCSubtarget.h.
Referenced by hasFRE().
bool llvm::PPCSubtarget::HasFRES [protected] |
Definition at line 80 of file PPCSubtarget.h.
Referenced by hasFRES().
bool llvm::PPCSubtarget::HasFRSQRTE [protected] |
Definition at line 80 of file PPCSubtarget.h.
Referenced by hasFRSQRTE().
bool llvm::PPCSubtarget::HasFRSQRTES [protected] |
Definition at line 80 of file PPCSubtarget.h.
Referenced by hasFRSQRTES().
bool llvm::PPCSubtarget::HasFSQRT [protected] |
Definition at line 79 of file PPCSubtarget.h.
Referenced by hasFSQRT().
bool llvm::PPCSubtarget::HasISEL [protected] |
Definition at line 86 of file PPCSubtarget.h.
Referenced by hasISEL().
bool llvm::PPCSubtarget::HasLazyResolverStubs [protected] |
Definition at line 90 of file PPCSubtarget.h.
Referenced by hasLazyResolverStub(), PPCSubtarget(), and SetJITMode().
bool llvm::PPCSubtarget::HasLDBRX [protected] |
Definition at line 88 of file PPCSubtarget.h.
Referenced by hasLDBRX().
bool llvm::PPCSubtarget::HasLFIWAX [protected] |
Definition at line 83 of file PPCSubtarget.h.
Referenced by hasLFIWAX().
bool llvm::PPCSubtarget::HasMFOCRF [protected] |
Used by the ISel to turn in optimizations for POWER4-derived architectures.
Definition at line 73 of file PPCSubtarget.h.
Referenced by hasMFOCRF().
bool llvm::PPCSubtarget::HasPOPCNTD [protected] |
Definition at line 87 of file PPCSubtarget.h.
Referenced by hasPOPCNTD().
bool llvm::PPCSubtarget::HasQPX [protected] |
Definition at line 78 of file PPCSubtarget.h.
Referenced by hasQPX().
bool llvm::PPCSubtarget::HasRecipPrec [protected] |
Definition at line 81 of file PPCSubtarget.h.
Referenced by hasRecipPrec().
bool llvm::PPCSubtarget::HasSTFIWX [protected] |
Definition at line 82 of file PPCSubtarget.h.
Referenced by hasSTFIWX().
InstrItineraryData llvm::PPCSubtarget::InstrItins [protected] |
Selected instruction itineraries (one entry per itinerary class.)
Definition at line 67 of file PPCSubtarget.h.
Referenced by getInstrItineraryData(), and PPCSubtarget().
bool llvm::PPCSubtarget::IsBookE [protected] |
Definition at line 89 of file PPCSubtarget.h.
Referenced by isBookE().
bool llvm::PPCSubtarget::IsJITCodeModel [protected] |
Definition at line 91 of file PPCSubtarget.h.
Referenced by isJITCodeModel(), and SetJITMode().
bool llvm::PPCSubtarget::IsPPC64 [protected] |
Definition at line 76 of file PPCSubtarget.h.
Referenced by isPPC64().
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 64 of file PPCSubtarget.h.
Referenced by getStackAlignment(), and PPCSubtarget().
Triple llvm::PPCSubtarget::TargetTriple [protected] |
TargetTriple - What processor and OS we're targeting.
Definition at line 94 of file PPCSubtarget.h.
Referenced by getDataLayoutString(), getTargetTriple(), isBGP(), isBGQ(), and isDarwin().
bool llvm::PPCSubtarget::Use64BitRegs [protected] |
Definition at line 75 of file PPCSubtarget.h.
Referenced by PPCSubtarget(), and use64BitRegs().