LLVM API Documentation

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

#include <PPCSubtarget.h>

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

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 InstrItineraryDatagetInstrItineraryData () 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 TriplegetTargetTriple () 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...
 

Detailed Description

Definition at line 60 of file PPCSubtarget.h.

Constructor & Destructor Documentation

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().

Member Function Documentation

bool PPCSubtarget::enableMachineScheduler ( ) const
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().

unsigned llvm::PPCSubtarget::getDarwinDirective ( ) const
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().

const char* llvm::PPCSubtarget::getDataLayoutString ( ) const
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.

const InstrItineraryData& llvm::PPCSubtarget::getInstrItineraryData ( ) const
inline

getInstrItins - Return the instruction itineraies based on subtarget selection.

Definition at line 127 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 119 of file PPCSubtarget.h.

References StackAlignment.

const Triple& llvm::PPCSubtarget::getTargetTriple ( ) const
inline

Definition at line 199 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 158 of file PPCSubtarget.h.

References Has64BitSupport.

Referenced by llvm::PPCTargetLowering::PerformDAGCombine(), and llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasAltivec ( ) const
inline
bool llvm::PPCSubtarget::hasFCPSGN ( ) const
inline

Definition at line 178 of file PPCSubtarget.h.

References HasFCPSGN.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFPCVT ( ) const
inline

Definition at line 188 of file PPCSubtarget.h.

References HasFPCVT.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFPRND ( ) const
inline

Definition at line 187 of file PPCSubtarget.h.

References HasFPRND.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFRE ( ) const
inline

Definition at line 180 of file PPCSubtarget.h.

References HasFRE.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFRES ( ) const
inline

Definition at line 181 of file PPCSubtarget.h.

References HasFRES.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFRSQRTE ( ) const
inline

Definition at line 182 of file PPCSubtarget.h.

References HasFRSQRTE.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFRSQRTES ( ) const
inline

Definition at line 183 of file PPCSubtarget.h.

References HasFRSQRTES.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasFSQRT ( ) const
inline

Definition at line 179 of file PPCSubtarget.h.

References HasFSQRT.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasISEL ( ) const
inline
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().

bool llvm::PPCSubtarget::hasLDBRX ( ) const
inline

Definition at line 194 of file PPCSubtarget.h.

References HasLDBRX.

bool llvm::PPCSubtarget::hasLFIWAX ( ) const
inline

Definition at line 186 of file PPCSubtarget.h.

References HasLFIWAX.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasMFOCRF ( ) const
inline

Definition at line 191 of file PPCSubtarget.h.

References HasMFOCRF.

bool llvm::PPCSubtarget::hasPOPCNTD ( ) const
inline

Definition at line 193 of file PPCSubtarget.h.

References HasPOPCNTD.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::hasQPX ( ) const
inline

Definition at line 190 of file PPCSubtarget.h.

References HasQPX.

Referenced by llvm::PPCTargetLowering::getByValTypeAlignment().

bool llvm::PPCSubtarget::hasRecipPrec ( ) const
inline

Definition at line 184 of file PPCSubtarget.h.

References HasRecipPrec.

bool llvm::PPCSubtarget::hasSTFIWX ( ) const
inline

Definition at line 185 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 204 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 206 of file PPCSubtarget.h.

References llvm::Triple::BGQ, llvm::Triple::getVendor(), and TargetTriple.

bool llvm::PPCSubtarget::isBookE ( ) const
inline

Definition at line 195 of file PPCSubtarget.h.

References IsBookE.

bool llvm::PPCSubtarget::isDarwin ( ) const
inline
bool llvm::PPCSubtarget::isDarwinABI ( ) const
inline
bool llvm::PPCSubtarget::isDeprecatedDST ( ) const
inline

Definition at line 197 of file PPCSubtarget.h.

References DeprecatedDST.

bool llvm::PPCSubtarget::isDeprecatedMFTB ( ) const
inline

Definition at line 196 of file PPCSubtarget.h.

References DeprecatedMFTB.

bool llvm::PPCSubtarget::isJITCodeModel ( ) const
inline

Definition at line 172 of file PPCSubtarget.h.

References IsJITCodeModel.

Referenced by llvm::PPCTargetLowering::PPCTargetLowering().

bool llvm::PPCSubtarget::isLittleEndian ( ) const
inline

Definition at line 175 of file PPCSubtarget.h.

References IsLittleEndian.

bool llvm::PPCSubtarget::isPPC64 ( ) const
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().

