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);
58 void PPCSubtarget::initializeEnvironment() {
117 std::string CPUName = CPU;
118 if (CPUName.empty() || CPU ==
"generic") {
127 InstrItins = getInstrItineraryForCPU(CPUName);
148 "SPE and traditional floating point cannot both be enabled.\n",
false);
189 return TargetSubtargetInfo::ANTIDEP_ALL;
193 CriticalPathRCs.clear();
194 CriticalPathRCs.push_back(
isPPC64() ?
195 &PPC::G8RCRegClass : &PPC::GPRCRegClass);
199 unsigned NumRegionInstrs)
const {
bool isDeclarationForLinker() 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.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
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...
bool IsQPXStackUnaligned
When targeting QPX running a stock PPC64 Linux kernel where the stack alignment has not been changed...
bool useAA() const override
unsigned StackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
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 hasCommonLinkage() const
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
bool has64BitSupport() const
has64BitSupport - Return true if the selected CPU supports 64-bit instructions, regardless of whether...
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const
bool enableSubRegLiveness() const override
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...
bool HasInvariantFunctionDescriptors
PPCFrameLowering FrameLowering
static cl::opt< bool > QPXStackUnaligned("qpx-stack-unaligned", cl::desc("Even when QPX is enabled the stack is not 32-byte aligned"), cl::Hidden)
Common code between 32-bit and 64-bit PowerPC targets.
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.
CodeModel::Model getCodeModel() const
Returns the code model.
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 hasLazyResolverStub(const GlobalValue *GV) const
hasLazyResolverStub - Return true if accesses to the specified global have to go through a dyld lazy ...
bool isDarwin() const
isDarwin - True if this is any darwin platform.
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
MO_PIC_FLAG - If this bit is set, the symbol reference is relative to the function's picbase...
bool enablePostRAScheduler() const override