LLVM API Documentation

Public Member Functions | Protected Types | 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, PPCTargetMachine &TM, CodeGenOpt::Level OptLevel)
void ParseSubtargetFeatures (StringRef CPU, StringRef FS)
unsigned getStackAlignment () const
unsigned getDarwinDirective () const
const InstrItineraryDatagetInstrItineraryData () const override
const PPCFrameLoweringgetFrameLowering () const override
const DataLayoutgetDataLayout () const override
const PPCInstrInfogetInstrInfo () const override
const PPCTargetLoweringgetTargetLowering () const override
const PPCSelectionDAGInfogetSelectionDAGInfo () const override
const PPCRegisterInfogetRegisterInfo () const override
PPCSubtargetinitializeSubtargetDependencies (StringRef CPU, StringRef FS)
bool isPPC64 () const
bool has64BitSupport () const
bool use64BitRegs () const
bool useCRBits () const
bool hasLazyResolverStub (const GlobalValue *GV, const TargetMachine &TM) 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 hasSPE () const
bool hasQPX () const
bool hasVSX () const
bool hasMFOCRF () const
bool hasISEL () const
bool hasPOPCNTD () const
bool hasLDBRX () const
bool isBookE () const
bool isPPC4xx () const
bool isPPC6xx () const
bool isE500 () const
bool isDeprecatedMFTB () const
bool isDeprecatedDST () const
const TriplegetTargetTriple () const
bool isDarwin () const
 isDarwin - True if this is any darwin platform.
bool isBGQ () const
 isBGQ - True if this is a BG/Q platform.
bool isTargetELF () const
bool isTargetMachO () const
bool isDarwinABI () const
bool isSVR4ABI () const
bool isELFv2ABI () const
bool enableEarlyIfConversion () const override
bool enableMachineScheduler () const override
bool enablePostMachineScheduler () const override
AntiDepBreakMode getAntiDepBreakMode () const override
void getCriticalPathRCs (RegClassVector &CriticalPathRCs) const override
void overrideSchedPolicy (MachineSchedPolicy &Policy, MachineInstr *begin, MachineInstr *end, unsigned NumRegionInstrs) const override
bool useAA () const override

Protected Types

enum  { PPC_ABI_UNKNOWN, PPC_ABI_ELFv1, PPC_ABI_ELFv2 }

Protected Attributes

Triple TargetTriple
 TargetTriple - What processor and OS we're targeting.
const DataLayout DL
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 UseCRBits
bool IsPPC64
bool HasAltivec
bool HasSPE
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 IsE500
bool IsPPC4xx
bool IsPPC6xx
bool DeprecatedMFTB
bool DeprecatedDST
bool HasLazyResolverStubs
bool IsLittleEndian
CodeGenOpt::Level OptLevel
 OptLevel - What default optimization level we're emitting code for.
enum llvm::PPCSubtarget:: { ... }  TargetABI
PPCFrameLowering FrameLowering
PPCInstrInfo InstrInfo
PPCTargetLowering TLInfo
PPCSelectionDAGInfo TSInfo

Detailed Description

Definition at line 66 of file PPCSubtarget.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
PPC_ABI_UNKNOWN 
PPC_ABI_ELFv1 
PPC_ABI_ELFv2 

Definition at line 117 of file PPCSubtarget.h.


Constructor & Destructor Documentation

PPCSubtarget::PPCSubtarget ( const std::string &  TT,
const std::string &  CPU,
const std::string &  FS,
PPCTargetMachine TM,
CodeGenOpt::Level  OptLevel 
)

This constructor initializes the data members to match that of the specified triple.

Definition at line 76 of file PPCSubtarget.cpp.


Member Function Documentation

bool llvm::PPCSubtarget::enableEarlyIfConversion ( ) const [inline, override]

Definition at line 246 of file PPCSubtarget.h.

References hasISEL().

Definition at line 233 of file PPCSubtarget.cpp.

PPCGenSubtargetInfo::AntiDepBreakMode PPCSubtarget::getAntiDepBreakMode ( ) const [override]

Definition at line 235 of file PPCSubtarget.cpp.

References llvm::TargetSubtargetInfo::ANTIDEP_ALL.

void PPCSubtarget::getCriticalPathRCs ( RegClassVector &  CriticalPathRCs) const [override]

Definition at line 239 of file PPCSubtarget.cpp.

References isPPC64().

getDarwinDirective - Returns the -m directive specified for the cpu.

Definition at line 147 of file PPCSubtarget.h.

References DarwinDirective.

Referenced by llvm::PPCInstrInfo::getOperandLatency(), llvm::PPCInstrInfo::insertNoop(), and llvm::PPCTargetLowering::PPCTargetLowering().

const DataLayout* llvm::PPCSubtarget::getDataLayout ( ) const [inline, override]

Definition at line 158 of file PPCSubtarget.h.

References DL.

Definition at line 155 of file PPCSubtarget.h.

