13#ifndef LLVM_LIB_TARGET_POWERPC_PPCSUBTARGET_H
14#define LLVM_LIB_TARGET_POWERPC_PPCSUBTARGET_H
28#define GET_SUBTARGETINFO_HEADER
29#include "PPCGenSubtargetInfo.inc"
35class SelectionDAGTargetInfo;
92#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
93 bool ATTRIBUTE = DEFAULT;
94#include "PPCGenSubtargetInfo.inc"
110 std::unique_ptr<const SelectionDAGTargetInfo>
TSInfo;
123 const std::string &TuneCPU,
const std::string &FS,
170 void initializeEnvironment();
182 return !HasHardFloat;
189#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
190 bool GETTER() const { return ATTRIBUTE; }
191#include "PPCGenSubtargetInfo.inc"
243 unsigned NumRegionInstrs)
const override;
244 bool useAA()
const override;
268 "Should only be called when the target uses descriptors.");
274 "Should only be called when the target uses descriptors.");
280 "Should only be called when the target uses descriptors.");
281 return IsPPC64 ? PPC::X11 : PPC::R11;
286 "Should only be called when the target is a TOC based ABI.");
287 return IsPPC64 ? PPC::X2 : PPC::R2;
292 "Should only be called for targets with a thread pointer register.");
293 return IsPPC64 ? PPC::X13 : PPC::R13;
297 return IsPPC64 ? PPC::X1 : PPC::R1;
303 return PredictableSelectIsExpensive;
This file describes how to lower LLVM calls to machine code calls.
Interface for Targets to specify which operations they can successfully select and how the others sho...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Itinerary data supplied by a subtarget to be used by a target.
Wrapper class representing physical registers. Should be passed by value.
const PPCRegisterInfo & getRegisterInfo() const
getRegisterInfo - TargetInstrInfo is a superset of MRegister info.
std::unique_ptr< InstructionSelector > InstSelector
bool enableMachinePipeliner() const override
Pipeliner customization.
bool useDFAforSMS() const override
Machine Pipeliner customization.
bool is32BitELFABI() const
std::unique_ptr< LegalizerInfo > Legalizer
unsigned descriptorTOCAnchorOffset() const
bool isTargetMachO() const
MVT getScalarIntVT() const
PPCFrameLowering FrameLowering
const CallLowering * getCallLowering() const override
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
const LegalizerInfo * getLegalizerInfo() const override
unsigned getGPRAllocationOrderIdx() const
bool useSoftFloat() const
std::unique_ptr< RegisterBankInfo > RegBankInfo
bool isXRaySupported() const override
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
Align StackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
const PPCFrameLowering * getFrameLowering() const override
bool needsSwapsForVSXMemOps() const
void overrideSchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const override
bool isPPC64() const
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override
bool isUsingPCRelativeCalls() const
bool enableSubRegLiveness() const override
bool usesFunctionDescriptors() const
True if the ABI is descriptor based.
const PPCTargetLowering * getTargetLowering() const override
const InstrItineraryData * getInstrItineraryData() const override
getInstrItins - Return the instruction itineraries based on subtarget selection.
InstructionSelector * getInstructionSelector() const override
bool enableEarlyIfConversion() const override
Originally, this function return hasISEL().
MCRegister getEnvironmentPointerRegister() const
unsigned CPUDirective
Which cpu directive was used.
const PPCInstrInfo * getInstrInfo() const override
unsigned getRedZoneSize() const
AntiDepBreakMode getAntiDepBreakMode() const override
MCRegister getThreadPointerRegister() const
unsigned getCPUDirective() const
getCPUDirective - Returns the -m directive specified for the cpu.
bool enableSpillageCopyElimination() const override
POPCNTDKind hasPOPCNTD() const
bool isLittleEndian() const
bool isTargetLinux() const
MCRegister getTOCPointerRegister() const
MCRegister getStackPointerRegister() const
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
bool useAA() const override
Align getStackAlignment() const
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the fu...
PPCSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef TuneCPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU, a TuneCPU, and feature string so that we c...
bool is64BitELFABI() const
CodeModel::Model getCodeModel(const TargetMachine &TM, const GlobalValue *GV) const
Calculates the effective code model for argument GV.
Align getPlatformStackAlignment() const
const PPCTargetMachine & getTargetMachine() const
const PPCTargetMachine & TM
bool isPredictableSelectIsExpensive() const
std::unique_ptr< const SelectionDAGTargetInfo > TSInfo
bool enableMachineScheduler() const override
Scheduling customization.
const RegisterBankInfo * getRegBankInfo() const override
const PPCRegisterInfo * getRegisterInfo() const override
bool isGVIndirectSymbol(const GlobalValue *GV) const
True if the GV will be accessed via an indirect symbol.
const Triple & getTargetTriple() const
unsigned descriptorEnvironmentPointerOffset() const
std::unique_ptr< CallLowering > CallLoweringInfo
GlobalISel related APIs.
bool enablePostRAScheduler() const override
This overrides the PostRAScheduler bit in the SchedModel for each CPU.
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
Common code between 32-bit and 64-bit PowerPC targets.
Holds all the information related to register banks.
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
StringRef - Represent a constant reference to a string, i.e.
Primary interface to the complete machine description for the target machine.
Triple - Helper class for working with autoconf configuration names.
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
bool isOSLinux() const
Tests whether the OS is Linux.
bool isOSAIX() const
Tests whether the OS is AIX.
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
This is an optimization pass for GlobalISel generic memory operations.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.