LLVM 22.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
14#include "Hexagon.h"
15#include "HexagonISelLowering.h"
23#include "llvm/CodeGen/Passes.h"
31#include <optional>
32
33using namespace llvm;
34
35static cl::opt<bool>
36 EnableCExtOpt("hexagon-cext", cl::Hidden, cl::init(true),
37 cl::desc("Enable Hexagon constant-extender optimization"));
38
40 cl::desc("Enable RDF-based optimizations"));
41
43 "rdf-bb-limit", cl::Hidden, cl::init(1000),
44 cl::desc("Basic block limit for a function for RDF optimizations"));
45
46static cl::opt<bool>
47 DisableHardwareLoops("disable-hexagon-hwloops", cl::Hidden,
48 cl::desc("Disable Hardware Loops for Hexagon target"));
49
50static cl::opt<bool>
51 DisableAModeOpt("disable-hexagon-amodeopt", cl::Hidden,
52 cl::desc("Disable Hexagon Addressing Mode Optimization"));
53
54static cl::opt<bool>
55 DisableHexagonCFGOpt("disable-hexagon-cfgopt", cl::Hidden,
56 cl::desc("Disable Hexagon CFG Optimization"));
57
58static cl::opt<bool>
59 DisableHCP("disable-hcp", cl::Hidden,
60 cl::desc("Disable Hexagon constant propagation"));
61
63 "disable-mask", cl::Hidden,
64 cl::desc("Disable Hexagon specific Mask generation pass"));
65
66static cl::opt<bool> DisableStoreWidening("disable-store-widen", cl::Hidden,
67 cl::init(false),
68 cl::desc("Disable store widening"));
69
70static cl::opt<bool> DisableLoadWidening("disable-load-widen", cl::Hidden,
71 cl::desc("Disable load widening"));
72
73static cl::opt<bool> EnableExpandCondsets("hexagon-expand-condsets",
74 cl::init(true), cl::Hidden,
75 cl::desc("Early expansion of MUX"));
76
77static cl::opt<bool> EnableTfrCleanup("hexagon-tfr-cleanup", cl::init(true),
79 cl::desc("Cleanup of TFRs/COPYs"));
80
81static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden,
82 cl::desc("Enable early if-conversion"));
83
84static cl::opt<bool> EnableCopyHoist("hexagon-copy-hoist", cl::init(true),
86 cl::desc("Enable Hexagon copy hoisting"));
87
88static cl::opt<bool>
89 EnableGenInsert("hexagon-insert", cl::init(true), cl::Hidden,
90 cl::desc("Generate \"insert\" instructions"));
91
92static cl::opt<bool>
93 EnableCommGEP("hexagon-commgep", cl::init(true), cl::Hidden,
94 cl::desc("Enable commoning of GEP instructions"));
95
96static cl::opt<bool>
97 EnableGenExtract("hexagon-extract", cl::init(true), cl::Hidden,
98 cl::desc("Generate \"extract\" instructions"));
99
101 "hexagon-mux", cl::init(true), cl::Hidden,
102 cl::desc("Enable converting conditional transfers into MUX instructions"));
103
104static cl::opt<bool>
105 EnableGenPred("hexagon-gen-pred", cl::init(true), cl::Hidden,
106 cl::desc("Enable conversion of arithmetic operations to "
107 "predicate instructions"));
108
109static cl::opt<bool>
110 EnableLoopPrefetch("hexagon-loop-prefetch", cl::Hidden,
111 cl::desc("Enable loop data prefetch on Hexagon"));
112
113static cl::opt<bool>
114 DisableHSDR("disable-hsdr", cl::init(false), cl::Hidden,
115 cl::desc("Disable splitting double registers"));
116
117static cl::opt<bool>
118 EnableGenMemAbs("hexagon-mem-abs", cl::init(true), cl::Hidden,
119 cl::desc("Generate absolute set instructions"));
120
121static cl::opt<bool> EnableBitSimplify("hexagon-bit", cl::init(true),
123 cl::desc("Bit simplification"));
124
125static cl::opt<bool> EnableLoopResched("hexagon-loop-resched", cl::init(true),
127 cl::desc("Loop rescheduling"));
128
129static cl::opt<bool> HexagonNoOpt("hexagon-noopt", cl::init(false), cl::Hidden,
130 cl::desc("Disable backend optimizations"));
131
132static cl::opt<bool>
133 EnableVectorPrint("enable-hexagon-vector-print", cl::Hidden,
134 cl::desc("Enable Hexagon Vector print instr pass"));
135
136static cl::opt<bool>
137 EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden, cl::init(true),
138 cl::desc("Enable vextract optimization"));
139
140static cl::opt<bool>
141 EnableVectorCombine("hexagon-vector-combine", cl::Hidden, cl::init(true),
142 cl::desc("Enable HVX vector combining"));
143
145 "hexagon-initial-cfg-cleanup", cl::Hidden, cl::init(true),
146 cl::desc("Simplify the CFG after atomic expansion pass"));
147
148static cl::opt<bool> EnableInstSimplify("hexagon-instsimplify", cl::Hidden,
149 cl::init(true),
150 cl::desc("Enable instsimplify"));
151
152/// HexagonTargetMachineModule - Note that this is used on hosts that
153/// cannot link in a library unless there are references into the
154/// library. In particular, it seems that it is not possible to get
155/// things to work on Win32 without this. Though it is unused, do not
156/// remove it.
159
162 C, std::make_unique<HexagonConvergingVLIWScheduler>());
163 DAG->addMutation(std::make_unique<HexagonSubtarget::UsrOverflowMutation>());
164 DAG->addMutation(std::make_unique<HexagonSubtarget::HVXMemLatencyMutation>());
165 DAG->addMutation(std::make_unique<HexagonSubtarget::CallMutation>());
167 return DAG;
168}
169
171 SchedCustomRegistry("hexagon", "Run Hexagon's custom scheduler",
173
174static Reloc::Model getEffectiveRelocModel(std::optional<Reloc::Model> RM) {
175 return RM.value_or(Reloc::Static);
176}
177
180 // Register the target.
182
223}
224
226 StringRef CPU, StringRef FS,
227 const TargetOptions &Options,
228 std::optional<Reloc::Model> RM,
229 std::optional<CodeModel::Model> CM,
230 CodeGenOptLevel OL, bool JIT)
231 // Specify the vector alignment explicitly. For v512x1, the calculated
232 // alignment would be 512*alignment(i1), which is 512 bytes, instead of
233 // the required minimum of 64 bytes.
235 T,
236 "e-m:e-p:32:32:32-a:0-n16:32-"
237 "i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-"
238 "v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048",
239 TT, CPU, FS, Options, getEffectiveRelocModel(RM),
240 getEffectiveCodeModel(CM, CodeModel::Small),
242 TLOF(std::make_unique<HexagonTargetObjectFile>()),
243 Subtarget(Triple(TT), CPU, FS, *this) {
244 initAsmInfo();
245}
246
247const HexagonSubtarget *
249 AttributeList FnAttrs = F.getAttributes();
250 Attribute CPUAttr = FnAttrs.getFnAttr("target-cpu");
251 Attribute FSAttr = FnAttrs.getFnAttr("target-features");
252
253 std::string CPU =
254 CPUAttr.isValid() ? CPUAttr.getValueAsString().str() : TargetCPU;
255 std::string FS =
256 FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS;
257 // Append the preexisting target features last, so that +mattr overrides
258 // the "unsafe-fp-math" function attribute.
259 // Creating a separate target feature is not strictly necessary, it only
260 // exists to make "unsafe-fp-math" force creating a new subtarget.
261
262 if (F.getFnAttribute("unsafe-fp-math").getValueAsBool())
263 FS = FS.empty() ? "+unsafe-fp" : "+unsafe-fp," + FS;
264
265 auto &I = SubtargetMap[CPU + FS];
266 if (!I) {
267 // This needs to be done before we create a new subtarget since any
268 // creation will depend on the TM and the code generation flags on the
269 // function that reside in TargetOptions.
271 I = std::make_unique<HexagonSubtarget>(TargetTriple, CPU, FS, *this);
272 }
273 return I.get();
274}
275
277#define GET_PASS_REGISTRY "HexagonPassRegistry.def"
279
281 [=](LoopPassManager &LPM, OptimizationLevel Level) {
283 });
285 [=](LoopPassManager &LPM, OptimizationLevel Level) {
287 });
288}
289
292 return TargetTransformInfo(std::make_unique<HexagonTTIImpl>(this, F));
293}
294
296 BumpPtrAllocator &Allocator, const Function &F,
297 const TargetSubtargetInfo *STI) const {
298 return HexagonMachineFunctionInfo::create<HexagonMachineFunctionInfo>(
299 Allocator, F, STI);
300}
301
303
307}
308
309namespace {
310/// Hexagon Code Generator Pass Configuration Options.
311class HexagonPassConfig : public TargetPassConfig {
312public:
313 HexagonPassConfig(HexagonTargetMachine &TM, PassManagerBase &PM)
314 : TargetPassConfig(TM, PM) {}
315
316 HexagonTargetMachine &getHexagonTargetMachine() const {
317 return getTM<HexagonTargetMachine>();
318 }
319
320 void addIRPasses() override;
321 bool addInstSelector() override;
322 void addPreRegAlloc() override;
323 void addPostRegAlloc() override;
324 void addPreSched2() override;
325 void addPreEmitPass() override;
326};
327} // namespace
328
330 return new HexagonPassConfig(*this, PM);
331}
332
333void HexagonPassConfig::addIRPasses() {
335 bool NoOpt = (getOptLevel() == CodeGenOptLevel::None);
336
337 if (!NoOpt) {
341 }
342
344
345 if (!NoOpt) {
348 .forwardSwitchCondToPhi(true)
349 .convertSwitchRangeToICmp(true)
350 .convertSwitchToLookupTable(true)
351 .needCanonicalLoops(false)
352 .hoistCommonInsts(true)
353 .sinkCommonInsts(true)));
358 if (EnableCommGEP)
359 addPass(createHexagonCommonGEP());
360 // Replace certain combinations of shifts and ands with extracts.
362 addPass(createHexagonGenExtract());
363 }
364}
365
366bool HexagonPassConfig::addInstSelector() {
367 HexagonTargetMachine &TM = getHexagonTargetMachine();
368 bool NoOpt = (getOptLevel() == CodeGenOptLevel::None);
369
370 if (!NoOpt)
372
373 addPass(createHexagonISelDag(TM, getOptLevel()));
374
375 if (!NoOpt) {
377 addPass(createHexagonVExtract());
378 // Create logical operations on predicate registers.
379 if (EnableGenPred)
380 addPass(createHexagonGenPredicate());
381 // Rotate loops to expose bit-simplification opportunities.
384 // Split double registers.
385 if (!DisableHSDR)
387 // Bit simplification.
389 addPass(createHexagonBitSimplify());
390 addPass(createHexagonPeephole());
391 // Constant propagation.
392 if (!DisableHCP) {
395 }
396 if (EnableGenInsert)
397 addPass(createHexagonGenInsert());
398 if (EnableEarlyIf)
400 }
401
402 return false;
403}
404
405void HexagonPassConfig::addPreRegAlloc() {
406 if (getOptLevel() != CodeGenOptLevel::None) {
407 if (EnableCExtOpt)
411 if (EnableCopyHoist)
418 addPass(createHexagonLoadWidening());
419 if (EnableGenMemAbs)
423 }
424 if (TM->getOptLevel() >= CodeGenOptLevel::Default)
425 addPass(&MachinePipelinerID);
426}
427
428void HexagonPassConfig::addPostRegAlloc() {
429 if (getOptLevel() != CodeGenOptLevel::None) {
430 if (EnableRDFOpt)
431 addPass(createHexagonRDFOpt());
433 addPass(createHexagonCFGOptimizer());
434 if (!DisableAModeOpt)
435 addPass(createHexagonOptAddrMode());
436 }
437}
438
439void HexagonPassConfig::addPreSched2() {
440 bool NoOpt = (getOptLevel() == CodeGenOptLevel::None);
442 if (getOptLevel() != CodeGenOptLevel::None)
443 addPass(&IfConverterID);
445 if (!NoOpt && !DisableHexagonMask)
446 addPass(createHexagonMask());
447}
448
449void HexagonPassConfig::addPreEmitPass() {
450 bool NoOpt = (getOptLevel() == CodeGenOptLevel::None);
451
452 if (!NoOpt)
453 addPass(createHexagonNewValueJump());
454
456
457 if (!NoOpt) {
459 addPass(createHexagonFixupHwLoops());
460 // Generate MUX from pairs of conditional transfers.
461 if (EnableGenMux)
462 addPass(createHexagonGenMux());
463 }
464
465 // Packetization is mandatory: it handles gather/scatter at all opt levels.
466 addPass(createHexagonPacketizer(NoOpt));
467
468 if (!NoOpt)
469 addPass(createHexagonLoopAlign());
470
472 addPass(createHexagonVectorPrint());
473
474 // Add CFI instructions if necessary.
476}
static cl::opt< bool > EnableLoopPrefetch("amdgpu-loop-prefetch", cl::desc("Enable loop data prefetch on AMDGPU"), cl::Hidden, cl::init(false))
#define LLVM_ABI
Definition: Compiler.h:213
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:132
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static cl::opt< bool > EnableExpandCondsets("hexagon-expand-condsets", cl::init(true), cl::Hidden, cl::desc("Early expansion of MUX"))
static cl::opt< bool > EnableCopyHoist("hexagon-copy-hoist", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable Hexagon copy hoisting"))
static cl::opt< bool > HexagonNoOpt("hexagon-noopt", cl::init(false), cl::Hidden, cl::desc("Disable backend optimizations"))
static cl::opt< bool > EnableGenExtract("hexagon-extract", cl::init(true), cl::Hidden, cl::desc("Generate \"extract\" instructions"))
static cl::opt< bool > EnableVectorCombine("hexagon-vector-combine", cl::Hidden, cl::init(true), cl::desc("Enable HVX vector combining"))
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 > DisableHexagonCFGOpt("disable-hexagon-cfgopt", cl::Hidden, cl::desc("Disable Hexagon CFG Optimization"))
static cl::opt< bool > DisableAModeOpt("disable-hexagon-amodeopt", cl::Hidden, cl::desc("Disable Hexagon Addressing Mode Optimization"))
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTarget()
static cl::opt< bool > DisableHCP("disable-hcp", cl::Hidden, cl::desc("Disable Hexagon constant propagation"))
static cl::opt< bool > DisableStoreWidening("disable-store-widen", cl::Hidden, cl::init(false), cl::desc("Disable store widening"))
static cl::opt< bool > EnableBitSimplify("hexagon-bit", cl::init(true), cl::Hidden, cl::desc("Bit simplification"))
static cl::opt< bool > EnableVectorPrint("enable-hexagon-vector-print", cl::Hidden, cl::desc("Enable Hexagon Vector print instr pass"))
static MachineSchedRegistry SchedCustomRegistry("hexagon", "Run Hexagon's custom scheduler", createVLIWMachineSched)
static cl::opt< bool > DisableHardwareLoops("disable-hexagon-hwloops", cl::Hidden, cl::desc("Disable Hardware Loops for Hexagon target"))
static cl::opt< bool > EnableGenPred("hexagon-gen-pred", cl::init(true), cl::Hidden, cl::desc("Enable conversion of arithmetic operations to " "predicate instructions"))
static cl::opt< bool > EnableGenMemAbs("hexagon-mem-abs", cl::init(true), cl::Hidden, cl::desc("Generate absolute set instructions"))
static cl::opt< bool > EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden, cl::init(true), cl::desc("Enable vextract optimization"))
static cl::opt< bool > EnableInstSimplify("hexagon-instsimplify", cl::Hidden, cl::init(true), cl::desc("Enable instsimplify"))
static cl::opt< bool > EnableRDFOpt("rdf-opt", cl::Hidden, cl::init(true), cl::desc("Enable RDF-based optimizations"))
static cl::opt< bool > EnableCExtOpt("hexagon-cext", cl::Hidden, cl::init(true), cl::desc("Enable Hexagon constant-extender optimization"))
static cl::opt< bool > DisableLoadWidening("disable-load-widen", cl::Hidden, cl::desc("Disable load widening"))
static Reloc::Model getEffectiveRelocModel(std::optional< Reloc::Model > RM)
int HexagonTargetMachineModule
HexagonTargetMachineModule - Note that this is used on hosts that cannot link in a library unless the...
static cl::opt< bool > DisableHexagonMask("disable-mask", cl::Hidden, cl::desc("Disable Hexagon specific Mask generation pass"))
static cl::opt< bool > EnableLoopResched("hexagon-loop-resched", cl::init(true), cl::Hidden, cl::desc("Loop rescheduling"))
static ScheduleDAGInstrs * createVLIWMachineSched(MachineSchedContext *C)
static cl::opt< bool > EnableTfrCleanup("hexagon-tfr-cleanup", cl::init(true), cl::Hidden, cl::desc("Cleanup of TFRs/COPYs"))
static cl::opt< bool > DisableHSDR("disable-hsdr", cl::init(false), cl::Hidden, cl::desc("Disable splitting double registers"))
static cl::opt< bool > EnableInitialCFGCleanup("hexagon-initial-cfg-cleanup", cl::Hidden, cl::init(true), cl::desc("Simplify the CFG after atomic expansion pass"))
cl::opt< unsigned > RDFFuncBlockLimit("rdf-bb-limit", cl::Hidden, cl::init(1000), cl::desc("Basic block limit for a function for RDF optimizations"))
static cl::opt< bool > EnableLoopPrefetch("hexagon-loop-prefetch", cl::Hidden, cl::desc("Enable loop data prefetch on Hexagon"))
static cl::opt< bool > EnableGenInsert("hexagon-insert", cl::init(true), cl::Hidden, cl::desc("Generate \"insert\" instructions"))
static cl::opt< bool > EnableCommGEP("hexagon-commgep", cl::init(true), cl::Hidden, cl::desc("Enable commoning of GEP instructions"))
static cl::opt< bool > EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden, cl::desc("Enable early if-conversion"))
This file implements a TargetTransformInfo analysis pass specific to the Hexagon target machine.
static LVOptions Options
Definition: LVOptions.cpp:25
#define F(x, y, z)
Definition: MD5.cpp:55
#define I(x, y, z)
Definition: MD5.cpp:58
PassBuilder PB(Machine, PassOpts->PTO, std::nullopt, &PIC)
Basic Register Allocator
Target-Independent Code Generator Pass Configuration Options pass.
Attribute getFnAttr(Attribute::AttrKind Kind) const
Return the attribute object that exists for the function.
Definition: Attributes.h:909
LLVM_ABI StringRef getValueAsString() const
Return the attribute's value as a string.
Definition: Attributes.cpp:400
bool isValid() const
Return true if the attribute is any kind of attribute.
Definition: Attributes.h:223
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:67
implements a set of functionality in the TargetMachine class for targets that make use of the indepen...
ScheduleDAGInstrs * createMachineScheduler(MachineSchedContext *C) const override
Create an instance of ScheduleDAGInstrs to be run within the standard MachineScheduler pass for this ...
MachineFunctionInfo * createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F, const TargetSubtargetInfo *STI) const override
Create the target's instance of MachineFunctionInfo.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
void registerPassBuilderCallbacks(PassBuilder &PB) override
Allow the target to modify the pass pipeline.
HexagonTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM, CodeGenOptLevel OL, bool JIT)
const HexagonSubtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInf...
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Get a TargetTransformInfo implementation for the target.
MachineSchedRegistry provides a selection of available machine instruction schedulers.
This class provides access to building LLVM's passes.
Definition: PassBuilder.h:110
void registerLateLoopOptimizationsEPCallback(const std::function< void(LoopPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
Definition: PassBuilder.h:431
void registerLoopOptimizerEndEPCallback(const std::function< void(LoopPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
Definition: PassBuilder.h:441
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Definition: PassRegistry.h:38
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A ScheduleDAG for scheduling lists of MachineInstr.
ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules machine instructions while...
void addMutation(std::unique_ptr< ScheduleDAGMutation > Mutation)
Add a postprocessing step to the DAG builder.
const TargetInstrInfo * TII
Target instruction information.
Definition: ScheduleDAG.h:584
const TargetRegisterInfo * TRI
Target processor register info.
Definition: ScheduleDAG.h:585
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
std::string str() const
str - Get the contents as an std::string.
Definition: StringRef.h:233
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with.
std::string TargetFS
std::string TargetCPU
std::unique_ptr< const MCSubtargetInfo > STI
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
Target-Independent Code Generator Pass Configuration Options.
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
TargetSubtargetInfo - Generic base class for all target subtargets.
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
Extend the standard ScheduleDAGMILive to provide more context and override the top-level schedule() d...
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
Interfaces for registering analysis passes, producing common pass manager configurations,...
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:444
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
FunctionPass * createHexagonVectorPrint()
void initializeHexagonCopyHoistingPass(PassRegistry &)
FunctionPass * createHexagonVectorCombineLegacyPass()
void initializeHexagonOptAddrModePass(PassRegistry &)
LLVM_ABI FunctionPass * createCFGSimplificationPass(SimplifyCFGOptions Options=SimplifyCFGOptions(), std::function< bool(const Function &)> Ftor=nullptr)
void initializeHexagonNewValueJumpPass(PassRegistry &)
char & HexagonTfrCleanupID
FunctionPass * createHexagonCFGOptimizer()
void initializeHexagonSplitConst32AndConst64Pass(PassRegistry &)
void initializeHexagonVectorLoopCarriedReuseLegacyPassPass(PassRegistry &)
LLVM_ABI char & RegisterCoalescerID
RegisterCoalescer - This pass merges live ranges to eliminate copies.
void initializeHexagonDAGToDAGISelLegacyPass(PassRegistry &)
void initializeHexagonSplitDoubleRegsPass(PassRegistry &)
LLVM_ABI FunctionPass * createDeadCodeEliminationPass()
Definition: DCE.cpp:145
void initializeHexagonCommonGEPPass(PassRegistry &)
FunctionPass * createHexagonNewValueJump()
void initializeHexagonRDFOptPass(PassRegistry &)
FunctionPass * createHexagonBranchRelaxation()
FunctionPass * createHexagonLoopAlign()
FunctionPass * createHexagonBitSimplify()
FunctionPass * createHexagonPeephole()
FunctionPass * createHexagonConstExtenders()
FunctionPass * createHexagonConstPropagationPass()
void initializeHexagonGenMemAbsolutePass(PassRegistry &)
FunctionPass * createHexagonFixupHwLoops()
Target & getTheHexagonTarget()
void initializeHexagonMaskPass(PassRegistry &)
void initializeHexagonExpandCondsetsPass(PassRegistry &)
void initializeHexagonAsmPrinterPass(PassRegistry &)
void initializeHexagonVectorPrintPass(PassRegistry &)
FunctionPass * createHexagonMask()
Definition: HexagonMask.cpp:99
void initializeHexagonPacketizerPass(PassRegistry &)
FunctionPass * createHexagonPacketizer(bool Minimal)
CodeModel::Model getEffectiveCodeModel(std::optional< CodeModel::Model > CM, CodeModel::Model Default)
Helper method for getting the code model, returning Default if CM does not have a value.
FunctionPass * createHexagonGenMux()
FunctionPass * createHexagonGenExtract()
LLVM_ABI char & UnreachableMachineBlockElimID
UnreachableMachineBlockElimination - This pass removes unreachable machine basic blocks.
FunctionPass * createHexagonEarlyIfConversion()
@ None
Definition: CodeGenData.h:107
LLVM_ABI FunctionPass * createLoopDataPrefetchPass()
FunctionPass * createHexagonLoadWidening()
void initializeHexagonStoreWideningPass(PassRegistry &)
FunctionPass * createHexagonCallFrameInformation()
FunctionPass * createHexagonHardwareLoops()
void initializeHexagonGenPredicatePass(PassRegistry &)
void initializeHexagonTfrCleanupPass(PassRegistry &)
FunctionPass * createHexagonVExtract()
void initializeHexagonGenMuxPass(PassRegistry &)
void initializeHexagonFixupHwLoopsPass(PassRegistry &)
FunctionPass * createHexagonGenPredicate()
void initializeHexagonVectorCombineLegacyPass(PassRegistry &)
void initializeHexagonCFGOptimizerPass(PassRegistry &)
void initializeHexagonPeepholePass(PassRegistry &)
CodeGenOptLevel
Code generation optimization level.
Definition: CodeGen.h:82
FunctionPass * createHexagonGenInsert()
void initializeHexagonBranchRelaxationPass(PassRegistry &)
FunctionPass * createHexagonOptimizeSZextends()
FunctionPass * createHexagonLoopRescheduling()
void initializeHexagonCallFrameInformationPass(PassRegistry &)
void initializeHexagonLoopReschedulingPass(PassRegistry &)
void initializeHexagonGenExtractPass(PassRegistry &)
FunctionPass * createHexagonSplitConst32AndConst64()
FunctionPass * createHexagonCopyToCombine()
LLVM_ABI char & MachinePipelinerID
This pass performs software pipelining on machine instructions.
FunctionPass * createHexagonCommonGEP()
FunctionPass * createHexagonISelDag(HexagonTargetMachine &TM, CodeGenOptLevel OptLevel)
createHexagonISelDag - This pass converts a legalized DAG into a Hexagon-specific DAG,...
char & HexagonExpandCondsetsID
void initializeHexagonLoadWideningPass(PassRegistry &)
FunctionPass * createHexagonOptAddrMode()
void initializeHexagonCopyToCombinePass(PassRegistry &)
void initializeHexagonEarlyIfConversionPass(PassRegistry &)
FunctionPass * createHexagonGenMemAbsolute()
void initializeHexagonLoopIdiomRecognizeLegacyPassPass(PassRegistry &)
LLVM_ABI char & VirtRegRewriterID
VirtRegRewriter pass.
Definition: VirtRegMap.cpp:258
FunctionPass * createHexagonSplitDoubleRegs()
void initializeHexagonOptimizeSZextendsPass(PassRegistry &)
void initializeHexagonBitSimplifyPass(PassRegistry &)
LLVM_ABI char & IfConverterID
IfConverter - This pass performs machine code if conversion.
void initializeHexagonConstPropagationPass(PassRegistry &)
LLVM_ABI FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
void initializeHexagonGenInsertPass(PassRegistry &)
void initializeHexagonConstExtendersPass(PassRegistry &)
FunctionPass * createHexagonStoreWidening()
LLVM_ABI std::unique_ptr< ScheduleDAGMutation > createCopyConstrainDAGMutation(const TargetInstrInfo *TII, const TargetRegisterInfo *TRI)
void initializeHexagonLoopAlignPass(PassRegistry &)
void initializeHexagonHardwareLoopsPass(PassRegistry &)
char & HexagonCopyHoistingID
FunctionPass * createHexagonRDFOpt()
LLVM_ABI FunctionPass * createInstSimplifyLegacyPass()
void initializeHexagonVExtractPass(PassRegistry &)
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:851
Hexagon Vector Loop Carried Reuse Pass.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
RegisterTargetMachine - Helper template for registering a target machine implementation,...