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() {
107 std::string CPUName = CPU;
108 if (CPUName.empty()) {
117 InstrItins = getInstrItineraryForCPU(CPUName);
159 default:
return false;
185 CriticalPathRCs.clear();
186 CriticalPathRCs.push_back(
isPPC64() ?
187 &PPC::G8RCRegClass : &PPC::GPRCRegClass);
193 unsigned NumRegionInstrs)
const {
const_iterator end(StringRef path)
Get end iterator over path.
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 ...
const_iterator begin(StringRef path)
Get begin iterator over path.
bool isDarwin() const
isDarwin - True if this is any darwin platform.
bool hasCommonLinkage() 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.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
void overrideSchedPolicy(MachineSchedPolicy &Policy, MachineInstr *begin, MachineInstr *end, unsigned NumRegionInstrs) const override
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...
static bool needsAggressiveScheduling(unsigned Directive)
bool hasHiddenVisibility() const
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...
PPCTargetMachine - Common code between 32-bit and 64-bit PowerPC targets.
bool hasWeakLinkage() 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
bool hasLinkOnceLinkage() const
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.
Representation of each machine instruction.
static cl::opt< bool > UseSubRegLiveness("ppc-track-subreg-liveness", cl::desc("Enable subregister liveness tracking for PPC"), cl::Hidden)
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
bool isPPC64() const
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
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 enablePostRAScheduler() const override