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 InstrItineraryData * getInstrItineraryData () const override
 getInstrItins - Return the instruction itineraries based on subtarget selection.
const PPCFrameLowering * getFrameLowering () const override
const PPCInstrInfo * getInstrInfo () const override
const PPCTargetLowering * getTargetLowering () const override
const SelectionDAGTargetInfo * getSelectionDAGInfo () const override
const PPCRegisterInfo * getRegisterInfo () const override
const PPCTargetMachine & getTargetMachine () const
const PPCOptions & getCLOpts () const
bool enableAutoPairedVecSt () const
 Paired vector stores (STXVP) are enabled by default for -mcpu=future.
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.
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 CallLowering * getCallLowering () const override
const RegisterBankInfo * getRegBankInfo () const override
const LegalizerInfo * getLegalizerInfo () const override
InstructionSelector * getInstructionSelector () const override

Protected Attributes

const PPCOptions & CLOpts
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 PPCTargetMachine & TM
PPCFrameLowering FrameLowering
PPCInstrInfo InstrInfo
PPCTargetLowering TLInfo
std::unique_ptr< const SelectionDAGTargetInfo > TSInfo
std::unique_ptr< CallLowering > CallLoweringInfo
 GlobalISel related APIs.
std::unique_ptr< LegalizerInfo > Legalizer
std::unique_ptr< RegisterBankInfo > RegBankInfo
std::unique_ptr< InstructionSelector > InstSelector

Detailed Description

Definition at line 92 of file PPCSubtarget.h.

Member Enumeration Documentation

◆ POPCNTDKind

Enumerator
POPCNTD_Unavailable 
POPCNTD_Slow 
POPCNTD_Fast 

Definition at line 94 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 52 of file PPCSubtarget.cpp.

References CallLoweringInfo, CLOpts, llvm::createPPCInstructionSelector(), FrameLowering, getCLOpts(), 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 299 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

◆ descriptorTOCAnchorOffset()

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

Definition at line 293 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

◆ enableAutoPairedVecSt()

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

Paired vector stores (STXVP) are enabled by default for -mcpu=future.

Definition at line 183 of file PPCSubtarget.h.

References CLOpts, CPUDirective, llvm::PPC::DIR_PWR_FUTURE, and llvm::valueOr().

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

◆ enableMachinePipeliner()

bool PPCSubtarget::enableMachinePipeliner ( ) const
override

Pipeliner customization.

Definition at line 154 of file PPCSubtarget.cpp.

◆ enableMachineScheduler()

bool PPCSubtarget::enableMachineScheduler ( ) const
override

Scheduling customization.

Definition at line 152 of file PPCSubtarget.cpp.

◆ enablePostRAScheduler()

bool PPCSubtarget::enablePostRAScheduler ( ) const
override

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

Definition at line 161 of file PPCSubtarget.cpp.

◆ enableSpillageCopyElimination()

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

Definition at line 275 of file PPCSubtarget.h.

◆ enableSubRegLiveness()

bool PPCSubtarget::enableSubRegLiveness ( ) const
override

Definition at line 190 of file PPCSubtarget.cpp.

◆ getAntiDepBreakMode()

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

Definition at line 163 of file PPCSubtarget.cpp.

◆ getCallLowering()

const CallLowering * PPCSubtarget::getCallLowering ( ) const
override

Definition at line 258 of file PPCSubtarget.cpp.

References CallLoweringInfo.

◆ getCLOpts()

const PPCOptions & llvm::PPCSubtarget::getCLOpts ( ) const
inline

Definition at line 181 of file PPCSubtarget.h.

References CLOpts.

Referenced by PPCSubtarget().

◆ getCodeModel()

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

Calculates the effective code model for argument GV.

Definition at line 210 of file PPCSubtarget.cpp.

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

Referenced by getCodeModel().

◆ getCPUDirective()

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

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

Definition at line 159 of file PPCSubtarget.h.

References CPUDirective.

◆ getCriticalPathRCs()

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

Definition at line 167 of file PPCSubtarget.cpp.

◆ getEnvironmentPointerRegister()

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

Definition at line 305 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

◆ getFrameLowering()

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

Definition at line 167 of file PPCSubtarget.h.

References FrameLowering.

◆ getGlueCodeDescriptorRegister()

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

Definition at line 327 of file PPCSubtarget.h.

◆ getGPRAllocationOrderIdx()

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

Definition at line 339 of file PPCSubtarget.h.

References is64BitELFABI(), and isAIXABI().

◆ getInstrInfo()

const PPCInstrInfo * llvm::PPCSubtarget::getInstrInfo ( ) const
inlineoverride

Definition at line 170 of file PPCSubtarget.h.

References InstrInfo.

Referenced by getRegisterInfo().

◆ getInstrItineraryData()

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

getInstrItins - Return the instruction itineraries based on subtarget selection.

Definition at line 163 of file PPCSubtarget.h.

References InstrItins.

◆ getInstructionSelector()

InstructionSelector * PPCSubtarget::getInstructionSelector ( ) const
override

Definition at line 270 of file PPCSubtarget.cpp.

References InstSelector.

◆ getLegalizerInfo()

const LegalizerInfo * PPCSubtarget::getLegalizerInfo ( ) const
override

Definition at line 266 of file PPCSubtarget.cpp.

References Legalizer.

◆ getPlatformStackAlignment()

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

Definition at line 215 of file PPCSubtarget.h.

◆ getRedZoneSize()

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

Definition at line 219 of file PPCSubtarget.h.

References isAIXABI().

◆ getRegBankInfo()

const RegisterBankInfo * PPCSubtarget::getRegBankInfo ( ) const
override

Definition at line 262 of file PPCSubtarget.cpp.

References RegBankInfo.

