LLVM 22.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, 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 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
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
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 72 of file PPCSubtarget.h.

Member Enumeration Documentation

◆ POPCNTDKind

Enumerator
POPCNTD_Unavailable 
POPCNTD_Slow 
POPCNTD_Fast 

Definition at line 74 of file PPCSubtarget.h.

Constructor & Destructor Documentation

◆ PPCSubtarget()

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

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

Definition at line 55 of file PPCSubtarget.cpp.

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

Referenced by initializeSubtargetDependencies().

◆ ~PPCSubtarget()

PPCSubtarget::~PPCSubtarget ( )
overridedefault

Member Function Documentation

◆ descriptorEnvironmentPointerOffset()

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

Definition at line 262 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

Referenced by prepareDescriptorIndirectCall().

◆ descriptorTOCAnchorOffset()

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

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

◆ enableMachinePipeliner()

bool PPCSubtarget::enableMachinePipeliner ( ) const
override

Pipeliner customization.

Definition at line 151 of file PPCSubtarget.cpp.

References EnableMachinePipeliner.

◆ enableMachineScheduler()

bool PPCSubtarget::enableMachineScheduler ( ) const
override

Scheduling customization.

Definition at line 149 of file PPCSubtarget.cpp.

◆ enablePostRAScheduler()

bool PPCSubtarget::enablePostRAScheduler ( ) const
override

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

Definition at line 158 of file PPCSubtarget.cpp.

◆ enableSpillageCopyElimination()

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

Definition at line 238 of file PPCSubtarget.h.

◆ enableSubRegLiveness()

bool PPCSubtarget::enableSubRegLiveness ( ) const
override

Definition at line 187 of file PPCSubtarget.cpp.

◆ getAntiDepBreakMode()

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

Definition at line 160 of file PPCSubtarget.cpp.

◆ getCallLowering()

const CallLowering * PPCSubtarget::getCallLowering ( ) const
override

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

References CPUDirective.

◆ getCriticalPathRCs()

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

Definition at line 164 of file PPCSubtarget.cpp.

◆ getEnvironmentPointerRegister()

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

Definition at line 268 of file PPCSubtarget.h.

References assert(), and usesFunctionDescriptors().

Referenced by buildCallOperands(), and prepareDescriptorIndirectCall().

◆ getFrameLowering()

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

◆ getGPRAllocationOrderIdx()

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

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

References InstrItins.

◆ getInstructionSelector()

InstructionSelector * PPCSubtarget::getInstructionSelector ( ) const
override

Definition at line 267 of file PPCSubtarget.cpp.

References InstSelector.

◆ getLegalizerInfo()

const LegalizerInfo * PPCSubtarget::getLegalizerInfo ( ) const
override

Definition at line 263 of file PPCSubtarget.cpp.

References Legalizer.

◆ getPlatformStackAlignment()

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

Definition at line 184 of file PPCSubtarget.h.

◆ getRedZoneSize()

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

Definition at line 188 of file PPCSubtarget.h.

References isAIXABI().

◆ getRegBankInfo()

const RegisterBankInfo * PPCSubtarget::getRegBankInfo ( ) const
override

Definition at line 259 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 72 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 130 of file PPCSubtarget.h.

References StackAlignment.

◆ getStackPointerRegister()

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

◆ getTargetLowering()

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

Definition at line 146 of file PPCSubtarget.h.

References TLInfo.

Referenced by PPCSubtarget().

◆ getTargetMachine()

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

Definition at line 155 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 202 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 47 of file PPCSubtarget.cpp.

References PPCSubtarget().

Referenced by PPCSubtarget().

◆ is32BitELFABI()

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

◆ is64BitELFABI()

◆ isAIXABI()

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

◆ isSVR4ABI()

◆ isTargetELF()

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

Definition at line 204 of file PPCSubtarget.h.

◆ isTargetLinux()

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

Definition at line 206 of file PPCSubtarget.h.

◆ isTargetMachO()

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

Definition at line 205 of file PPCSubtarget.h.

◆ isUsingPCRelativeCalls()

◆ isXRaySupported()

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

Definition at line 290 of file PPCSubtarget.h.

References IsLittleEndian.

◆ needsSwapsForVSXMemOps()

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

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

◆ useDFAforSMS()

bool PPCSubtarget::useDFAforSMS ( ) const
override

Machine Pipeliner customization.

Definition at line 155 of file PPCSubtarget.cpp.

◆ usesFunctionDescriptors()

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

◆ useSoftFloat()

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

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

Referenced by getCallLowering(), and PPCSubtarget().

◆ CPUDirective

unsigned llvm::PPCSubtarget::CPUDirective
protected

Which cpu directive was used.

Definition at line 94 of file PPCSubtarget.h.

Referenced by getCPUDirective().

◆ FrameLowering

PPCFrameLowering llvm::PPCSubtarget::FrameLowering
protected

Definition at line 101 of file PPCSubtarget.h.

Referenced by getFrameLowering(), and PPCSubtarget().

◆ HasPOPCNTD

POPCNTDKind llvm::PPCSubtarget::HasPOPCNTD
protected

Definition at line 98 of file PPCSubtarget.h.

Referenced by hasPOPCNTD().

◆ InstrInfo

PPCInstrInfo llvm::PPCSubtarget::InstrInfo
protected

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

Referenced by getInstrItineraryData().

◆ InstSelector

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

Definition at line 112 of file PPCSubtarget.h.

Referenced by getInstructionSelector(), and PPCSubtarget().

◆ IsLittleEndian

bool llvm::PPCSubtarget::IsLittleEndian
protected

Definition at line 96 of file PPCSubtarget.h.

Referenced by isLittleEndian(), and isXRaySupported().

◆ Legalizer

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

Definition at line 110 of file PPCSubtarget.h.

Referenced by getLegalizerInfo(), and PPCSubtarget().

◆ RegBankInfo

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

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

Referenced by getStackAlignment().

◆ TLInfo

PPCTargetLowering llvm::PPCSubtarget::TLInfo
protected

Definition at line 103 of file PPCSubtarget.h.

Referenced by getTargetLowering(), and PPCSubtarget().

◆ TM

const PPCTargetMachine& llvm::PPCSubtarget::TM
protected

◆ TSInfo

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

Definition at line 106 of file PPCSubtarget.h.

Referenced by getSelectionDAGInfo(), and PPCSubtarget().


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