29 #define DEBUG_TYPE "ppc-subtarget" 31 #define GET_SUBTARGETINFO_TARGET_DESC 32 #define GET_SUBTARGETINFO_CTOR 33 #include "PPCGenSubtargetInfo.inc" 39 cl::desc(
"Even when QPX is enabled the stack is not 32-byte aligned"),
44 cl::desc(
"Enable Machine Pipeliner for PPC"),
49 initializeEnvironment();
50 initSubtargetFeatures(CPU, FS);
62 void PPCSubtarget::initializeEnvironment() {
125 std::string CPUName = CPU;
126 if (CPUName.empty() || CPU ==
"generic") {
137 InstrItins = getInstrItineraryForCPU(CPUName);
160 "SPE and traditional floating point cannot both be enabled.\n",
false);
205 return TargetSubtargetInfo::ANTIDEP_ALL;
209 CriticalPathRCs.clear();
210 CriticalPathRCs.push_back(
isPPC64() ?
211 &PPC::G8RCRegClass : &PPC::GPRCRegClass);
215 unsigned NumRegionInstrs)
const {
bool isDeclarationForLinker() const
void overrideSchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const override
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
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.
Align getPlatformStackAlignment() const
bool isPPC64() const
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
bool IsQPXStackUnaligned
When targeting QPX running a stock PPC64 Linux kernel where the stack alignment has not been changed...
Align StackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
bool useAA() const override
bool useDFAforSMS() const override
Machine Pipeliner customization.
bool UsePPCPreRASchedStrategy
This file contains the simple types necessary to represent the attributes associated with functions a...
bool hasCommonLinkage() const
SubArchType getSubArch() const
getSubArch - get the parsed subarchitecture type for this triple.
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 isMusl() const
Tests whether the environment is musl-libc.
initializer< Ty > init(const Ty &Val)
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...
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)
static cl::opt< bool > EnableMachinePipeliner("ppc-enable-pipeliner", cl::desc("Enable Machine Pipeliner for PPC"), cl::init(false), cl::Hidden)
Common code between 32-bit and 64-bit PowerPC targets.
unsigned getOSMajorVersion() const
getOSMajorVersion - Return just the major version number, this is specialized because it is a common ...
const PPCTargetMachine & TM
bool AllowsUnalignedFPAccess
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.
bool UsePPCPostRASchedStrategy
CodeModel::Model getCodeModel() const
Returns the code model.
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
bool enableMachineScheduler() const override
Scheduling customization.
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 enableMachinePipeliner() const override
Pipeliner customization.
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 isGVIndirectSymbol(const GlobalValue *GV) const
True if the GV will be accessed via an indirect symbol.
bool HasMFOCRF
Used by the ISel to turn in optimizations for POWER4-derived architectures.
bool HasLazyResolverStubs
unsigned CPUDirective
Which cpu directive was used.
bool enablePostRAScheduler() const override
This overrides the PostRAScheduler bit in the SchedModel for each CPU.