◆ getRegisterInfo()

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

◆ getScalarIntVT()

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

Definition at line 280 of file PPCSubtarget.h.

◆ getSelectionDAGInfo()

const SelectionDAGTargetInfo * PPCSubtarget::getSelectionDAGInfo ( ) const
override

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

References StackAlignment.

◆ getStackPointerRegister()

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

Definition at line 323 of file PPCSubtarget.h.

◆ getTargetLowering()

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

Definition at line 171 of file PPCSubtarget.h.

References TLInfo.

Referenced by PPCSubtarget().

◆ getTargetMachine()

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

Definition at line 180 of file PPCSubtarget.h.

References TM.

Referenced by computeBasePointerSaveOffset(), and isUsingPCRelativeCalls().

◆ getThreadPointerRegister()

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

Definition at line 317 of file PPCSubtarget.h.

References assert(), is64BitELFABI(), and isAIXABI().

◆ getTOCPointerRegister()

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

Definition at line 311 of file PPCSubtarget.h.

References assert(), is64BitELFABI(), and isAIXABI().

◆ hasPOPCNTD()

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

Definition at line 233 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 44 of file PPCSubtarget.cpp.

References PPCSubtarget().

Referenced by PPCSubtarget().

◆ is32BitELFABI()

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

Definition at line 250 of file PPCSubtarget.h.

References isSVR4ABI().

Referenced by computeBasePointerSaveOffset().

◆ is64BitELFABI()

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

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

References llvm::PPC_ABI_AIX_EXTABI, and TargetABI.

◆ isELFv2ABI()

bool PPCSubtarget::isELFv2ABI ( ) const

◆ isGVIndirectSymbol()

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

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

Definition at line 192 of file PPCSubtarget.cpp.

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

◆ isLittleEndian()

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

Definition at line 208 of file PPCSubtarget.h.

References IsLittleEndian.

Referenced by needsSwapsForVSXMemOps().

◆ isPredictableSelectIsExpensive()

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

Definition at line 333 of file PPCSubtarget.h.

◆ isSVR4ABI()

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

◆ isTargetELF()

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

Definition at line 235 of file PPCSubtarget.h.

◆ isTargetLinux()

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

Definition at line 237 of file PPCSubtarget.h.

◆ isTargetMachO()

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

Definition at line 236 of file PPCSubtarget.h.

◆ isUsingPCRelativeCalls()

bool PPCSubtarget::isUsingPCRelativeCalls ( ) const

◆ isXRaySupported()

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

Definition at line 331 of file PPCSubtarget.h.

References IsLittleEndian.

◆ needsSwapsForVSXMemOps()

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

Definition at line 229 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 186 of file PPCSubtarget.cpp.

◆ useDFAforSMS()

bool PPCSubtarget::useDFAforSMS ( ) const
override

Machine Pipeliner customization.

Definition at line 158 of file PPCSubtarget.cpp.

◆ usesFunctionDescriptors()

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

True if the ABI is descriptor based.

Definition at line 287 of file PPCSubtarget.h.

References is64BitELFABI(), isAIXABI(), and isELFv2ABI().

Referenced by descriptorEnvironmentPointerOffset(), descriptorTOCAnchorOffset(), and getEnvironmentPointerRegister().

◆ useSoftFloat()

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

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

Referenced by getCallLowering(), and PPCSubtarget().

◆ CLOpts

const PPCOptions& llvm::PPCSubtarget::CLOpts
protected

Definition at line 101 of file PPCSubtarget.h.

Referenced by enableAutoPairedVecSt(), getCLOpts(), and PPCSubtarget().

◆ CPUDirective

unsigned llvm::PPCSubtarget::CPUDirective
protected

Which cpu directive was used.

Definition at line 116 of file PPCSubtarget.h.

Referenced by enableAutoPairedVecSt(), and getCPUDirective().

◆ FrameLowering

PPCFrameLowering llvm::PPCSubtarget::FrameLowering
protected

Definition at line 126 of file PPCSubtarget.h.

Referenced by getFrameLowering(), and PPCSubtarget().

◆ HasPOPCNTD

POPCNTDKind llvm::PPCSubtarget::HasPOPCNTD
protected

Definition at line 123 of file PPCSubtarget.h.

Referenced by hasPOPCNTD().

◆ InstrInfo

PPCInstrInfo llvm::PPCSubtarget::InstrInfo
protected

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

Referenced by getInstrItineraryData().

◆ InstSelector

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

Definition at line 137 of file PPCSubtarget.h.

Referenced by getInstructionSelector(), and PPCSubtarget().

◆ IsLittleEndian

bool llvm::PPCSubtarget::IsLittleEndian
protected

Definition at line 118 of file PPCSubtarget.h.

Referenced by isLittleEndian(), and isXRaySupported().

◆ Legalizer

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

Definition at line 135 of file PPCSubtarget.h.

Referenced by getLegalizerInfo(), and PPCSubtarget().

◆ RegBankInfo

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

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

Referenced by getStackAlignment().

◆ TargetABI

PPCABI llvm::PPCSubtarget::TargetABI = PPC_ABI_UNKNOWN
protected

The selected ABI variant.

Definition at line 121 of file PPCSubtarget.h.

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

◆ TLInfo

PPCTargetLowering llvm::PPCSubtarget::TLInfo
protected

Definition at line 128 of file PPCSubtarget.h.

Referenced by getTargetLowering(), and PPCSubtarget().

◆ TM

const PPCTargetMachine& llvm::PPCSubtarget::TM
protected

Definition at line 125 of file PPCSubtarget.h.

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

◆ TSInfo

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

Definition at line 131 of file PPCSubtarget.h.

Referenced by getSelectionDAGInfo(), and PPCSubtarget().


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