bool llvm::PPCSubtarget::isSVR4ABI ( ) const
inline
void PPCSubtarget::overrideSchedPolicy ( MachineSchedPolicy Policy,
MachineInstr begin,
MachineInstr end,
unsigned  NumRegionInstrs 
) const
void llvm::PPCSubtarget::ParseSubtargetFeatures ( StringRef  CPU,
StringRef  FS 
)

ParseSubtargetFeatures - Parses features string setting specified subtarget options. Definition of function is auto generated by tblgen.

void PPCSubtarget::resetSubtargetFeatures ( const MachineFunction MF)
virtual
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().

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 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().

Member Data Documentation

unsigned llvm::PPCSubtarget::DarwinDirective
protected

Which cpu directive was used.

Definition at line 70 of file PPCSubtarget.h.

Referenced by enableMachineScheduler(), getDarwinDirective(), overrideSchedPolicy(), and useAA().

bool llvm::PPCSubtarget::DeprecatedDST
protected

Definition at line 93 of file PPCSubtarget.h.

Referenced by isDeprecatedDST().

bool llvm::PPCSubtarget::DeprecatedMFTB
protected

Definition at line 92 of file PPCSubtarget.h.

Referenced by isDeprecatedMFTB().

bool llvm::PPCSubtarget::Has64BitSupport
protected

Definition at line 74 of file PPCSubtarget.h.

Referenced by has64BitSupport().

bool llvm::PPCSubtarget::HasAltivec
protected

Definition at line 77 of file PPCSubtarget.h.

Referenced by hasAltivec().

bool llvm::PPCSubtarget::HasFCPSGN
protected

Definition at line 80 of file PPCSubtarget.h.

Referenced by hasFCPSGN().

bool llvm::PPCSubtarget::HasFPCVT
protected

Definition at line 87 of file PPCSubtarget.h.

Referenced by hasFPCVT().

bool llvm::PPCSubtarget::HasFPRND
protected

Definition at line 86 of file PPCSubtarget.h.

Referenced by hasFPRND().

bool llvm::PPCSubtarget::HasFRE
protected

Definition at line 82 of file PPCSubtarget.h.

Referenced by hasFRE().

bool llvm::PPCSubtarget::HasFRES
protected

Definition at line 82 of file PPCSubtarget.h.

Referenced by hasFRES().

bool llvm::PPCSubtarget::HasFRSQRTE
protected

Definition at line 82 of file PPCSubtarget.h.

Referenced by hasFRSQRTE().

bool llvm::PPCSubtarget::HasFRSQRTES
protected

Definition at line 82 of file PPCSubtarget.h.

Referenced by hasFRSQRTES().

bool llvm::PPCSubtarget::HasFSQRT
protected

Definition at line 81 of file PPCSubtarget.h.

Referenced by hasFSQRT().

bool llvm::PPCSubtarget::HasISEL
protected

Definition at line 88 of file PPCSubtarget.h.

Referenced by hasISEL().

bool llvm::PPCSubtarget::HasLazyResolverStubs
protected

Definition at line 94 of file PPCSubtarget.h.

Referenced by hasLazyResolverStub(), and SetJITMode().

bool llvm::PPCSubtarget::HasLDBRX
protected

Definition at line 90 of file PPCSubtarget.h.

Referenced by hasLDBRX().

bool llvm::PPCSubtarget::HasLFIWAX
protected

Definition at line 85 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 89 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 83 of file PPCSubtarget.h.

Referenced by hasRecipPrec().

bool llvm::PPCSubtarget::HasSTFIWX
protected

Definition at line 84 of file PPCSubtarget.h.

Referenced by hasSTFIWX().

bool llvm::PPCSubtarget::HasVSX
protected

Definition at line 79 of file PPCSubtarget.h.

InstrItineraryData llvm::PPCSubtarget::InstrItins
protected

Selected instruction itineraries (one entry per itinerary class.)

Definition at line 67 of file PPCSubtarget.h.

Referenced by getInstrItineraryData().

bool llvm::PPCSubtarget::IsBookE
protected

Definition at line 91 of file PPCSubtarget.h.

Referenced by isBookE().

bool llvm::PPCSubtarget::IsJITCodeModel
protected

Definition at line 95 of file PPCSubtarget.h.

Referenced by isJITCodeModel(), and SetJITMode().

bool llvm::PPCSubtarget::IsLittleEndian
protected

Definition at line 96 of file PPCSubtarget.h.

Referenced by isLittleEndian().

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().

Triple llvm::PPCSubtarget::TargetTriple
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().

bool llvm::PPCSubtarget::Use64BitRegs
protected

Definition at line 75 of file PPCSubtarget.h.

Referenced by use64BitRegs().


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