References FrameLowering.

const PPCInstrInfo* llvm::PPCSubtarget::getInstrInfo ( ) const [inline, override]

Definition at line 159 of file PPCSubtarget.h.

References InstrInfo.

Referenced by getRegisterInfo().

getInstrItins - Return the instruction itineraries based on subtarget selection.

Definition at line 151 of file PPCSubtarget.h.

References InstrItins.

Definition at line 166 of file PPCSubtarget.h.

References getInstrInfo(), and llvm::PPCInstrInfo::getRegisterInfo().

Definition at line 163 of file PPCSubtarget.h.

References TSInfo.

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 143 of file PPCSubtarget.h.

References StackAlignment.

Definition at line 160 of file PPCSubtarget.h.

References TLInfo.

Definition at line 232 of file PPCSubtarget.h.

References TargetTriple.

Referenced by PrepareCall().

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 185 of file PPCSubtarget.h.

References Has64BitSupport.

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

bool llvm::PPCSubtarget::hasFCPSGN ( ) const [inline]

Definition at line 206 of file PPCSubtarget.h.

References HasFCPSGN.

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

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

Definition at line 216 of file PPCSubtarget.h.

References HasFPCVT.

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

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

Definition at line 215 of file PPCSubtarget.h.

References HasFPRND.

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

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

Definition at line 208 of file PPCSubtarget.h.

References HasFRE.

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

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

Definition at line 209 of file PPCSubtarget.h.

References HasFRES.

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

Definition at line 210 of file PPCSubtarget.h.

References HasFRSQRTE.

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

Definition at line 211 of file PPCSubtarget.h.

References HasFRSQRTES.

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

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

Definition at line 207 of file PPCSubtarget.h.

References HasFSQRT.

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

bool llvm::PPCSubtarget::hasISEL ( ) const [inline]

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 197 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 224 of file PPCSubtarget.h.

References HasLDBRX.

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

Definition at line 214 of file PPCSubtarget.h.

References HasLFIWAX.

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

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

Definition at line 221 of file PPCSubtarget.h.

References HasMFOCRF.

Definition at line 223 of file PPCSubtarget.h.

References HasPOPCNTD.

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

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

Definition at line 219 of file PPCSubtarget.h.

References HasQPX.

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

Definition at line 212 of file PPCSubtarget.h.

References HasRecipPrec.

bool llvm::PPCSubtarget::hasSPE ( ) const [inline]

Definition at line 218 of file PPCSubtarget.h.

References HasSPE.

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

Definition at line 213 of file PPCSubtarget.h.

References HasSTFIWX.

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

bool llvm::PPCSubtarget::hasVSX ( ) const [inline]

initializeSubtargetDependencies - Initializes using a CPU and feature string so that we can use initializer lists for subtarget initialization.

Definition at line 69 of file PPCSubtarget.cpp.

bool llvm::PPCSubtarget::isBGQ ( ) const [inline]

isBGQ - True if this is a BG/Q platform.

Definition at line 237 of file PPCSubtarget.h.

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

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

Definition at line 225 of file PPCSubtarget.h.

References IsBookE.

bool llvm::PPCSubtarget::isDarwin ( ) const [inline]

Definition at line 230 of file PPCSubtarget.h.

References DeprecatedDST.

Definition at line 229 of file PPCSubtarget.h.

References DeprecatedMFTB.

bool llvm::PPCSubtarget::isE500 ( ) const [inline]

Definition at line 228 of file PPCSubtarget.h.

References IsE500.

Definition at line 203 of file PPCSubtarget.h.

References IsLittleEndian.

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

bool llvm::PPCSubtarget::isPPC4xx ( ) const [inline]

Definition at line 226 of file PPCSubtarget.h.

References IsPPC4xx.

bool llvm::PPCSubtarget::isPPC64 ( ) const [inline]

isPPC64 - Return true if we are generating code for 64-bit pointer mode.

