LLVM  12.0.0git
HexagonTargetMachine.cpp
Go to the documentation of this file.
1 //===-- HexagonTargetMachine.cpp - Define TargetMachine for Hexagon -------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Implements the info about Hexagon target spec.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "HexagonTargetMachine.h"
14 #include "Hexagon.h"
15 #include "HexagonISelLowering.h"
20 #include "llvm/CodeGen/Passes.h"
23 #include "llvm/IR/Module.h"
27 #include "llvm/Transforms/Scalar.h"
28 
29 using namespace llvm;
30 
32  cl::init(true), cl::desc("Enable Hexagon constant-extender optimization"));
33 
35  cl::init(true), cl::desc("Enable RDF-based optimizations"));
36 
37 static cl::opt<bool> DisableHardwareLoops("disable-hexagon-hwloops",
38  cl::Hidden, cl::desc("Disable Hardware Loops for Hexagon target"));
39 
40 static cl::opt<bool> DisableAModeOpt("disable-hexagon-amodeopt",
42  cl::desc("Disable Hexagon Addressing Mode Optimization"));
43 
44 static cl::opt<bool> DisableHexagonCFGOpt("disable-hexagon-cfgopt",
46  cl::desc("Disable Hexagon CFG Optimization"));
47 
48 static cl::opt<bool> DisableHCP("disable-hcp", cl::init(false), cl::Hidden,
49  cl::ZeroOrMore, cl::desc("Disable Hexagon constant propagation"));
50 
51 static cl::opt<bool> DisableStoreWidening("disable-store-widen",
52  cl::Hidden, cl::init(false), cl::desc("Disable store widening"));
53 
54 static cl::opt<bool> EnableExpandCondsets("hexagon-expand-condsets",
56  cl::desc("Early expansion of MUX"));
57 
58 static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden,
59  cl::ZeroOrMore, cl::desc("Enable early if-conversion"));
60 
61 static cl::opt<bool> EnableGenInsert("hexagon-insert", cl::init(true),
62  cl::Hidden, cl::desc("Generate \"insert\" instructions"));
63 
64 static cl::opt<bool> EnableCommGEP("hexagon-commgep", cl::init(true),
65  cl::Hidden, cl::ZeroOrMore, cl::desc("Enable commoning of GEP instructions"));
66 
67 static cl::opt<bool> EnableGenExtract("hexagon-extract", cl::init(true),
68  cl::Hidden, cl::desc("Generate \"extract\" instructions"));
69 
70 static cl::opt<bool> EnableGenMux("hexagon-mux", cl::init(true), cl::Hidden,
71  cl::desc("Enable converting conditional transfers into MUX instructions"));
72 
73 static cl::opt<bool> EnableGenPred("hexagon-gen-pred", cl::init(true),
74  cl::Hidden, cl::desc("Enable conversion of arithmetic operations to "
75  "predicate instructions"));
76 
77 static cl::opt<bool> EnableLoopPrefetch("hexagon-loop-prefetch",
79  cl::desc("Enable loop data prefetch on Hexagon"));
80 
81 static cl::opt<bool> DisableHSDR("disable-hsdr", cl::init(false), cl::Hidden,
82  cl::desc("Disable splitting double registers"));
83 
84 static cl::opt<bool> EnableBitSimplify("hexagon-bit", cl::init(true),
85  cl::Hidden, cl::desc("Bit simplification"));
86 
87 static cl::opt<bool> EnableLoopResched("hexagon-loop-resched", cl::init(true),
88  cl::Hidden, cl::desc("Loop rescheduling"));
89 
90 static cl::opt<bool> HexagonNoOpt("hexagon-noopt", cl::init(false),
91  cl::Hidden, cl::desc("Disable backend optimizations"));
92 
93 static cl::opt<bool> EnableVectorPrint("enable-hexagon-vector-print",
95  cl::desc("Enable Hexagon Vector print instr pass"));
96 
97 static cl::opt<bool> EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden,
98  cl::ZeroOrMore, cl::init(true), cl::desc("Enable vextract optimization"));
99 
100 static cl::opt<bool> EnableInitialCFGCleanup("hexagon-initial-cfg-cleanup",
102  cl::desc("Simplify the CFG after atomic expansion pass"));
103 
104 /// HexagonTargetMachineModule - Note that this is used on hosts that
105 /// cannot link in a library unless there are references into the
106 /// library. In particular, it seems that it is not possible to get
107 /// things to work on Win32 without this. Though it is unused, do not
108 /// remove it.
110 int HexagonTargetMachineModule = 0;
111 
113  ScheduleDAGMILive *DAG =
114  new VLIWMachineScheduler(C, std::make_unique<ConvergingVLIWScheduler>());
115  DAG->addMutation(std::make_unique<HexagonSubtarget::UsrOverflowMutation>());
116  DAG->addMutation(std::make_unique<HexagonSubtarget::HVXMemLatencyMutation>());
117  DAG->addMutation(std::make_unique<HexagonSubtarget::CallMutation>());
119  return DAG;
120 }
121 
123 SchedCustomRegistry("hexagon", "Run Hexagon's custom scheduler",
125 
126 namespace llvm {
127  extern char &HexagonExpandCondsetsID;
145 
162  CodeGenOpt::Level OptLevel);
167  FunctionPass *createHexagonPacketizer(bool Minimal);
175 } // end namespace llvm;
176 
178  if (!RM.hasValue())
179  return Reloc::Static;
180  return *RM;
181 }
182 
184  // Register the target.
186 
202 }
203 
205  StringRef CPU, StringRef FS,
206  const TargetOptions &Options,
209  CodeGenOpt::Level OL, bool JIT)
210  // Specify the vector alignment explicitly. For v512x1, the calculated
211  // alignment would be 512*alignment(i1), which is 512 bytes, instead of
212  // the required minimum of 64 bytes.
214  T,
215  "e-m:e-p:32:32:32-a:0-n16:32-"
216  "i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-"
217  "v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048",
218  TT, CPU, FS, Options, getEffectiveRelocModel(RM),
219  getEffectiveCodeModel(CM, CodeModel::Small),
220  (HexagonNoOpt ? CodeGenOpt::None : OL)),
221  TLOF(std::make_unique<HexagonTargetObjectFile>()) {
223  initAsmInfo();
224 }
225 
226 const HexagonSubtarget *
228  AttributeList FnAttrs = F.getAttributes();
229  Attribute CPUAttr =
230  FnAttrs.getAttribute(AttributeList::FunctionIndex, "target-cpu");
231  Attribute FSAttr =
232  FnAttrs.getAttribute(AttributeList::FunctionIndex, "target-features");
233 
234  std::string CPU = !CPUAttr.hasAttribute(Attribute::None)
235  ? CPUAttr.getValueAsString().str()
236  : TargetCPU;
237  std::string FS = !FSAttr.hasAttribute(Attribute::None)
238  ? FSAttr.getValueAsString().str()
239  : TargetFS;
240  // Append the preexisting target features last, so that +mattr overrides
241  // the "unsafe-fp-math" function attribute.
242  // Creating a separate target feature is not strictly necessary, it only
243  // exists to make "unsafe-fp-math" force creating a new subtarget.
244 
245  if (FnAttrs.hasFnAttribute("unsafe-fp-math") &&
246  F.getFnAttribute("unsafe-fp-math").getValueAsString() == "true")
247  FS = FS.empty() ? "+unsafe-fp" : "+unsafe-fp," + FS;
248 
249  auto &I = SubtargetMap[CPU + FS];
250  if (!I) {
251  // This needs to be done before we create a new subtarget since any
252  // creation will depend on the TM and the code generation flags on the
253  // function that reside in TargetOptions.
255  I = std::make_unique<HexagonSubtarget>(TargetTriple, CPU, FS, *this);
256  }
257  return I.get();
258 }
259 
261  PMB.addExtension(
263  [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) {
265  });
266  PMB.addExtension(
268  [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) {
270  });
271 }
272 
275  return TargetTransformInfo(HexagonTTIImpl(this, F));
276 }
277 
278 
280 
281 namespace {
282 /// Hexagon Code Generator Pass Configuration Options.
283 class HexagonPassConfig : public TargetPassConfig {
284 public:
285  HexagonPassConfig(HexagonTargetMachine &TM, PassManagerBase &PM)
286  : TargetPassConfig(TM, PM) {}
287 
288  HexagonTargetMachine &getHexagonTargetMachine() const {
289  return getTM<HexagonTargetMachine>();
290  }
291 
293  createMachineScheduler(MachineSchedContext *C) const override {
294  return createVLIWMachineSched(C);
295  }
296 
297  void addIRPasses() override;
298  bool addInstSelector() override;
299  void addPreRegAlloc() override;
300  void addPostRegAlloc() override;
301  void addPreSched2() override;
302  void addPreEmitPass() override;
303 };
304 } // namespace
305 
307  return new HexagonPassConfig(*this, PM);
308 }
309 
310 void HexagonPassConfig::addIRPasses() {
312  bool NoOpt = (getOptLevel() == CodeGenOpt::None);
313 
314  if (!NoOpt) {
317  }
318 
319  addPass(createAtomicExpandPass());
320 
321  if (!NoOpt) {
324  .forwardSwitchCondToPhi(true)
325  .convertSwitchToLookupTable(true)
326  .needCanonicalLoops(false)
327  .sinkCommonInsts(true)));
328  if (EnableLoopPrefetch)
329  addPass(createLoopDataPrefetchPass());
330  if (EnableCommGEP)
331  addPass(createHexagonCommonGEP());
332  // Replace certain combinations of shifts and ands with extracts.
333  if (EnableGenExtract)
334  addPass(createHexagonGenExtract());
335  }
336 }
337 
338 bool HexagonPassConfig::addInstSelector() {
339  HexagonTargetMachine &TM = getHexagonTargetMachine();
340  bool NoOpt = (getOptLevel() == CodeGenOpt::None);
341 
342  if (!NoOpt)
344 
345  addPass(createHexagonISelDag(TM, getOptLevel()));
346 
347  if (!NoOpt) {
348  if (EnableVExtractOpt)
349  addPass(createHexagonVExtract());
350  // Create logical operations on predicate registers.
351  if (EnableGenPred)
352  addPass(createHexagonGenPredicate());
353  // Rotate loops to expose bit-simplification opportunities.
354  if (EnableLoopResched)
356  // Split double registers.
357  if (!DisableHSDR)
358  addPass(createHexagonSplitDoubleRegs());
359  // Bit simplification.
360  if (EnableBitSimplify)
361  addPass(createHexagonBitSimplify());
362  addPass(createHexagonPeephole());
363  // Constant propagation.
364  if (!DisableHCP) {
367  }
368  if (EnableGenInsert)
369  addPass(createHexagonGenInsert());
370  if (EnableEarlyIf)
372  }
373 
374  return false;
375 }
376 
377 void HexagonPassConfig::addPreRegAlloc() {
378  if (getOptLevel() != CodeGenOpt::None) {
379  if (EnableCExtOpt)
380  addPass(createHexagonConstExtenders());
384  addPass(createHexagonStoreWidening());
386  addPass(createHexagonHardwareLoops());
387  }
388  if (TM->getOptLevel() >= CodeGenOpt::Default)
389  addPass(&MachinePipelinerID);
390 }
391 
392 void HexagonPassConfig::addPostRegAlloc() {
393  if (getOptLevel() != CodeGenOpt::None) {
394  if (EnableRDFOpt)
395  addPass(createHexagonRDFOpt());
397  addPass(createHexagonCFGOptimizer());
398  if (!DisableAModeOpt)
399  addPass(createHexagonOptAddrMode());
400  }
401 }
402 
403 void HexagonPassConfig::addPreSched2() {
404  addPass(createHexagonCopyToCombine());
405  if (getOptLevel() != CodeGenOpt::None)
406  addPass(&IfConverterID);
408 }
409 
410 void HexagonPassConfig::addPreEmitPass() {
411  bool NoOpt = (getOptLevel() == CodeGenOpt::None);
412 
413  if (!NoOpt)
414  addPass(createHexagonNewValueJump());
415 
417 
418  if (!NoOpt) {
420  addPass(createHexagonFixupHwLoops());
421  // Generate MUX from pairs of conditional transfers.
422  if (EnableGenMux)
423  addPass(createHexagonGenMux());
424  }
425 
426  // Packetization is mandatory: it handles gather/scatter at all opt levels.
427  addPass(createHexagonPacketizer(NoOpt), false);
428 
429  if (EnableVectorPrint)
430  addPass(createHexagonVectorPrint(), false);
431 
432  // Add CFI instructions if necessary.
433  addPass(createHexagonCallFrameInformation(), false);
434 }
Pass interface - Implemented by all &#39;passes&#39;.
Definition: Pass.h:77
const NoneType None
Definition: None.h:23
uint64_t CallInst * C
FunctionPass * createHexagonCopyToCombine()
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
char & HexagonExpandCondsetsID
static cl::opt< bool > EnableGenExtract("hexagon-extract", cl::init(true), cl::Hidden, cl::desc("Generate \xtract\instructions"))
CodeModel::Model getEffectiveCodeModel(Optional< CodeModel::Model > CM, CodeModel::Model Default)
Helper method for getting the code model, returning Default if CM does not have a value...
void initializeHexagonRDFOptPass(PassRegistry &)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Definition: StringRef.h:248
PassManagerBuilder - This class is used to set up a standard optimization sequence for languages like...
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Extend the standard ScheduleDAGMI to provide more context and override the top-level schedule() drive...
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
FunctionPass * createHexagonVectorPrint()
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Definition: TargetMachine.h:84
void initializeHexagonHardwareLoopsPass(PassRegistry &)
static cl::opt< bool > DisableStoreWidening("disable-store-widen", cl::Hidden, cl::init(false), cl::desc("Disable store widening"))
static cl::opt< bool > EnableLoopPrefetch("hexagon-loop-prefetch", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable loop data prefetch on Hexagon"))
static cl::opt< bool > EnableCExtOpt("hexagon-cext", cl::Hidden, cl::ZeroOrMore, cl::init(true), cl::desc("Enable Hexagon constant-extender optimization"))
char & RegisterCoalescerID
RegisterCoalescer - This pass merges live ranges to eliminate copies.
static cl::opt< bool > DisableHCP("disable-hcp", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Disable Hexagon constant propagation"))
virtual void add(Pass *P)=0
Add a pass to the queue of passes to run.
F(f)
FunctionPass * createHexagonHardwareLoops()
MachineSchedRegistry provides a selection of available machine instruction schedulers.
ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules machine instructions while...
FunctionPass * createHexagonGenPredicate()
FunctionPass * createLoopDataPrefetchPass()
FunctionPass * createHexagonCommonGEP()
void initializeHexagonConstPropagationPass(PassRegistry &Registry)
static cl::opt< bool > EnableRDFOpt("rdf-opt", cl::Hidden, cl::ZeroOrMore, cl::init(true), cl::desc("Enable RDF-based optimizations"))
Definition: BitVector.h:959
void initializeHexagonGenMuxPass(PassRegistry &Registry)
void resetTargetOptions(const Function &F) const
Reset the target options based on the function&#39;s attributes.
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTarget()
FunctionPass * createHexagonOptimizeSZextends()
FunctionPass * createConstantPropagationPass()
static cl::opt< bool > DisableHardwareLoops("disable-hexagon-hwloops", cl::Hidden, cl::desc("Disable Hardware Loops for Hexagon target"))
No attributes have been set.
Definition: Attributes.h:72
Target-Independent Code Generator Pass Configuration Options.
static cl::opt< bool > EnableGenPred("hexagon-gen-pred", cl::init(true), cl::Hidden, cl::desc("Enable conversion of arithmetic operations to " "predicate instructions"))
char & UnreachableMachineBlockElimID
UnreachableMachineBlockElimination - This pass removes unreachable machine basic blocks.
void initializeHexagonConstExtendersPass(PassRegistry &)
FunctionPass * createDeadCodeEliminationPass()
Definition: DCE.cpp:215
FunctionPass * createCFGSimplificationPass(SimplifyCFGOptions Options=SimplifyCFGOptions(), std::function< bool(const Function &)> Ftor=nullptr)
RegisterTargetMachine - Helper template for registering a target machine implementation, for use in the target machine initialization function.
void initializeHexagonNewValueJumpPass(PassRegistry &)
FunctionPass * createHexagonConstExtenders()
void initializeHexagonPacketizerPass(PassRegistry &)
FunctionPass * createHexagonBitSimplify()
static cl::opt< bool > EnableExpandCondsets("hexagon-expand-condsets", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Early expansion of MUX"))
AttributeList getAttributes() const
Return the attribute list for this Function.
Definition: Function.h:230
static cl::opt< bool > EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable early if-conversion"))
int HexagonTargetMachineModule
HexagonTargetMachineModule - Note that this is used on hosts that cannot link in a library unless the...
FunctionPass * createHexagonConstPropagationPass()
void initializeHexagonVExtractPass(PassRegistry &)
This file implements a TargetTransformInfo analysis pass specific to the Hexagon target machine...
void initializeHexagonVectorLoopCarriedReusePass(PassRegistry &)
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:434
static cl::opt< bool > EnableVectorPrint("enable-hexagon-vector-print", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Enable Hexagon Vector print instr pass"))
bool hasAttribute(AttrKind Val) const
Return true if the attribute is present.
Definition: Attributes.cpp:282
void initializeHexagonLoopIdiomRecognizePass(PassRegistry &)
FunctionPass * createHexagonEarlyIfConversion()
CodeGenOpt::Level getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
static ScheduleDAGInstrs * createVLIWMachineSched(MachineSchedContext *C)
static Reloc::Model getEffectiveRelocModel(Optional< Reloc::Model > RM)
static cl::opt< bool > EnableCommGEP("hexagon-commgep", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable commoning of GEP instructions"))
static cl::opt< bool > EnableGenMux("hexagon-mux", cl::init(true), cl::Hidden, cl::desc("Enable converting conditional transfers into MUX instructions"))
static cl::opt< bool > EnableBitSimplify("hexagon-bit", cl::init(true), cl::Hidden, cl::desc("Bit simplification"))
static cl::opt< bool > EnableInitialCFGCleanup("hexagon-initial-cfg-cleanup", cl::Hidden, cl::ZeroOrMore, cl::init(true), cl::desc("Simplify the CFG after atomic expansion pass"))
static cl::opt< bool > DisableHSDR("disable-hsdr", cl::init(false), cl::Hidden, cl::desc("Disable splitting double registers"))
static cl::opt< bool > DisableAModeOpt("disable-hexagon-amodeopt", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Disable Hexagon Addressing Mode Optimization"))
This class describes a target machine that is implemented with the LLVM target-independent code gener...
static cl::opt< bool > DisableHexagonCFGOpt("disable-hexagon-cfgopt", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Disable Hexagon CFG Optimization"))
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:284
FunctionPass * createHexagonSplitDoubleRegs()
FunctionPass * createHexagonLoopRescheduling()
FunctionPass * createHexagonStoreWidening()
Attribute getAttribute(unsigned Index, Attribute::AttrKind Kind) const
Return the attribute object that exists at the given index.
void initializeHexagonEarlyIfConversionPass(PassRegistry &Registry)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
FunctionPass * createHexagonBranchRelaxation()
static MachineSchedRegistry SchedCustomRegistry("hexagon", "Run Hexagon's custom scheduler", createVLIWMachineSched)
FunctionPass * createHexagonNewValueJump()
HexagonTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
FunctionPass * createHexagonRDFOpt()
void initializeHexagonBitSimplifyPass(PassRegistry &Registry)
static cl::opt< bool > EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden, cl::ZeroOrMore, cl::init(true), cl::desc("Enable vextract optimization"))
Module.h This file contains the declarations for the Module class.
FunctionPass * createHexagonGenMux()
FunctionPass * createHexagonPeephole()
char & MachinePipelinerID
This pass performs software pipelining on machine instructions.
const HexagonSubtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target&#39;s TargetSubtargetInf...
FunctionPass * createHexagonVExtract()
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:131
std::unique_ptr< ScheduleDAGMutation > createCopyConstrainDAGMutation(const TargetInstrInfo *TII, const TargetRegisterInfo *TRI)
FunctionPass * createHexagonGenInsert()
Target - Wrapper for Target specific information.
static cl::opt< bool > HexagonNoOpt("hexagon-noopt", cl::init(false), cl::Hidden, cl::desc("Disable backend optimizations"))
FunctionPass * createHexagonCallFrameInformation()
std::string TargetCPU
Definition: TargetMachine.h:85
void initializeHexagonOptAddrModePass(PassRegistry &)
A ScheduleDAG for scheduling lists of MachineInstr.
bool hasValue() const
Definition: Optional.h:259
FunctionPass * createHexagonSplitConst32AndConst64()
Pass * createHexagonVectorLoopCarriedReusePass()
const TargetRegisterInfo * TRI
Target processor register info.
Definition: ScheduleDAG.h:559
StringRef getValueAsString() const
Return the attribute&#39;s value as a string.
Definition: Attributes.cpp:267
FunctionPass * createHexagonFixupHwLoops()
char & IfConverterID
IfConverter - This pass performs machine code if conversion.
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
#define I(x, y, z)
Definition: MD5.cpp:59
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
Pass * createHexagonLoopIdiomPass()
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.
FunctionPass * createHexagonISelDag(HexagonTargetMachine &TM, CodeGenOpt::Level OptLevel)
const TargetInstrInfo * TII
Target instruction information.
Definition: ScheduleDAG.h:558
std::string TargetFS
Definition: TargetMachine.h:86
bool hasFnAttribute(Attribute::AttrKind Kind) const
Equivalent to hasAttribute(AttributeList::FunctionIndex, Kind) but may be faster. ...
FunctionPass * createHexagonGenExtract()
FunctionPass * createHexagonPacketizer(bool Minimal)
void initializeHexagonSplitDoubleRegsPass(PassRegistry &)
FunctionPass * createHexagonOptAddrMode()
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
Definition: Function.h:340
static cl::opt< bool > EnableLoopResched("hexagon-loop-resched", cl::init(true), cl::Hidden, cl::desc("Loop rescheduling"))
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Definition: PassRegistry.h:38
void adjustPassManager(PassManagerBuilder &PMB) override
Allow the target to modify the pass manager, e.g.
void addExtension(ExtensionPointTy Ty, ExtensionFn Fn)
EP_LateLoopOptimizations - This extension point allows adding late loop canonicalization and simplifi...
FunctionPass * createAtomicExpandPass()
static cl::opt< bool > EnableGenInsert("hexagon-insert", cl::init(true), cl::Hidden, cl::desc("Generate \nsert\instructions"))
void initializeHexagonExpandCondsetsPass(PassRegistry &)
Target & getTheHexagonTarget()
EP_LoopOptimizerEnd - This extension point allows adding loop passes to the end of the loop optimizer...
FunctionPass * createHexagonCFGOptimizer()
void addMutation(std::unique_ptr< ScheduleDAGMutation > Mutation)
Add a postprocessing step to the DAG builder.