LLVM 24.0.0git
llvm::PPCSubtarget Class Reference

#include "Target/PowerPC/PPCSubtarget.h"

Inheritance diagram for llvm::PPCSubtarget:
[legend]

Public Types

enum  POPCNTDKind { POPCNTD_Unavailable , POPCNTD_Slow , POPCNTD_Fast }

Public Member Functions

 PPCSubtarget (const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const PPCTargetMachine &TM)
 This constructor initializes the data members to match that of the specified triple.
 ~PPCSubtarget () override
void ParseSubtargetFeatures (StringRef CPU, StringRef TuneCPU, StringRef FS)
 ParseSubtargetFeatures - Parses features string setting specified subtarget options.
Align getStackAlignment () const
 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.
unsigned getCPUDirective () const
 getCPUDirective - Returns the -m directive specified for the cpu.
const InstrItineraryDatagetInstrItineraryData () const override
 getInstrItins - Return the instruction itineraries based on subtarget selection.
const PPCFrameLoweringgetFrameLowering () const override
const PPCInstrInfogetInstrInfo () const override
const PPCTargetLoweringgetTargetLowering () const override
const SelectionDAGTargetInfogetSelectionDAGInfo () const override
const PPCRegisterInfogetRegisterInfo () const override
const PPCTargetMachinegetTargetMachine () const
PPCSubtargetinitializeSubtargetDependencies (StringRef CPU, StringRef TuneCPU, StringRef FS)
 initializeSubtargetDependencies - Initializes using a CPU, a TuneCPU, and feature string so that we can use initializer lists for subtarget initialization.
bool useSoftFloat () const
bool isLittleEndian () const
Align getPlatformStackAlignment () const
unsigned getRedZoneSize () const
bool needsSwapsForVSXMemOps () const
POPCNTDKind hasPOPCNTD () const
bool isTargetELF () const
bool isTargetMachO () const
bool isTargetLinux () const
bool isAIXABI () const
bool isSVR4ABI () const
bool isELFv2ABI () const
bool isAIXExtendedAltivecABI () const
 Returns true when the AIX extended Altivec ABI ("vec-extabi") is in effect, allowing use of the nonvolatile vector registers.
bool is64BitELFABI () const
bool is32BitELFABI () const
bool isUsingPCRelativeCalls () const
bool enableEarlyIfConversion () const override
 Originally, this function return hasISEL().
bool enableMachineScheduler () const override
 Scheduling customization.
bool enableMachinePipeliner () const override
 Pipeliner customization.
bool useDFAforSMS () const override
 Machine Pipeliner customization.
bool enablePostRAScheduler () const override
 This overrides the PostRAScheduler bit in the SchedModel for each CPU.
AntiDepBreakMode getAntiDepBreakMode () const override
void getCriticalPathRCs (RegClassVector &CriticalPathRCs) const override
void overrideSchedPolicy (MachineSchedPolicy &Policy, const SchedRegion &Region) const override
bool useAA () const override
bool enableSubRegLiveness () const override
bool enableSpillageCopyElimination () const override
bool isGVIndirectSymbol (const GlobalValue *GV) const
 True if the GV will be accessed via an indirect symbol.
MVT getScalarIntVT () const
CodeModel::Model getCodeModel (const TargetMachine &TM, const GlobalValue *GV) const
 Calculates the effective code model for argument GV.
bool usesFunctionDescriptors () const
 True if the ABI is descriptor based.
unsigned descriptorTOCAnchorOffset () const
unsigned descriptorEnvironmentPointerOffset () const
MCRegister getEnvironmentPointerRegister () const
MCRegister getTOCPointerRegister () const
MCRegister getThreadPointerRegister () const
MCRegister getStackPointerRegister () const
MCRegister getGlueCodeDescriptorRegister () const
bool isXRaySupported () const override
bool isPredictableSelectIsExpensive () const
unsigned getGPRAllocationOrderIdx () const
const CallLoweringgetCallLowering () const override
const RegisterBankInfogetRegBankInfo () const override
const LegalizerInfogetLegalizerInfo () const override
InstructionSelectorgetInstructionSelector () const override