Definition at line 181 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(), llvm::PPCInstrInfo::FoldImmediate(), llvm::PPCRegisterInfo::getBaseRegister(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCFrameLowering::getCalleeSavedSpillSlots(), llvm::PPCRegisterInfo::getCallPreservedMask(), getCriticalPathRCs(), llvm::PPCRegisterInfo::getFrameRegister(), llvm::PPCTargetLowering::getOptimalMemOpType(), llvm::PPCRegisterInfo::getPointerRegClass(), llvm::PPCTargetLowering::getRegForInlineAsmConstraint(), llvm::PPCTargetLowering::getRegisterByName(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::hasReservedSpillSlot(), llvm::PPCInstrInfo::InsertBranch(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), 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::isPPC6xx ( ) const [inline]

Definition at line 227 of file PPCSubtarget.h.

References IsPPC6xx.

bool llvm::PPCSubtarget::isSVR4ABI ( ) const [inline]

Definition at line 239 of file PPCSubtarget.h.

References llvm::Triple::isOSBinFormatELF(), and TargetTriple.

Referenced by PrepareCall().

Definition at line 240 of file PPCSubtarget.h.

References llvm::Triple::isOSBinFormatMachO(), and TargetTriple.

void PPCSubtarget::overrideSchedPolicy ( MachineSchedPolicy Policy,
MachineInstr begin,
MachineInstr end,
unsigned  NumRegionInstrs 
) const [override]

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

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 190 of file PPCSubtarget.h.

References Use64BitRegs.

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

bool PPCSubtarget::useAA ( ) const [override]

Definition at line 259 of file PPCSubtarget.cpp.

References DarwinDirective, and needsAggressiveScheduling().

bool llvm::PPCSubtarget::useCRBits ( ) const [inline]

useCRBits - Return true if we should store and manipulate i1 values in the individual condition register bits.

Definition at line 194 of file PPCSubtarget.h.

References UseCRBits.

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


Member Data Documentation

Which cpu directive was used.

Definition at line 82 of file PPCSubtarget.h.

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

Definition at line 110 of file PPCSubtarget.h.

Referenced by isDeprecatedDST().

Definition at line 109 of file PPCSubtarget.h.

Referenced by isDeprecatedMFTB().

Definition at line 72 of file PPCSubtarget.h.

Referenced by getDataLayout().

Definition at line 123 of file PPCSubtarget.h.

Referenced by getFrameLowering().

Definition at line 86 of file PPCSubtarget.h.

Referenced by has64BitSupport().

Definition at line 90 of file PPCSubtarget.h.

Referenced by hasAltivec().

Definition at line 94 of file PPCSubtarget.h.

Referenced by hasFCPSGN().

Definition at line 101 of file PPCSubtarget.h.

Referenced by hasFPCVT().

Definition at line 100 of file PPCSubtarget.h.

Referenced by hasFPRND().

Definition at line 96 of file PPCSubtarget.h.

Referenced by hasFRE().

Definition at line 96 of file PPCSubtarget.h.

Referenced by hasFRES().

Definition at line 96 of file PPCSubtarget.h.

Referenced by hasFRSQRTE().

Definition at line 96 of file PPCSubtarget.h.

Referenced by hasFRSQRTES().

Definition at line 95 of file PPCSubtarget.h.

Referenced by hasFSQRT().

Definition at line 102 of file PPCSubtarget.h.

Referenced by hasISEL().

Definition at line 111 of file PPCSubtarget.h.

Referenced by hasLazyResolverStub().

Definition at line 104 of file PPCSubtarget.h.

Referenced by hasLDBRX().

Definition at line 99 of file PPCSubtarget.h.

Referenced by hasLFIWAX().

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

Definition at line 85 of file PPCSubtarget.h.

Referenced by hasMFOCRF().

Definition at line 103 of file PPCSubtarget.h.

Referenced by hasPOPCNTD().

Definition at line 92 of file PPCSubtarget.h.

Referenced by hasQPX().

Definition at line 97 of file PPCSubtarget.h.

Referenced by hasRecipPrec().

Definition at line 91 of file PPCSubtarget.h.

Referenced by hasSPE().

Definition at line 98 of file PPCSubtarget.h.

Referenced by hasSTFIWX().

Definition at line 93 of file PPCSubtarget.h.

Referenced by hasVSX().

Definition at line 124 of file PPCSubtarget.h.

Referenced by getInstrInfo().

Selected instruction itineraries (one entry per itinerary class.)

Definition at line 79 of file PPCSubtarget.h.

Referenced by getInstrItineraryData().

Definition at line 105 of file PPCSubtarget.h.

Referenced by isBookE().

Definition at line 106 of file PPCSubtarget.h.

Referenced by isE500().

Definition at line 112 of file PPCSubtarget.h.

Referenced by isLittleEndian().

Definition at line 107 of file PPCSubtarget.h.

Referenced by isPPC4xx().

Definition at line 89 of file PPCSubtarget.h.

Referenced by isPPC64().

Definition at line 108 of file PPCSubtarget.h.

Referenced by isPPC6xx().

OptLevel - What default optimization level we're emitting code for.

Definition at line 115 of file PPCSubtarget.h.

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 76 of file PPCSubtarget.h.

Referenced by getStackAlignment().

enum { ... } llvm::PPCSubtarget::TargetABI [protected]

Referenced by isELFv2ABI().

TargetTriple - What processor and OS we're targeting.

Definition at line 69 of file PPCSubtarget.h.

Referenced by getTargetTriple(), isBGQ(), isDarwin(), isTargetELF(), and isTargetMachO().

Definition at line 125 of file PPCSubtarget.h.

Referenced by getTargetLowering().

Definition at line 126 of file PPCSubtarget.h.

Referenced by getSelectionDAGInfo().

Definition at line 87 of file PPCSubtarget.h.

Referenced by use64BitRegs().

Definition at line 88 of file PPCSubtarget.h.

Referenced by useCRBits().


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