LLVM API Documentation

Public Member Functions | Protected Attributes
llvm::PPCSubtarget Class Reference

#include <PPCSubtarget.h>

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

List of all members.

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

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 29 of file PPCSubtarget.cpp.

References llvm::X86II::FS, llvm::sys::getHostCPUName(), Has64BitSupport, has64BitSupport(), HasLazyResolverStubs, hasQPX(), InstrItins, isBGQ(), isDarwin(), ParseSubtargetFeatures(), StackAlignment, Use64BitRegs, and use64BitRegs().


Member Function Documentation

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]
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]
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]

Definition at line 174 of file PPCSubtarget.h.

References HasQPX.

Referenced by PPCSubtarget().

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]
bool llvm::PPCSubtarget::isDarwinABI ( ) const [inline]
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]
void llvm::PPCSubtarget::ParseSubtargetFeatures ( StringRef  CPU,
StringRef  FS 
)

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


Member Data Documentation

Which cpu directive was used.

Definition at line 70 of file PPCSubtarget.h.

Referenced by getDarwinDirective().

Definition at line 74 of file PPCSubtarget.h.

Referenced by has64BitSupport(), and PPCSubtarget().

Definition at line 77 of file PPCSubtarget.h.

Referenced by hasAltivec().

Definition at line 85 of file PPCSubtarget.h.

Referenced by hasFPCVT().

Definition at line 84 of file PPCSubtarget.h.

Referenced by hasFPRND().

Definition at line 80 of file PPCSubtarget.h.

Referenced by hasFRE().

Definition at line 80 of file PPCSubtarget.h.

Referenced by hasFRES().

Definition at line 80 of file PPCSubtarget.h.

Referenced by hasFRSQRTE().

Definition at line 80 of file PPCSubtarget.h.

Referenced by hasFRSQRTES().

Definition at line 79 of file PPCSubtarget.h.

Referenced by hasFSQRT().

Definition at line 86 of file PPCSubtarget.h.

Referenced by hasISEL().

Definition at line 90 of file PPCSubtarget.h.

Referenced by hasLazyResolverStub(), PPCSubtarget(), and SetJITMode().

Definition at line 88 of file PPCSubtarget.h.

Referenced by hasLDBRX().

Definition at line 83 of file PPCSubtarget.h.

Referenced by hasLFIWAX().

Used by the ISel to turn in optimizations for POWER4-derived architectures.

Definition at line 73 of file PPCSubtarget.h.

Referenced by hasMFOCRF().

Definition at line 87 of file PPCSubtarget.h.

Referenced by hasPOPCNTD().

Definition at line 78 of file PPCSubtarget.h.

Referenced by hasQPX().

Definition at line 81 of file PPCSubtarget.h.

Referenced by hasRecipPrec().

Definition at line 82 of file PPCSubtarget.h.

Referenced by hasSTFIWX().

Selected instruction itineraries (one entry per itinerary class.)

Definition at line 67 of file PPCSubtarget.h.

Referenced by getInstrItineraryData(), and PPCSubtarget().

Definition at line 89 of file PPCSubtarget.h.

Referenced by isBookE().

Definition at line 91 of file PPCSubtarget.h.

Referenced by isJITCodeModel(), and SetJITMode().

Definition at line 76 of file PPCSubtarget.h.

Referenced by isPPC64().

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

TargetTriple - What processor and OS we're targeting.

Definition at line 94 of file PPCSubtarget.h.

Referenced by getDataLayoutString(), getTargetTriple(), isBGP(), isBGQ(), and isDarwin().

Definition at line 75 of file PPCSubtarget.h.

Referenced by PPCSubtarget(), and use64BitRegs().


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