Protected Attributes

Align StackAlignment
 stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function.
InstrItineraryData InstrItins
 Selected instruction itineraries (one entry per itinerary class.)
unsigned CPUDirective
 Which cpu directive was used.
bool IsLittleEndian
PPCABI TargetABI = PPC_ABI_UNKNOWN
 The selected ABI variant.
POPCNTDKind HasPOPCNTD
const PPCTargetMachineTM
PPCFrameLowering FrameLowering
PPCInstrInfo InstrInfo
PPCTargetLowering TLInfo
std::unique_ptr< const SelectionDAGTargetInfoTSInfo
std::unique_ptr< CallLoweringCallLoweringInfo
 GlobalISel related APIs.
std::unique_ptr< LegalizerInfoLegalizer
std::unique_ptr< RegisterBankInfoRegBankInfo
std::unique_ptr< InstructionSelectorInstSelector

Detailed Description

Definition at line 71 of file PPCSubtarget.h.

Member Enumeration Documentation

◆ POPCNTDKind

Enumerator
POPCNTD_Unavailable 
POPCNTD_Slow 
POPCNTD_Fast 

Definition at line 73 of file PPCSubtarget.h.

Constructor & Destructor Documentation

◆ PPCSubtarget()

PPCSubtarget::PPCSubtarget ( const Triple & TT,
StringRef CPU,
StringRef TuneCPU,
StringRef FS,
StringRef ABIName,
const PPCTargetMachine & TM )

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

Definition at line 54 of file PPCSubtarget.cpp.

References CallLoweringInfo, llvm::createPPCInstructionSelector(), FrameLowering, getRegisterInfo(), getTargetLowering(), initializeSubtargetDependencies(), InstrInfo, InstSelector, Legalizer, RegBankInfo, TargetABI, TLInfo, TM, and TSInfo.

Referenced by initializeSubtargetDependencies().

◆ ~PPCSubtarget()

PPCSubtarget::~PPCSubtarget ( )
overridedefault

Member Function Documentation

◆ descriptorEnvironmentPointerOffset()

unsigned llvm::PPCSubtarget::descriptorEnvironmentPointerOffset ( ) const
inline

Definition at line 270 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

Referenced by prepareDescriptorIndirectCall().

◆ descriptorTOCAnchorOffset()

unsigned llvm::PPCSubtarget::descriptorTOCAnchorOffset ( ) const
inline

Definition at line 264 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

Referenced by prepareDescriptorIndirectCall().

◆ enableEarlyIfConversion()

bool llvm::PPCSubtarget::enableEarlyIfConversion ( ) const
inlineoverride

Originally, this function return hasISEL().

Now we always enable it, but may expand the ISEL instruction later.

Definition at line 226 of file PPCSubtarget.h.

◆ enableMachinePipeliner()

bool PPCSubtarget::enableMachinePipeliner ( ) const
override

Pipeliner customization.

Definition at line 156 of file PPCSubtarget.cpp.

References EnableMachinePipeliner.

◆ enableMachineScheduler()

bool PPCSubtarget::enableMachineScheduler ( ) const
override

Scheduling customization.

Definition at line 154 of file PPCSubtarget.cpp.

◆ enablePostRAScheduler()

bool PPCSubtarget::enablePostRAScheduler ( ) const
override

This overrides the PostRAScheduler bit in the SchedModel for each CPU.

Definition at line 163 of file PPCSubtarget.cpp.

◆ enableSpillageCopyElimination()

bool llvm::PPCSubtarget::enableSpillageCopyElimination ( ) const
inlineoverride

Definition at line 246 of file PPCSubtarget.h.

◆ enableSubRegLiveness()

bool PPCSubtarget::enableSubRegLiveness ( ) const
override

