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 |
virtual void | resetSubtargetFeatures (const MachineFunction *MF) |
Reset the features for the PowerPC target. More... | |
bool | isPPC64 () const |
bool | has64BitSupport () const |
bool | use64BitRegs () const |
bool | hasLazyResolverStub (const GlobalValue *GV, const TargetMachine &TM) const |
bool | isJITCodeModel () const |
bool | isLittleEndian () const |
bool | hasFCPSGN () 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 |
bool | isDeprecatedMFTB () const |
bool | isDeprecatedDST () const |
const Triple & | getTargetTriple () const |
bool | isDarwin () const |
isDarwin - True if this is any darwin platform. More... | |
bool | isBGP () const |
isBGP - True if this is a BG/P platform. More... | |
bool | isBGQ () const |
isBGQ - True if this is a BG/Q platform. More... | |
bool | isDarwinABI () const |
bool | isSVR4ABI () const |
bool | enablePostRAScheduler (CodeGenOpt::Level OptLevel, TargetSubtargetInfo::AntiDepBreakMode &Mode, RegClassVector &CriticalPathRCs) const |
enablePostRAScheduler - True at 'More' optimization. More... | |
bool | enableMachineScheduler () const |
void | overrideSchedPolicy (MachineSchedPolicy &Policy, MachineInstr *begin, MachineInstr *end, unsigned NumRegionInstrs) const |
bool | useAA () const |
Protected Attributes | |
unsigned | StackAlignment |
InstrItineraryData | InstrItins |
Selected instruction itineraries (one entry per itinerary class.) More... | |
unsigned | DarwinDirective |
Which cpu directive was used. More... | |
bool | HasMFOCRF |
Used by the ISel to turn in optimizations for POWER4-derived architectures. More... | |
bool | Has64BitSupport |
bool | Use64BitRegs |
bool | IsPPC64 |
bool | HasAltivec |
bool | HasQPX |
bool | HasVSX |
bool | HasFCPSGN |
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 | DeprecatedMFTB |
bool | DeprecatedDST |
bool | HasLazyResolverStubs |
bool | IsJITCodeModel |
bool | IsLittleEndian |
Triple | TargetTriple |
TargetTriple - What processor and OS we're targeting. More... | |
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 33 of file PPCSubtarget.cpp.
References resetSubtargetFeatures().
bool PPCSubtarget::enableMachineScheduler | ( | ) | const |
Definition at line 194 of file PPCSubtarget.cpp.
References DarwinDirective, and needsAggressiveScheduling().
Referenced by llvm::PPCTargetLowering::getSchedulingPreference(), and llvm::PPCTargetLowering::PPCTargetLowering().
bool PPCSubtarget::enablePostRAScheduler | ( | CodeGenOpt::Level | OptLevel, |
TargetSubtargetInfo::AntiDepBreakMode & | Mode, | ||
RegClassVector & | CriticalPathRCs | ||
) | const |
enablePostRAScheduler - True at 'More' optimization.
Definition at line 166 of file PPCSubtarget.cpp.
References llvm::TargetSubtargetInfo::ANTIDEP_ALL, llvm::CodeGenOpt::Default, and isPPC64().
|
inline |
getDarwinDirective - Returns the -m directive specified for the cpu.
Definition at line 123 of file PPCSubtarget.h.
References DarwinDirective.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
getDataLayoutString - Return the pointer size and type alignment properties of this subtarget.
Definition at line 131 of file PPCSubtarget.h.
References llvm::Triple::FreeBSD, llvm::Triple::getOS(), isPPC64(), isSVR4ABI(), and TargetTriple.
|
inline |
getInstrItins - Return the instruction itineraies based on subtarget selection.
Definition at line 127 of file PPCSubtarget.h.
References InstrItins.
|
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 119 of file PPCSubtarget.h.
References StackAlignment.
|
inline |
Definition at line 199 of file PPCSubtarget.h.
References TargetTriple.
Referenced by PrepareCall().
|
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 158 of file PPCSubtarget.h.
References Has64BitSupport.
Referenced by llvm::PPCTargetLowering::PerformDAGCombine(), and llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 189 of file PPCSubtarget.h.
References HasAltivec.
Referenced by llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCRegisterInfo::getCallPreservedMask(), llvm::PPCRegisterInfo::getReservedRegs(), and llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 178 of file PPCSubtarget.h.
References HasFCPSGN.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 188 of file PPCSubtarget.h.
References HasFPCVT.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 187 of file PPCSubtarget.h.
References HasFPRND.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 180 of file PPCSubtarget.h.
References HasFRE.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 181 of file PPCSubtarget.h.
References HasFRES.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 182 of file PPCSubtarget.h.
References HasFRSQRTE.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 183 of file PPCSubtarget.h.
References HasFRSQRTES.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 179 of file PPCSubtarget.h.
References HasFSQRT.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 192 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 152 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().
|
inline |
Definition at line 194 of file PPCSubtarget.h.
References HasLDBRX.
|
inline |
Definition at line 186 of file PPCSubtarget.h.
References HasLFIWAX.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 191 of file PPCSubtarget.h.
References HasMFOCRF.
|
inline |
Definition at line 193 of file PPCSubtarget.h.
References HasPOPCNTD.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 190 of file PPCSubtarget.h.
References HasQPX.
Referenced by llvm::PPCTargetLowering::getByValTypeAlignment().
|
inline |
Definition at line 184 of file PPCSubtarget.h.
References HasRecipPrec.
|
inline |
Definition at line 185 of file PPCSubtarget.h.
References HasSTFIWX.
Referenced by llvm::PPCTargetLowering::PerformDAGCombine().
|
inline |
isBGP - True if this is a BG/P platform.
Definition at line 204 of file PPCSubtarget.h.
References llvm::Triple::BGP, llvm::Triple::getVendor(), and TargetTriple.
Referenced by llvm::PPCTargetMachine::PPCTargetMachine().
|
inline |
isBGQ - True if this is a BG/Q platform.
Definition at line 206 of file PPCSubtarget.h.
References llvm::Triple::BGQ, llvm::Triple::getVendor(), and TargetTriple.
|
inline |
Definition at line 195 of file PPCSubtarget.h.
References IsBookE.
|
inline |
isDarwin - True if this is any darwin platform.
Definition at line 202 of file PPCSubtarget.h.
References llvm::Triple::isMacOSX(), and TargetTriple.
Referenced by createPPCAsmPrinterPass(), CreateTLOF(), llvm::PPCTargetLowering::getByValTypeAlignment(), isDarwinABI(), isSVR4ABI(), and llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 208 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(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), and llvm::PPCFrameLowering::spillCalleeSavedRegisters().
|
inline |
Definition at line 197 of file PPCSubtarget.h.
References DeprecatedDST.
|
inline |
Definition at line 196 of file PPCSubtarget.h.
References DeprecatedMFTB.
|
inline |
Definition at line 172 of file PPCSubtarget.h.
References IsJITCodeModel.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
|
inline |
Definition at line 175 of file PPCSubtarget.h.
References IsLittleEndian.
|
inline |
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
Definition at line 154 of file PPCSubtarget.h.
References IsPPC64.
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::PPC::createFastISel(), 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::PPCRegisterInfo::getBaseRegister(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCFrameLowering::getCalleeSavedSpillSlots(), llvm::PPCRegisterInfo::getCallPreservedMask(), getDataLayoutString(), 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().
|
inline |
Definition at line 209 of file PPCSubtarget.h.
References isDarwin().
Referenced by llvm::PPC::createFastISel(), 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().
void PPCSubtarget::overrideSchedPolicy | ( | MachineSchedPolicy & | Policy, |
MachineInstr * | begin, | ||
MachineInstr * | end, | ||
unsigned | NumRegionInstrs | ||
) | const |
Definition at line 201 of file PPCSubtarget.cpp.
References DarwinDirective, needsAggressiveScheduling(), llvm::MachineSchedPolicy::OnlyBottomUp, llvm::MachineSchedPolicy::OnlyTopDown, and llvm::MachineSchedPolicy::ShouldTrackPressure.
ParseSubtargetFeatures - Parses features string setting specified subtarget options. Definition of function is auto generated by tblgen.
|
virtual |
Reset the features for the PowerPC target.
Definition at line 54 of file PPCSubtarget.cpp.
References llvm::X86II::FS, llvm::AttributeSet::getAttribute(), llvm::Function::getAttributes(), llvm::MachineFunction::getFunction(), llvm::Attribute::getValueAsString(), llvm::Attribute::hasAttribute(), and llvm::Attribute::None.
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 44 of file PPCSubtarget.cpp.
References HasLazyResolverStubs, and IsJITCodeModel.
Referenced by llvm::PPCTargetMachine::addCodeEmitter().
|
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 163 of file PPCSubtarget.h.
References Use64BitRegs.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering().
bool PPCSubtarget::useAA | ( | ) | const |
Definition at line 215 of file PPCSubtarget.cpp.
References DarwinDirective, and needsAggressiveScheduling().
|
protected |
Which cpu directive was used.
Definition at line 70 of file PPCSubtarget.h.
Referenced by enableMachineScheduler(), getDarwinDirective(), overrideSchedPolicy(), and useAA().
|
protected |
Definition at line 93 of file PPCSubtarget.h.
Referenced by isDeprecatedDST().
|
protected |
Definition at line 92 of file PPCSubtarget.h.
Referenced by isDeprecatedMFTB().
|
protected |
Definition at line 74 of file PPCSubtarget.h.
Referenced by has64BitSupport().
|
protected |
Definition at line 77 of file PPCSubtarget.h.
Referenced by hasAltivec().
|
protected |
Definition at line 80 of file PPCSubtarget.h.
Referenced by hasFCPSGN().
|
protected |
Definition at line 87 of file PPCSubtarget.h.
Referenced by hasFPCVT().
|
protected |
Definition at line 86 of file PPCSubtarget.h.
Referenced by hasFPRND().
|
protected |
Definition at line 82 of file PPCSubtarget.h.
Referenced by hasFRE().
|
protected |
Definition at line 82 of file PPCSubtarget.h.
Referenced by hasFRES().
|
protected |
Definition at line 82 of file PPCSubtarget.h.
Referenced by hasFRSQRTE().
|
protected |
Definition at line 82 of file PPCSubtarget.h.
Referenced by hasFRSQRTES().
|
protected |
Definition at line 81 of file PPCSubtarget.h.
Referenced by hasFSQRT().
|
protected |
Definition at line 88 of file PPCSubtarget.h.
Referenced by hasISEL().
|
protected |
Definition at line 94 of file PPCSubtarget.h.
Referenced by hasLazyResolverStub(), and SetJITMode().
|
protected |
Definition at line 90 of file PPCSubtarget.h.
Referenced by hasLDBRX().
|
protected |
Definition at line 85 of file PPCSubtarget.h.
Referenced by hasLFIWAX().
|
protected |
Used by the ISel to turn in optimizations for POWER4-derived architectures.
Definition at line 73 of file PPCSubtarget.h.
Referenced by hasMFOCRF().
|
protected |
Definition at line 89 of file PPCSubtarget.h.
Referenced by hasPOPCNTD().
|
protected |
Definition at line 78 of file PPCSubtarget.h.
Referenced by hasQPX().
|
protected |
Definition at line 83 of file PPCSubtarget.h.
Referenced by hasRecipPrec().
|
protected |
Definition at line 84 of file PPCSubtarget.h.
Referenced by hasSTFIWX().
|
protected |
Definition at line 79 of file PPCSubtarget.h.
|
protected |
Selected instruction itineraries (one entry per itinerary class.)
Definition at line 67 of file PPCSubtarget.h.
Referenced by getInstrItineraryData().
|
protected |
Definition at line 91 of file PPCSubtarget.h.
Referenced by isBookE().
|
protected |
Definition at line 95 of file PPCSubtarget.h.
Referenced by isJITCodeModel(), and SetJITMode().
|
protected |
Definition at line 96 of file PPCSubtarget.h.
Referenced by isLittleEndian().
|
protected |
Definition at line 76 of file PPCSubtarget.h.
Referenced by isPPC64().
|
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().
|
protected |
TargetTriple - What processor and OS we're targeting.
Definition at line 99 of file PPCSubtarget.h.
Referenced by getDataLayoutString(), getTargetTriple(), isBGP(), isBGQ(), and isDarwin().
|
protected |
Definition at line 75 of file PPCSubtarget.h.
Referenced by use64BitRegs().