13 #ifndef LLVM_LIB_TARGET_POWERPC_PPCSUBTARGET_H 14 #define LLVM_LIB_TARGET_POWERPC_PPCSUBTARGET_H 26 #define GET_SUBTARGETINFO_HEADER 27 #include "PPCGenSubtargetInfo.inc" 187 return &FrameLowering;
197 return &getInstrInfo()->getRegisterInfo();
206 void initializeEnvironment();
212 bool isPPC64()
const;
219 if (isAIXABI() && !HasHardFloat)
221 return !HasHardFloat;
236 bool hasLazyResolverStub(
const GlobalValue *GV)
const;
282 return HasInvariantFunctionDescriptors;
291 if ((hasQPX() || isBGQ()) && !isQPXStackUnaligned())
300 return isDarwinABI() ? 224 : (isPPC64() ? 288 : 0);
308 return hasVSX() && isLittleEndian() && !hasP9Vector();
326 bool isSVR4ABI()
const {
return !isDarwinABI() && !isAIXABI(); }
327 bool isELFv2ABI()
const;
337 bool enableMachineScheduler()
const override;
339 bool enableMachinePipeliner()
const override;
341 bool useDFAforSMS()
const override;
343 bool enablePostRAScheduler()
const override;
344 AntiDepBreakMode getAntiDepBreakMode()
const override;
345 void getCriticalPathRCs(RegClassVector &CriticalPathRCs)
const override;
348 unsigned NumRegionInstrs)
const override;
349 bool useAA()
const override;
351 bool enableSubRegLiveness()
const override;
354 bool isGVIndirectSymbol(
const GlobalValue *GV)
const;
360 return isAIXABI() || (is64BitELFABI() && !isELFv2ABI());
364 assert(usesFunctionDescriptors() &&
365 "Should only be called when the target uses descriptors.");
366 return IsPPC64 ? 8 : 4;
370 assert(usesFunctionDescriptors() &&
371 "Should only be called when the target uses descriptors.");
372 return IsPPC64 ? 16 : 8;
376 assert(usesFunctionDescriptors() &&
377 "Should only be called when the target uses descriptors.");
378 return IsPPC64 ? PPC::X11 : PPC::R11;
382 assert((is64BitELFABI() || isAIXABI()) &&
383 "Should only be called when the target is a TOC based ABI.");
384 return IsPPC64 ? PPC::X2 :
PPC::R2;
388 return IsPPC64 ? PPC::X1 : PPC::R1;
unsigned descriptorEnvironmentPointerOffset() const
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
bool enableEarlyIfConversion() const override
Originally, this function return hasISEL().
Wrapper class representing physical registers. Should be passed by value.
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 isMacOSX() const
isMacOSX - Is this a Mac OS X triple.
Align getPlatformStackAlignment() const
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
Align getStackAlignment() const
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the fu...
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
MCRegister getStackPointerRegister() const
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 isBGQ() const
isBGQ - True if this is a BG/Q platform.
bool isTargetLinux() const
bool needsTwoConstNR() const
bool UsePPCPreRASchedStrategy
SelectionDAGTargetInfo TSInfo
bool hasDirectMove() const
bool is64BitELFABI() const
bool useSoftFloat() const
bool has64BitSupport() const
has64BitSupport - Return true if the selected CPU supports 64-bit instructions, regardless of whether...
unsigned descriptorTOCAnchorOffset() const
Itinerary data supplied by a subtarget to be used by a target.
const PPCTargetMachine & getTargetMachine() const
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
bool hasInvariantFunctionDescriptors() const
bool allowsUnalignedFPAccess() const
bool usesFunctionDescriptors() const
True if the ABI is descriptor based.
bool vectorsUseTwoUnits() const
VendorType getVendor() const
getVendor - Get the parsed vendor type of this triple.
bool HasInvariantFunctionDescriptors
PPCFrameLowering FrameLowering
const PPCFrameLowering * getFrameLowering() const override
bool hasPartwordAtomics() const
static bool isDarwin(object::Archive::Kind Kind)
const PPCTargetLowering * getTargetLowering() const override
bool isQPXStackUnaligned() const
unsigned getCPUDirective() const
getCPUDirective - Returns the -m directive specified for the cpu.
Common code between 32-bit and 64-bit PowerPC targets.
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
bool isLittleEndian() const
unsigned getDarwinDirective() const
getDarwinDirective - Returns the -m directive specified for the cpu.
const PPCTargetMachine & TM
This struct is a compact representation of a valid (non-zero power of two) alignment.
bool AllowsUnalignedFPAccess
Triple - Helper class for working with autoconf configuration names.
bool isOSAIX() const
Tests whether the OS is AIX.
const PPCRegisterInfo * getRegisterInfo() const override
const PPCInstrInfo * getInstrInfo() const override
bool is32BitELFABI() const
bool isOSLinux() const
Tests whether the OS is Linux.
bool isFeatureMFTB() const
bool hasP8Altivec() const
bool UsePPCPostRASchedStrategy
bool hasP9Altivec() const
unsigned getRedZoneSize() const
bool hasRecipPrec() const
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
bool useLongCalls() const
bool use64BitRegs() const
use64BitRegs - Return true if in 64-bit mode or if we should use 64-bit registers in 32-bit mode when...
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.
const InstrItineraryData * getInstrItineraryData() const override
getInstrItins - Return the instruction itineraries based on subtarget selection.
MCRegister getTOCPointerRegister() const
bool useCRBits() const
useCRBits - Return true if we should store and manipulate i1 values in the individual condition regis...
bool isDarwin() const
isDarwin - True if this is any darwin platform.
MCRegister getEnvironmentPointerRegister() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool usePPCPostRASchedStrategy() const
POPCNTDKind hasPOPCNTD() const
bool needsSwapsForVSXMemOps() const
bool isTargetMachO() const
Primary interface to the complete machine description for the target machine.
bool usePPCPreRASchedStrategy() const
StringRef - Represent a constant reference to a string, i.e.
bool isXRaySupported() const override
bool HasMFOCRF
Used by the ISel to turn in optimizations for POWER4-derived architectures.
bool HasLazyResolverStubs
unsigned CPUDirective
Which cpu directive was used.
const Triple & getTargetTriple() const
bool hasOnlyMSYNC() const
bool isDeprecatedDST() const