Definition at line 192 of file PPCSubtarget.cpp.

◆ getAntiDepBreakMode()

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

Definition at line 165 of file PPCSubtarget.cpp.

◆ getCallLowering()

const CallLowering * PPCSubtarget::getCallLowering ( ) const
override

Definition at line 260 of file PPCSubtarget.cpp.

References CallLoweringInfo.

◆ getCodeModel()

CodeModel::Model PPCSubtarget::getCodeModel ( const TargetMachine & TM,
const GlobalValue * GV ) const

Calculates the effective code model for argument GV.

Definition at line 212 of file PPCSubtarget.cpp.

References assert(), llvm::dyn_cast(), llvm::GlobalAlias::getAliaseeObject(), isAIXABI(), llvm::CodeModel::Large, llvm::CodeModel::Small, and TM.

Referenced by getCodeModel(), and getCodeModel().

◆ getCPUDirective()

unsigned llvm::PPCSubtarget::getCPUDirective ( ) const
inline

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

Definition at line 136 of file PPCSubtarget.h.

References CPUDirective.

◆ getCriticalPathRCs()

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

Definition at line 169 of file PPCSubtarget.cpp.

◆ getEnvironmentPointerRegister()

MCRegister llvm::PPCSubtarget::getEnvironmentPointerRegister ( ) const
inline

Definition at line 276 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

Referenced by buildCallOperands(), and prepareDescriptorIndirectCall().

◆ getFrameLowering()

const PPCFrameLowering * llvm::PPCSubtarget::getFrameLowering ( ) const
inlineoverride

◆ getGlueCodeDescriptorRegister()

MCRegister llvm::PPCSubtarget::getGlueCodeDescriptorRegister ( ) const
inline

Definition at line 298 of file PPCSubtarget.h.

Referenced by buildCallOperands(), and prepareOutOfLineGlueCall().

◆ getGPRAllocationOrderIdx()

unsigned llvm::PPCSubtarget::getGPRAllocationOrderIdx ( ) const
inline

Definition at line 310 of file PPCSubtarget.h.

References is64BitELFABI(), and isAIXABI().

◆ getInstrInfo()

◆ getInstrItineraryData()

const InstrItineraryData * llvm::PPCSubtarget::getInstrItineraryData ( ) const
inlineoverride

getInstrItins - Return the instruction itineraries based on subtarget selection.

Definition at line 140 of file PPCSubtarget.h.

References InstrItins.

◆ getInstructionSelector()

InstructionSelector * PPCSubtarget::getInstructionSelector ( ) const
override

Definition at line 272 of file PPCSubtarget.cpp.

References InstSelector.

◆ getLegalizerInfo()

const LegalizerInfo * PPCSubtarget::getLegalizerInfo ( ) const
override

Definition at line 268 of file PPCSubtarget.cpp.

References Legalizer.

◆ getPlatformStackAlignment()

Align llvm::PPCSubtarget::getPlatformStackAlignment ( ) const
inline

Definition at line 186 of file PPCSubtarget.h.

◆ getRedZoneSize()

unsigned llvm::PPCSubtarget::getRedZoneSize ( ) const
inline

Definition at line 190 of file PPCSubtarget.h.

References isAIXABI().

◆ getRegBankInfo()

const RegisterBankInfo * PPCSubtarget::getRegBankInfo ( ) const
override

Definition at line 264 of file PPCSubtarget.cpp.

References RegBankInfo.

◆ getRegisterInfo()

const PPCRegisterInfo * llvm::PPCSubtarget::getRegisterInfo ( ) const
inlineoverride

◆ getScalarIntVT()

MVT llvm::PPCSubtarget::getScalarIntVT ( ) const
inline

◆ getSelectionDAGInfo()

const SelectionDAGTargetInfo * PPCSubtarget::getSelectionDAGInfo ( ) const
override

Definition at line 73 of file PPCSubtarget.cpp.

