30 #define DEBUG_TYPE "ppc-subtarget"
32 #define GET_SUBTARGETINFO_TARGET_DESC
33 #define GET_SUBTARGETINFO_CTOR
34 #include "PPCGenSubtargetInfo.inc"
40 cl::desc(
"Even when QPX is enabled the stack is not 32-byte aligned"),
45 initializeEnvironment();
46 initSubtargetFeatures(CPU, FS);
53 IsPPC64(TargetTriple.getArch() ==
Triple::ppc64 ||
54 TargetTriple.getArch() ==
Triple::ppc64le),
55 TM(TM), FrameLowering(initializeSubtargetDependencies(CPU, FS)),
56 InstrInfo(*this), TLInfo(TM, *this) {}
58 void PPCSubtarget::initializeEnvironment() {
115 std::string CPUName = CPU;
116 if (CPUName.empty() || CPU ==
"generic") {
125 InstrItins = getInstrItineraryForCPU(CPUName);
169 default:
return false;
197 CriticalPathRCs.clear();
198 CriticalPathRCs.push_back(
isPPC64() ?
199 &PPC::G8RCRegClass : &PPC::GPRCRegClass);
203 unsigned NumRegionInstrs)
const {
void overrideSchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const override
PPCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const PPCTargetMachine &TM)
This constructor initializes the data members to match that of the specified triple.
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
bool IsQPXStackUnaligned
When targeting QPX running a stock PPC64 Linux kernel where the stack alignment has not been changed...
bool useAA() const override
bool hasLazyResolverStub(const GlobalValue *GV) const
hasLazyResolverStub - Return true if accesses to the specified global have to go through a dyld lazy ...
unsigned StackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
bool isDarwin() const
isDarwin - True if this is any darwin platform.
bool hasCommonLinkage() const
bool hasDefaultVisibility() const
unsigned getPlatformStackAlignment() const
This file contains the simple types necessary to represent the attributes associated with functions a...
unsigned DarwinDirective
Which cpu directive was used.
bool isStrongDefinitionForLinker() const
Returns true if this global's definition will be the one chosen by the linker.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
bool enableSubRegLiveness() const override
CodeModel::Model getCodeModel() const
Returns the code model.
AntiDepBreakMode getAntiDepBreakMode() const override
PPCSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU and feature string so that we can use initi...
MO_NLP_FLAG - If this bit is set, the symbol reference is actually to the non_lazy_ptr for the global...
static bool needsAggressiveScheduling(unsigned Directive)
bool HasInvariantFunctionDescriptors
static cl::opt< bool > QPXStackUnaligned("qpx-stack-unaligned", cl::desc("Even when QPX is enabled the stack is not 32-byte aligned"), cl::Hidden)
bool has64BitSupport() const
has64BitSupport - Return true if the selected CPU supports 64-bit instructions, regardless of whether...
Common code between 32-bit and 64-bit PowerPC targets.
bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const
const PPCTargetMachine & TM
Triple - Helper class for working with autoconf configuration names.
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
bool enableMachineScheduler() const override
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.
static cl::opt< bool > UseSubRegLiveness("ppc-track-subreg-liveness", cl::desc("Enable subregister liveness tracking for PPC"), cl::Hidden)
bool hasLocalLinkage() const
bool isPPC64() const
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
unsigned char classifyGlobalReference(const GlobalValue *GV) const
classifyGlobalReference - Classify a global variable reference for the current subtarget accourding t...
Module * getParent()
Get the module that this global value is contained inside of...
StringRef - Represent a constant reference to a string, i.e.
bool HasMFOCRF
Used by the ISel to turn in optimizations for POWER4-derived architectures.
bool HasLazyResolverStubs
bool isDeclarationForLinker() const
MO_PIC_FLAG - If this bit is set, the symbol reference is relative to the function's picbase...
bool enablePostRAScheduler() const override