LLVM  5.0.0
ARMTargetMachine.cpp
Go to the documentation of this file.
1 //===-- ARMTargetMachine.cpp - Define TargetMachine for ARM ---------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "ARM.h"
14 #include "ARMSubtarget.h"
15 #include "ARMMacroFusion.h"
16 #include "ARMTargetMachine.h"
17 #include "ARMTargetObjectFile.h"
18 #include "ARMTargetTransformInfo.h"
20 #include "llvm/ADT/Optional.h"
21 #include "llvm/ADT/STLExtras.h"
22 #include "llvm/ADT/StringRef.h"
23 #include "llvm/ADT/Triple.h"
36 #include "llvm/CodeGen/Passes.h"
38 #include "llvm/IR/Attributes.h"
39 #include "llvm/IR/DataLayout.h"
40 #include "llvm/IR/Function.h"
41 #include "llvm/Pass.h"
42 #include "llvm/Support/CodeGen.h"
49 #include "llvm/Transforms/Scalar.h"
50 #include <cassert>
51 #include <memory>
52 #include <string>
53 
54 using namespace llvm;
55 
56 static cl::opt<bool>
57 DisableA15SDOptimization("disable-a15-sd-optimization", cl::Hidden,
58  cl::desc("Inhibit optimization of S->D register accesses on A15"),
59  cl::init(false));
60 
61 static cl::opt<bool>
62 EnableAtomicTidy("arm-atomic-cfg-tidy", cl::Hidden,
63  cl::desc("Run SimplifyCFG after expanding atomic operations"
64  " to make use of cmpxchg flow-based information"),
65  cl::init(true));
66 
67 static cl::opt<bool>
68 EnableARMLoadStoreOpt("arm-load-store-opt", cl::Hidden,
69  cl::desc("Enable ARM load/store optimization pass"),
70  cl::init(true));
71 
72 // FIXME: Unify control over GlobalMerge.
74 EnableGlobalMerge("arm-global-merge", cl::Hidden,
75  cl::desc("Enable the global merge pass"));
76 
77 namespace llvm {
79 }
80 
81 extern "C" void LLVMInitializeARMTarget() {
82  // Register the target.
87 
89  initializeGlobalISel(Registry);
94 }
95 
96 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
97  if (TT.isOSBinFormatMachO())
98  return llvm::make_unique<TargetLoweringObjectFileMachO>();
99  if (TT.isOSWindows())
100  return llvm::make_unique<TargetLoweringObjectFileCOFF>();
101  return llvm::make_unique<ARMElfTargetObjectFile>();
102 }
103 
106  const TargetOptions &Options) {
108 
109  if (ABIName.empty())
110  ABIName = ARM::computeDefaultTargetABI(TT, CPU);
111 
112  if (ABIName == "aapcs16")
114  else if (ABIName.startswith("aapcs"))
116  else if (ABIName.startswith("apcs"))
118 
119  llvm_unreachable("Unhandled/unknown ABI Name!");
121 }
122 
123 static std::string computeDataLayout(const Triple &TT, StringRef CPU,
124  const TargetOptions &Options,
125  bool isLittle) {
126  auto ABI = computeTargetABI(TT, CPU, Options);
127  std::string Ret;
128 
129  if (isLittle)
130  // Little endian.
131  Ret += "e";
132  else
133  // Big endian.
134  Ret += "E";
135 
137 
138  // Pointers are 32 bits and aligned to 32 bits.
139  Ret += "-p:32:32";
140 
141  // ABIs other than APCS have 64 bit integers with natural alignment.
143  Ret += "-i64:64";
144 
145  // We have 64 bits floats. The APCS ABI requires them to be aligned to 32
146  // bits, others to 64 bits. We always try to align to 64 bits.
148  Ret += "-f64:32:64";
149 
150  // We have 128 and 64 bit vectors. The APCS ABI aligns them to 32 bits, others
151  // to 64. We always ty to give them natural alignment.
153  Ret += "-v64:32:64-v128:32:128";
155  Ret += "-v128:64:128";
156 
157  // Try to align aggregates to 32 bits (the default is 64 bits, which has no
158  // particular hardware support on 32-bit ARM).
159  Ret += "-a:0:32";
160 
161  // Integer registers are 32 bits.
162  Ret += "-n32";
163 
164  // The stack is 128 bit aligned on NaCl, 64 bit aligned on AAPCS and 32 bit
165  // aligned everywhere else.
167  Ret += "-S128";
168  else if (ABI == ARMBaseTargetMachine::ARM_ABI_AAPCS)
169  Ret += "-S64";
170  else
171  Ret += "-S32";
172 
173  return Ret;
174 }
175 
178  if (!RM.hasValue())
179  // Default relocation model on Darwin is PIC.
181 
182  if (*RM == Reloc::ROPI || *RM == Reloc::RWPI || *RM == Reloc::ROPI_RWPI)
183  assert(TT.isOSBinFormatELF() &&
184  "ROPI/RWPI currently only supported for ELF");
185 
186  // DynamicNoPIC is only used on darwin.
187  if (*RM == Reloc::DynamicNoPIC && !TT.isOSDarwin())
188  return Reloc::Static;
189 
190  return *RM;
191 }
192 
193 /// Create an ARM architecture model.
194 ///
196  StringRef CPU, StringRef FS,
197  const TargetOptions &Options,
199  CodeModel::Model CM,
200  CodeGenOpt::Level OL, bool isLittle)
201  : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT,
202  CPU, FS, Options, getEffectiveRelocModel(TT, RM), CM,
203  OL),
204  TargetABI(computeTargetABI(TT, CPU, Options)),
205  TLOF(createTLOF(getTargetTriple())), isLittle(isLittle) {
206 
207  // Default to triple-appropriate float ABI
208  if (Options.FloatABIType == FloatABI::Default) {
214  this->Options.FloatABIType = FloatABI::Hard;
215  else
216  this->Options.FloatABIType = FloatABI::Soft;
217  }
218 
219  // Default to triple-appropriate EABI
220  if (Options.EABIVersion == EABI::Default ||
221  Options.EABIVersion == EABI::Unknown) {
222  // musl is compatible with glibc with regard to EABI version
228  this->Options.EABIVersion = EABI::GNU;
229  else
230  this->Options.EABIVersion = EABI::EABI5;
231  }
232 
233  initAsmInfo();
234 }
235 
237 
238 const ARMSubtarget *
240  Attribute CPUAttr = F.getFnAttribute("target-cpu");
241  Attribute FSAttr = F.getFnAttribute("target-features");
242 
243  std::string CPU = !CPUAttr.hasAttribute(Attribute::None)
244  ? CPUAttr.getValueAsString().str()
245  : TargetCPU;
246  std::string FS = !FSAttr.hasAttribute(Attribute::None)
247  ? FSAttr.getValueAsString().str()
248  : TargetFS;
249 
250  // FIXME: This is related to the code below to reset the target options,
251  // we need to know whether or not the soft float flag is set on the
252  // function before we can generate a subtarget. We also need to use
253  // it as a key for the subtarget since that can be the only difference
254  // between two functions.
255  bool SoftFloat =
256  F.getFnAttribute("use-soft-float").getValueAsString() == "true";
257  // If the soft float attribute is set on the function turn on the soft float
258  // subtarget feature.
259  if (SoftFloat)
260  FS += FS.empty() ? "+soft-float" : ",+soft-float";
261 
262  auto &I = SubtargetMap[CPU + FS];
263  if (!I) {
264  // This needs to be done before we create a new subtarget since any
265  // creation will depend on the TM and the code generation flags on the
266  // function that reside in TargetOptions.
268  I = llvm::make_unique<ARMSubtarget>(TargetTriple, CPU, FS, *this, isLittle);
269  }
270  return I.get();
271 }
272 
274  return TargetIRAnalysis([this](const Function &F) {
275  return TargetTransformInfo(ARMTTIImpl(this, F));
276  });
277 }
278 
279 
281  StringRef CPU, StringRef FS,
282  const TargetOptions &Options,
284  CodeModel::Model CM,
286  : ARMBaseTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, true) {}
287 
289  StringRef CPU, StringRef FS,
290  const TargetOptions &Options,
292  CodeModel::Model CM,
294  : ARMBaseTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {}
295 
296 namespace {
297 
298 /// ARM Code Generator Pass Configuration Options.
299 class ARMPassConfig : public TargetPassConfig {
300 public:
301  ARMPassConfig(ARMBaseTargetMachine &TM, PassManagerBase &PM)
302  : TargetPassConfig(TM, PM) {}
303 
304  ARMBaseTargetMachine &getARMTargetMachine() const {
305  return getTM<ARMBaseTargetMachine>();
306  }
307 
309  createMachineScheduler(MachineSchedContext *C) const override {
311  // add DAG Mutations here.
312  const ARMSubtarget &ST = C->MF->getSubtarget<ARMSubtarget>();
313  if (ST.hasFusion())
315  return DAG;
316  }
317 
319  createPostMachineScheduler(MachineSchedContext *C) const override {
321  // add DAG Mutations here.
322  const ARMSubtarget &ST = C->MF->getSubtarget<ARMSubtarget>();
323  if (ST.hasFusion())
325  return DAG;
326  }
327 
328  void addIRPasses() override;
329  bool addPreISel() override;
330  bool addInstSelector() override;
331 #ifdef LLVM_BUILD_GLOBAL_ISEL
332  bool addIRTranslator() override;
333  bool addLegalizeMachineIR() override;
334  bool addRegBankSelect() override;
335  bool addGlobalInstructionSelect() override;
336 #endif
337  void addPreRegAlloc() override;
338  void addPreSched2() override;
339  void addPreEmitPass() override;
340 };
341 
342 class ARMExecutionDepsFix : public ExecutionDepsFix {
343 public:
344  static char ID;
345  ARMExecutionDepsFix() : ExecutionDepsFix(ID, ARM::DPRRegClass) {}
346  StringRef getPassName() const override {
347  return "ARM Execution Dependency Fix";
348  }
349 };
351 
352 } // end anonymous namespace
353 
354 INITIALIZE_PASS(ARMExecutionDepsFix, "arm-execution-deps-fix",
355  "ARM Execution Dependency Fix", false, false)
356 
357 TargetPassConfig *ARMBaseTargetMachine::createPassConfig(PassManagerBase &PM) {
358  return new ARMPassConfig(*this, PM);
359 }
360 
361 void ARMPassConfig::addIRPasses() {
362  if (TM->Options.ThreadModel == ThreadModel::Single)
363  addPass(createLowerAtomicPass());
364  else
365  addPass(createAtomicExpandPass());
366 
367  // Cmpxchg instructions are often used with a subsequent comparison to
368  // determine whether it succeeded. We can exploit existing control-flow in
369  // ldrex/strex loops to simplify this, but it needs tidying up.
370  if (TM->getOptLevel() != CodeGenOpt::None && EnableAtomicTidy)
371  addPass(createCFGSimplificationPass(-1, [this](const Function &F) {
372  const auto &ST = this->TM->getSubtarget<ARMSubtarget>(F);
373  return ST.hasAnyDataBarrier() && !ST.isThumb1Only();
374  }));
375 
377 
378  // Match interleaved memory accesses to ldN/stN intrinsics.
379  if (TM->getOptLevel() != CodeGenOpt::None)
380  addPass(createInterleavedAccessPass());
381 }
382 
383 bool ARMPassConfig::addPreISel() {
384  if ((TM->getOptLevel() != CodeGenOpt::None &&
386  EnableGlobalMerge == cl::BOU_TRUE) {
387  // FIXME: This is using the thumb1 only constant value for
388  // maximal global offset for merging globals. We may want
389  // to look into using the old value for non-thumb1 code of
390  // 4095 based on the TargetMachine, but this starts to become
391  // tricky when doing code gen per function.
392  bool OnlyOptimizeForSize = (TM->getOptLevel() < CodeGenOpt::Aggressive) &&
393  (EnableGlobalMerge == cl::BOU_UNSET);
394  // Merging of extern globals is enabled by default on non-Mach-O as we
395  // expect it to be generally either beneficial or harmless. On Mach-O it
396  // is disabled as we emit the .subsections_via_symbols directive which
397  // means that merging extern globals is not safe.
398  bool MergeExternalByDefault = !TM->getTargetTriple().isOSBinFormatMachO();
399  addPass(createGlobalMergePass(TM, 127, OnlyOptimizeForSize,
400  MergeExternalByDefault));
401  }
402 
403  return false;
404 }
405 
406 bool ARMPassConfig::addInstSelector() {
407  addPass(createARMISelDag(getARMTargetMachine(), getOptLevel()));
408  return false;
409 }
410 
411 #ifdef LLVM_BUILD_GLOBAL_ISEL
412 bool ARMPassConfig::addIRTranslator() {
413  addPass(new IRTranslator());
414  return false;
415 }
416 
417 bool ARMPassConfig::addLegalizeMachineIR() {
418  addPass(new Legalizer());
419  return false;
420 }
421 
422 bool ARMPassConfig::addRegBankSelect() {
423  addPass(new RegBankSelect());
424  return false;
425 }
426 
427 bool ARMPassConfig::addGlobalInstructionSelect() {
428  addPass(new InstructionSelect());
429  return false;
430 }
431 #endif
432 
433 void ARMPassConfig::addPreRegAlloc() {
434  if (getOptLevel() != CodeGenOpt::None) {
435  addPass(createMLxExpansionPass());
436 
438  addPass(createARMLoadStoreOptimizationPass(/* pre-register alloc */ true));
439 
441  addPass(createA15SDOptimizerPass());
442  }
443 }
444 
445 void ARMPassConfig::addPreSched2() {
446  if (getOptLevel() != CodeGenOpt::None) {
449 
450  addPass(new ARMExecutionDepsFix());
451  }
452 
453  // Expand some pseudo instructions into multiple instructions to allow
454  // proper scheduling.
455  addPass(createARMExpandPseudoPass());
456 
457  if (getOptLevel() != CodeGenOpt::None) {
458  // in v8, IfConversion depends on Thumb instruction widths
459  addPass(createThumb2SizeReductionPass([this](const Function &F) {
460  return this->TM->getSubtarget<ARMSubtarget>(F).restrictIT();
461  }));
462 
463  addPass(createIfConverter([](const MachineFunction &MF) {
464  return !MF.getSubtarget<ARMSubtarget>().isThumb1Only();
465  }));
466  }
467  addPass(createThumb2ITBlockPass());
468 }
469 
470 void ARMPassConfig::addPreEmitPass() {
472 
473  // Constant island pass work on unbundled instructions.
474  addPass(createUnpackMachineBundles([](const MachineFunction &MF) {
475  return MF.getSubtarget<ARMSubtarget>().isThumb2();
476  }));
477 
478  // Don't optimize barriers at -O0.
479  if (getOptLevel() != CodeGenOpt::None)
481 
482  addPass(createARMConstantIslandPass());
483 }
static ARMBaseTargetMachine::ARMABI computeTargetABI(const Triple &TT, StringRef CPU, const TargetOptions &Options)
FunctionPass * createA15SDOptimizerPass()
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
FunctionPass * createMLxExpansionPass()
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Definition: Triple.h:587
TargetIRAnalysis getTargetIRAnalysis() override
Get the TargetIRAnalysis for this target.
MCTargetOptions MCOptions
Machine level options.
bool hasValue() const
Definition: Optional.h:133
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
static cl::opt< bool > EnableARMLoadStoreOpt("arm-load-store-opt", cl::Hidden, cl::desc("Enable ARM load/store optimization pass"), cl::init(true))
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Definition: TargetMachine.h:75
EABI EABIVersion
EABIVersion - This flag specifies the EABI version.
A global registry used in conjunction with static constructors to make pluggable components (like tar...
Definition: Registry.h:45
FunctionPass * createARMExpandPseudoPass()
createARMExpandPseudoPass - returns an instance of the pseudo instruction expansion pass...
void initializeARMPreAllocLoadStoreOptPass(PassRegistry &)
Analysis pass providing the TargetTransformInfo.
ScheduleDAGMI * createGenericSchedPostRA(MachineSchedContext *C)
Create a generic scheduler with no vreg liveness or DAG mutation passes.
FunctionPass * createIfConverter(std::function< bool(const MachineFunction &)> Ftor)
FunctionPass * createARMOptimizeBarriersPass()
createARMOptimizeBarriersPass - Returns an instance of the remove double barriers pass...
Pass * createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, bool OnlyOptimizeForSize=false, bool MergeExternalByDefault=false)
GlobalMerge - This pass merges internal (by default) globals into structs to enable reuse of a base p...
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
Definition: Function.h:262
setjmp/longjmp based exceptions
enum llvm::ARMBaseTargetMachine::ARMABI TargetABI
Target & getTheThumbLETarget()
bool isThumb1Only() const
Definition: ARMSubtarget.h:650
static std::unique_ptr< TargetLoweringObjectFile > createTLOF(const Triple &TT)
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
ARMBaseTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle)
Create an ARM architecture model.
bool hasAttribute(AttrKind Val) const
Return true if the attribute is present.
Definition: Attributes.cpp:202
static const char * getManglingComponent(const Triple &T)
Definition: DataLayout.cpp:154
bool isOSWindows() const
Tests whether the OS is Windows.
Definition: Triple.h:551
ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules machine instructions while...
INITIALIZE_PASS(ARMExecutionDepsFix,"arm-execution-deps-fix","ARM Execution Dependency Fix", false, false) TargetPassConfig *ARMBaseTargetMachine
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
bool hasFusion() const
Return true if the CPU supports any kind of instruction fusion.
Definition: ARMSubtarget.h:576
This file contains the simple types necessary to represent the attributes associated with functions a...
No attributes have been set.
Definition: Attributes.h:72
Target & getTheARMBETarget()
Target-Independent Code Generator Pass Configuration Options.
FunctionPass * createCFGSimplificationPass(int Threshold=-1, std::function< bool(const Function &)> Ftor=nullptr)
FunctionPass * createARMConstantIslandPass()
createARMConstantIslandPass - returns an instance of the constpool island pass.
This file a TargetTransformInfo::Concept conforming object specific to the ARM target machine...
ARMBETargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
#define F(x, y, z)
Definition: MD5.cpp:55
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
Definition: StringRef.h:267
void LLVMInitializeARMTarget()
Target & getTheThumbBETarget()
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
Definition: Triple.h:556
StringMap< std::unique_ptr< ARMSubtarget > > SubtargetMap
bool hasAnyDataBarrier() const
Definition: ARMSubtarget.h:529
std::unique_ptr< ScheduleDAGMutation > createARMMacroFusionDAGMutation()
Note that you have to add: DAG.addMutation(createARMMacroFusionDAGMutation()); to ARMPassConfig::crea...
ScheduleDAGMILive * createGenericSchedLive(MachineSchedContext *C)
Create the standard converging machine scheduler.
static std::string computeDataLayout(const Triple &TT, StringRef CPU, const TargetOptions &Options, bool isLittle)
Function Alias Analysis false
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:401
void initializeARMLoadStoreOptPass(PassRegistry &)
void initializeARMExecutionDepsFixPass(PassRegistry &)
static cl::opt< bool > DisableA15SDOptimization("disable-a15-sd-optimization", cl::Hidden, cl::desc("Inhibit optimization of S->D register accesses on A15"), cl::init(false))
static Reloc::Model getEffectiveRelocModel(Optional< Reloc::Model > RM)
This pass implements the reg bank selector pass used in the GlobalISel pipeline.
Definition: RegBankSelect.h:91
FunctionPass * createInterleavedAccessPass()
InterleavedAccess Pass - This pass identifies and matches interleaved memory accesses to target speci...
#define A
Definition: LargeTest.cpp:12
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
This class describes a target machine that is implemented with the LLVM target-independent code gener...
static cl::opt< cl::boolOrDefault > EnableGlobalMerge("arm-global-merge", cl::Hidden, cl::desc("Enable the global merge pass"))
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Definition: StringRef.h:228
cl::opt< std::string > ABIName("target-abi", cl::Hidden, cl::desc("The name of the ABI to be targeted from the backend."), cl::init(""))
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
FunctionPass * createARMLoadStoreOptimizationPass(bool PreAlloc=false)
Returns an instance of the load / store optimization pass.
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Definition: Triple.h:466
#define B
Definition: LargeTest.cpp:24
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
StringRef computeDefaultTargetABI(const Triple &TT, StringRef CPU)
Pass * createLowerAtomicPass()
void initializeARMConstantIslandsPass(PassRegistry &)
FunctionPass * createUnpackMachineBundles(std::function< bool(const MachineFunction &)> Ftor)
StringRef getABIName() const
getABIName - If this returns a non-empty string this represents the textual name of the ABI that we w...
This pass is responsible for selecting generic machine instructions to target-specific instructions...
Target - Wrapper for Target specific information.
ARMLETargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
std::string TargetCPU
Definition: TargetMachine.h:76
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:133
llvm_unreachable("Unknown RegBank!")
A ScheduleDAG for scheduling lists of MachineInstr.
Basic Alias true
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
Definition: Triple.h:577
static cl::opt< bool > EnableAtomicTidy("arm-atomic-cfg-tidy", cl::Hidden, cl::desc("Run SimplifyCFG after expanding atomic operations"" to make use of cmpxchg flow-based information"), cl::init(true))
#define C
Definition: LargeTest.cpp:25
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
#define I(x, y, z)
Definition: MD5.cpp:58
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
const ARMSubtarget * getSubtargetImpl() const =delete
std::string TargetFS
Definition: TargetMachine.h:77
FunctionPass * createARMISelDag(ARMBaseTargetMachine &TM, CodeGenOpt::Level OptLevel)
createARMISelDag - This pass converts a legalized DAG into a ARM-specific DAG, ready for instruction ...
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
Definition: Triple.h:299
StringRef getValueAsString() const
Return the attribute's value as a string.
Definition: Attributes.cpp:195
This file declares the IRTranslator pass.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
RegisterTargetMachine - Helper template for registering a target machine implementation, for use in the target machine initialization function.
This file describes how to lower LLVM calls to machine code calls.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Definition: PassRegistry.h:40
FunctionPass * createThumb2SizeReductionPass(std::function< bool(const Function &)> Ftor=nullptr)
createThumb2SizeReductionPass - Returns an instance of the Thumb2 size reduction pass.
FunctionPass * createThumb2ITBlockPass()
createThumb2ITBlockPass - Returns an instance of the Thumb2 IT blocks insertion pass.
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
This pass exposes codegen information to IR-level passes.
Target & getTheARMLETarget()
FunctionPass * createAtomicExpandPass()
void initializeGlobalISel(PassRegistry &)
Initialize all passes linked into the GlobalISel library.
Definition: GlobalISel.cpp:21
void addMutation(std::unique_ptr< ScheduleDAGMutation > Mutation)
Add a postprocessing step to the DAG builder.
FloatABI::ABIType FloatABIType
FloatABIType - This setting is set by -float-abi=xxx option is specfied on the command line...