References TSInfo.

◆ getStackAlignment()

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

References StackAlignment.

◆ getStackPointerRegister()

MCRegister llvm::PPCSubtarget::getStackPointerRegister ( ) const
inline

◆ getTargetLowering()

const PPCTargetLowering * llvm::PPCSubtarget::getTargetLowering ( ) const
inlineoverride

Definition at line 148 of file PPCSubtarget.h.

References TLInfo.

Referenced by PPCSubtarget().

◆ getTargetMachine()

const PPCTargetMachine & llvm::PPCSubtarget::getTargetMachine ( ) const
inline

Definition at line 157 of file PPCSubtarget.h.

References TM.

Referenced by computeBasePointerSaveOffset(), isUsingPCRelativeCalls(), and transformCallee().

◆ getThreadPointerRegister()

MCRegister llvm::PPCSubtarget::getThreadPointerRegister ( ) const
inline

◆ getTOCPointerRegister()

MCRegister llvm::PPCSubtarget::getTOCPointerRegister ( ) const
inline

◆ hasPOPCNTD()

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

Definition at line 204 of file PPCSubtarget.h.

References HasPOPCNTD.

◆ initializeSubtargetDependencies()

PPCSubtarget & PPCSubtarget::initializeSubtargetDependencies ( StringRef CPU,
StringRef TuneCPU,
StringRef FS )

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

Definition at line 46 of file PPCSubtarget.cpp.

References PPCSubtarget().

Referenced by PPCSubtarget().

◆ is32BitELFABI()

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

◆ is64BitELFABI()

◆ isAIXABI()

◆ isAIXExtendedAltivecABI()

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

Returns true when the AIX extended Altivec ABI ("vec-extabi") is in effect, allowing use of the nonvolatile vector registers.

Definition at line 216 of file PPCSubtarget.h.

References llvm::PPC_ABI_AIX_EXTABI, and TargetABI.

Referenced by llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::PPCRegisterInfo::getCallPreservedMask(), llvm::PPCRegisterInfo::getRegPressureLimit(), and llvm::PPCRegisterInfo::getReservedRegs().

◆ isELFv2ABI()

◆ isGVIndirectSymbol()

bool PPCSubtarget::isGVIndirectSymbol ( const GlobalValue * GV) const

True if the GV will be accessed via an indirect symbol.

Definition at line 194 of file PPCSubtarget.cpp.

References llvm::dyn_cast(), isAIXABI(), llvm::CodeModel::Large, and TM.

◆ isLittleEndian()

◆ isPredictableSelectIsExpensive()

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

Definition at line 304 of file PPCSubtarget.h.

◆ isSVR4ABI()

◆ isTargetELF()

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

Definition at line 206 of file PPCSubtarget.h.

◆ isTargetLinux()

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

Definition at line 208 of file PPCSubtarget.h.

◆ isTargetMachO()

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

Definition at line 207 of file PPCSubtarget.h.

◆ isUsingPCRelativeCalls()

◆ isXRaySupported()

bool llvm::PPCSubtarget::isXRaySupported ( ) const
inlineoverride

Definition at line 302 of file PPCSubtarget.h.

References IsLittleEndian.

◆ needsSwapsForVSXMemOps()

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

Definition at line 200 of file PPCSubtarget.h.

References isLittleEndian().

◆ overrideSchedPolicy()

void PPCSubtarget::overrideSchedPolicy ( MachineSchedPolicy & Policy,
const SchedRegion & Region ) const
override

◆ ParseSubtargetFeatures()

void llvm::PPCSubtarget::ParseSubtargetFeatures ( StringRef CPU,
StringRef TuneCPU,
StringRef FS )

ParseSubtargetFeatures - Parses features string setting specified subtarget options.

Definition of function is auto generated by tblgen.

◆ useAA()

bool PPCSubtarget::useAA ( ) const
override

Definition at line 188 of file PPCSubtarget.cpp.

