36#define DEBUG_TYPE "ppc-subtarget" 
   38#define GET_SUBTARGETINFO_TARGET_DESC 
   39#define GET_SUBTARGETINFO_CTOR 
   40#include "PPCGenSubtargetInfo.inc" 
   44                           cl::desc(
"Enable Machine Pipeliner for PPC"),
 
   50  initializeEnvironment();
 
   51  initSubtargetFeatures(CPU, TuneCPU, FS);
 
 
   60  TSInfo = std::make_unique<PPCSelectionDAGInfo>();
 
 
   76void PPCSubtarget::initializeEnvironment() {
 
   85  std::string CPUName = std::string(CPU);
 
   86  if (CPUName.empty() || CPU == 
"generic") {
 
   94  if (TuneCPU.
empty()) TuneCPU = CPUName;
 
  104  if (IsPPC64 && has64BitSupport())
 
  107  if (getTargetTriple().isPPC32SecurePlt())
 
  110  if (HasSPE && IsPPC64)
 
  112  if (HasSPE && (HasAltivec || HasVSX || HasFPU))
 
  114        "SPE and traditional floating point cannot both be enabled.\n", 
false);
 
  125  if (HasAIXSmallLocalExecTLS || HasAIXSmallLocalDynamicTLS) {
 
  126    if (!getTargetTriple().isOSAIX() || !IsPPC64)
 
  128                         "only supported on AIX in " 
  136    if (!
TM.getDataSections())
 
  138                         "only be specified with " 
  143  if (HasAIXShLibTLSModelOpt && (!getTargetTriple().isOSAIX() || !IsPPC64))
 
  145                       "is only supported on AIX in 64-bit mode.\n",
 
  161  return TargetSubtargetInfo::ANTIDEP_ALL;
 
 
  165  CriticalPathRCs.clear();
 
  166  CriticalPathRCs.push_back(isPPC64() ?
 
  167                            &PPC::G8RCRegClass : &PPC::GPRCRegClass);
 
 
  193      return !GVar->hasAttribute(
"toc-data");
 
  202  if (
TM.shouldAssumeDSOLocal(GV))
 
 
  219  assert(GV && 
"Unexpected NULL GlobalValue");
 
  236  std::optional<CodeModel::Model> MaybeCodeModel = GlobalVar->getCodeModel();
 
  237  if (MaybeCodeModel) {
 
  240           "invalid code model for AIX");
 
 
  250  return isPPC64() && hasPCRelativeMemops() && 
isELFv2ABI() &&
 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
 
static cl::opt< bool > EnableMachinePipeliner("aarch64-enable-pipeliner", cl::desc("Enable Machine Pipeliner for AArch64"), cl::init(false), cl::Hidden)
 
This file describes how to lower LLVM calls to machine code calls.
 
This file declares the targeting of the Machinelegalizer class for PowerPC.
 
This file declares the targeting of the RegisterBankInfo class for PowerPC.
 
static cl::opt< bool > EnableMachinePipeliner("ppc-enable-pipeliner", cl::desc("Enable Machine Pipeliner for PPC"), cl::init(false), cl::Hidden)
 
LLVM_ABI const GlobalObject * getAliaseeObject() const
 
This class provides the information for the PowerPC target legalizer for GlobalISel.
 
std::unique_ptr< InstructionSelector > InstSelector
 
bool enableMachinePipeliner() const override
Pipeliner customization.
 
bool useDFAforSMS() const override
Machine Pipeliner customization.
 
std::unique_ptr< LegalizerInfo > Legalizer
 
PPCFrameLowering FrameLowering
 
const CallLowering * getCallLowering() const override
 
const LegalizerInfo * getLegalizerInfo() const override
 
std::unique_ptr< RegisterBankInfo > RegBankInfo
 
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 ...
 
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override
 
bool isUsingPCRelativeCalls() const
 
bool enableSubRegLiveness() const override
 
const PPCTargetLowering * getTargetLowering() const override
 
InstructionSelector * getInstructionSelector() const override
 
unsigned CPUDirective
Which cpu directive was used.
 
AntiDepBreakMode getAntiDepBreakMode() const override
 
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
 
bool useAA() const override
 
PPCSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef TuneCPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU, a TuneCPU, and feature string so that we c...
 
CodeModel::Model getCodeModel(const TargetMachine &TM, const GlobalValue *GV) const
Calculates the effective code model for argument GV.
 
PPCSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, const PPCTargetMachine &TM)
This constructor initializes the data members to match that of the specified triple.
 
Align getPlatformStackAlignment() const
 
const PPCTargetMachine & getTargetMachine() const
 
const PPCTargetMachine & TM
 
std::unique_ptr< const SelectionDAGTargetInfo > TSInfo
 
bool enableMachineScheduler() const override
Scheduling customization.
 
void overrideSchedPolicy(MachineSchedPolicy &Policy, const SchedRegion &Region) const override
 
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.
 
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.
 
constexpr bool empty() const
empty - Check if the string is empty.
 
Primary interface to the complete machine description for the target machine.
 
CodeModel::Model getCodeModel() const
Returns the code model.
 
Triple - Helper class for working with autoconf configuration names.
 
LLVM_ABI StringRef getNormalizedPPCTargetCPU(const Triple &T, StringRef CPUName="")
 
initializer< Ty > init(const Ty &Val)
 
This is an optimization pass for GlobalISel generic memory operations.
 
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
 
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
 
InstructionSelector * createPPCInstructionSelector(const PPCTargetMachine &TM, const PPCSubtarget &Subtarget, const PPCRegisterBankInfo &RBI)
 
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.
 
A region of an MBB for scheduling.