◆ useDFAforSMS()

bool PPCSubtarget::useDFAforSMS ( ) const
override

Machine Pipeliner customization.

Definition at line 160 of file PPCSubtarget.cpp.

◆ usesFunctionDescriptors()

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

◆ useSoftFloat()

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

Definition at line 172 of file PPCSubtarget.h.

References isAIXABI(), and llvm::report_fatal_error().

Member Data Documentation

◆ CallLoweringInfo

std::unique_ptr<CallLowering> llvm::PPCSubtarget::CallLoweringInfo
protected

GlobalISel related APIs.

Definition at line 111 of file PPCSubtarget.h.

Referenced by getCallLowering(), and PPCSubtarget().

◆ CPUDirective

unsigned llvm::PPCSubtarget::CPUDirective
protected

Which cpu directive was used.

Definition at line 93 of file PPCSubtarget.h.

Referenced by getCPUDirective().

◆ FrameLowering

PPCFrameLowering llvm::PPCSubtarget::FrameLowering
protected

Definition at line 103 of file PPCSubtarget.h.

Referenced by getFrameLowering(), and PPCSubtarget().

◆ HasPOPCNTD

POPCNTDKind llvm::PPCSubtarget::HasPOPCNTD
protected

Definition at line 100 of file PPCSubtarget.h.

Referenced by hasPOPCNTD().

◆ InstrInfo

PPCInstrInfo llvm::PPCSubtarget::InstrInfo
protected

Definition at line 104 of file PPCSubtarget.h.

Referenced by getInstrInfo(), and PPCSubtarget().

◆ InstrItins

InstrItineraryData llvm::PPCSubtarget::InstrItins
protected

Selected instruction itineraries (one entry per itinerary class.)

Definition at line 85 of file PPCSubtarget.h.

Referenced by getInstrItineraryData().

◆ InstSelector

std::unique_ptr<InstructionSelector> llvm::PPCSubtarget::InstSelector
protected

Definition at line 114 of file PPCSubtarget.h.

Referenced by getInstructionSelector(), and PPCSubtarget().

◆ IsLittleEndian

bool llvm::PPCSubtarget::IsLittleEndian
protected

Definition at line 95 of file PPCSubtarget.h.

Referenced by isLittleEndian(), and isXRaySupported().

◆ Legalizer

std::unique_ptr<LegalizerInfo> llvm::PPCSubtarget::Legalizer
protected

Definition at line 112 of file PPCSubtarget.h.

Referenced by getLegalizerInfo(), and PPCSubtarget().

◆ RegBankInfo

std::unique_ptr<RegisterBankInfo> llvm::PPCSubtarget::RegBankInfo
protected

Definition at line 113 of file PPCSubtarget.h.

Referenced by getRegBankInfo(), and PPCSubtarget().

◆ StackAlignment

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

Referenced by getStackAlignment().

◆ TargetABI

PPCABI llvm::PPCSubtarget::TargetABI = PPC_ABI_UNKNOWN
protected

The selected ABI variant.

Definition at line 98 of file PPCSubtarget.h.

Referenced by isAIXExtendedAltivecABI(), isELFv2ABI(), and PPCSubtarget().

◆ TLInfo

PPCTargetLowering llvm::PPCSubtarget::TLInfo
protected

Definition at line 105 of file PPCSubtarget.h.

Referenced by getTargetLowering(), and PPCSubtarget().

◆ TM

const PPCTargetMachine& llvm::PPCSubtarget::TM
protected

Definition at line 102 of file PPCSubtarget.h.

Referenced by getCodeModel(), getTargetMachine(), isGVIndirectSymbol(), and PPCSubtarget().

◆ TSInfo

std::unique_ptr<const SelectionDAGTargetInfo> llvm::PPCSubtarget::TSInfo
protected

Definition at line 108 of file PPCSubtarget.h.

Referenced by getSelectionDAGInfo(), and PPCSubtarget().


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