LLVM 21.0.0git
TargetPassConfig.h
Go to the documentation of this file.
1//===- TargetPassConfig.h - Code Generation pass options --------*- C++ -*-===//
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/// \file
9/// Target-Independent Code Generator Pass Configuration Options pass.
10///
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CODEGEN_TARGETPASSCONFIG_H
14#define LLVM_CODEGEN_TARGETPASSCONFIG_H
15
16#include "llvm/Pass.h"
18#include "llvm/Support/Error.h"
19#include <cassert>
20#include <string>
21
22namespace llvm {
23
24class TargetMachine;
25class PassConfigImpl;
26class CSEConfigBase;
27class PassInstrumentationCallbacks;
28
29// The old pass manager infrastructure is hidden in a legacy namespace now.
30namespace legacy {
31
32class PassManagerBase;
33
34} // end namespace legacy
35
37
38/// Discriminated union of Pass ID types.
39///
40/// The PassConfig API prefers dealing with IDs because they are safer and more
41/// efficient. IDs decouple configuration from instantiation. This way, when a
42/// pass is overriden, it isn't unnecessarily instantiated. It is also unsafe to
43/// refer to a Pass pointer after adding it to a pass manager, which deletes
44/// redundant pass instances.
45///
46/// However, it is convient to directly instantiate target passes with
47/// non-default ctors. These often don't have a registered PassInfo. Rather than
48/// force all target passes to implement the pass registry boilerplate, allow
49/// the PassConfig API to handle either type.
50///
51/// AnalysisID is sadly char*, so PointerIntPair won't work.
53 union {
56 };
57 bool IsInstance = false;
58
59public:
60 IdentifyingPassPtr() : P(nullptr) {}
61 IdentifyingPassPtr(AnalysisID IDPtr) : ID(IDPtr) {}
62 IdentifyingPassPtr(Pass *InstancePtr) : P(InstancePtr), IsInstance(true) {}
63
64 bool isValid() const { return P; }
65 bool isInstance() const { return IsInstance; }
66
67 AnalysisID getID() const {
68 assert(!IsInstance && "Not a Pass ID");
69 return ID;
70 }
71
72 Pass *getInstance() const {
73 assert(IsInstance && "Not a Pass Instance");
74 return P;
75 }
76};
77
78
79/// Target-Independent Code Generator Pass Configuration Options.
80///
81/// This is an ImmutablePass solely for the purpose of exposing CodeGen options
82/// to the internals of other CodeGen passes.
84private:
85 PassManagerBase *PM = nullptr;
86 AnalysisID StartBefore = nullptr;
87 AnalysisID StartAfter = nullptr;
88 AnalysisID StopBefore = nullptr;
89 AnalysisID StopAfter = nullptr;
90
91 unsigned StartBeforeInstanceNum = 0;
92 unsigned StartBeforeCount = 0;
93
94 unsigned StartAfterInstanceNum = 0;
95 unsigned StartAfterCount = 0;
96
97 unsigned StopBeforeInstanceNum = 0;
98 unsigned StopBeforeCount = 0;
99
100 unsigned StopAfterInstanceNum = 0;
101 unsigned StopAfterCount = 0;
102
103 bool Started = true;
104 bool Stopped = false;
105 bool AddingMachinePasses = false;
106 bool DebugifyIsSafe = true;
107
108 /// Set the StartAfter, StartBefore and StopAfter passes to allow running only
109 /// a portion of the normal code-gen pass sequence.
110 ///
111 /// If the StartAfter and StartBefore pass ID is zero, then compilation will
112 /// begin at the normal point; otherwise, clear the Started flag to indicate
113 /// that passes should not be added until the starting pass is seen. If the
114 /// Stop pass ID is zero, then compilation will continue to the end.
115 ///
116 /// This function expects that at least one of the StartAfter or the
117 /// StartBefore pass IDs is null.
118 void setStartStopPasses();
119
120protected:
122 PassConfigImpl *Impl = nullptr; // Internal data structures
123 bool Initialized = false; // Flagged after all passes are configured.
124
125 // Target Pass Options
126 // Targets provide a default setting, user flags override.
127 bool DisableVerify = false;
128
129 /// Default setting for -enable-tail-merge on this target.
130 bool EnableTailMerge = true;
131
132 /// Enable sinking of instructions in MachineSink where a computation can be
133 /// folded into the addressing mode of a memory load/store instruction or
134 /// replace a copy.
135 bool EnableSinkAndFold = false;
136
137 /// Require processing of functions such that callees are generated before
138 /// callers.
140
141 /// Enable LoopTermFold immediately after LSR
142 bool EnableLoopTermFold = false;
143
144 /// Add the actual instruction selection passes. This does not include
145 /// preparation passes on IR.
146 bool addCoreISelPasses();
147
148public:
150 // Dummy constructor.
152
153 ~TargetPassConfig() override;
154
155 static char ID;
156
157 /// Get the right type of TargetMachine for this target.
158 template<typename TMC> TMC &getTM() const {
159 return *static_cast<TMC*>(TM);
160 }
161
162 //
163 void setInitialized() { Initialized = true; }
164
166
167 /// Returns true if one of the `-start-after`, `-start-before`, `-stop-after`
168 /// or `-stop-before` options is set.
169 static bool hasLimitedCodeGenPipeline();
170
171 /// Returns true if none of the `-stop-before` and `-stop-after` options is
172 /// set.
173 static bool willCompleteCodeGenPipeline();
174
175 /// If hasLimitedCodeGenPipeline is true, this method returns
176 /// a string with the name of the options that caused this
177 /// pipeline to be limited.
178 static std::string getLimitedCodeGenPipelineReason();
179
187 };
188
189 /// Returns pass name in `-stop-before` or `-stop-after`
190 /// NOTE: New pass manager migration only
193
195
196 bool getEnableTailMerge() const { return EnableTailMerge; }
198
201
205 }
206
207 /// Allow the target to override a specific pass without overriding the pass
208 /// pipeline. When passes are added to the standard pipeline at the
209 /// point where StandardID is expected, add TargetID in its place.
210 void substitutePass(AnalysisID StandardID, IdentifyingPassPtr TargetID);
211
212 /// Insert InsertedPassID pass after TargetPassID pass.
213 void insertPass(AnalysisID TargetPassID, IdentifyingPassPtr InsertedPassID);
214
215 /// Allow the target to enable a specific standard pass by default.
216 void enablePass(AnalysisID PassID) { substitutePass(PassID, PassID); }
217
218 /// Allow the target to disable a specific standard pass by default.
219 void disablePass(AnalysisID PassID) {
221 }
222
223 /// Return the pass substituted for StandardID by the target.
224 /// If no substitution exists, return StandardID.
226
227 /// Return true if the pass has been substituted by the target or
228 /// overridden on the command line.
230
231 /// Return true if the optimized regalloc pipeline is enabled.
232 bool getOptimizeRegAlloc() const;
233
234 /// Return true if the default global register allocator is in use and
235 /// has not be overriden on the command line with '-regalloc=...'
236 bool usingDefaultRegAlloc() const;
237
238 /// High level function that adds all passes necessary to go from llvm IR
239 /// representation to the MI representation.
240 /// Adds IR based lowering and target specific optimization passes and finally
241 /// the core instruction selection passes.
242 /// \returns true if an error occurred, false otherwise.
243 bool addISelPasses();
244
245 /// Add common target configurable passes that perform LLVM IR to IR
246 /// transforms following machine independent optimization.
247 virtual void addIRPasses();
248
249 /// Add passes to lower exception handling for the code generator.
251
252 /// Add pass to prepare the LLVM IR for code generation. This should be done
253 /// before exception handling preparation passes.
254 virtual void addCodeGenPrepare();
255
256 /// Add common passes that perform LLVM IR to IR transforms in preparation for
257 /// instruction selection.
258 virtual void addISelPrepare();
259
260 /// addInstSelector - This method should install an instruction selector pass,
261 /// which converts from LLVM code to machine instructions.
262 virtual bool addInstSelector() {
263 return true;
264 }
265
266 /// This method should install an IR translator pass, which converts from
267 /// LLVM code to machine instructions with possibly generic opcodes.
268 virtual bool addIRTranslator() { return true; }
269
270 /// This method may be implemented by targets that want to run passes
271 /// immediately before legalization.
272 virtual void addPreLegalizeMachineIR() {}
273
274 /// This method should install a legalize pass, which converts the instruction
275 /// sequence into one that can be selected by the target.
276 virtual bool addLegalizeMachineIR() { return true; }
277
278 /// This method may be implemented by targets that want to run passes
279 /// immediately before the register bank selection.
280 virtual void addPreRegBankSelect() {}
281
282 /// This method should install a register bank selector pass, which
283 /// assigns register banks to virtual registers without a register
284 /// class or register banks.
285 virtual bool addRegBankSelect() { return true; }
286
287 /// This method may be implemented by targets that want to run passes
288 /// immediately before the (global) instruction selection.
290
291 /// This method should install a (global) instruction selector pass, which
292 /// converts possibly generic instructions to fully target-specific
293 /// instructions, thereby constraining all generic virtual registers to
294 /// register classes.
295 virtual bool addGlobalInstructionSelect() { return true; }
296
297 /// Add the complete, standard set of LLVM CodeGen passes.
298 /// Fully developed targets will not generally override this.
299 virtual void addMachinePasses();
300
301 /// printAndVerify - Add a pass to dump then verify the machine function, if
302 /// those steps are enabled.
303 void printAndVerify(const std::string &Banner);
304
305 /// Add a pass to print the machine function if printing is enabled.
306 void addPrintPass(const std::string &Banner);
307
308 /// Add a pass to perform basic verification of the machine function if
309 /// verification is enabled.
310 void addVerifyPass(const std::string &Banner);
311
312 /// Add a pass to add synthesized debug info to the MIR.
313 void addDebugifyPass();
314
315 /// Add a pass to remove debug info from the MIR.
316 void addStripDebugPass();
317
318 /// Add a pass to check synthesized debug info for MIR.
319 void addCheckDebugPass();
320
321 /// Add standard passes before a pass that's about to be added. For example,
322 /// the DebugifyMachineModulePass if it is enabled.
323 void addMachinePrePasses(bool AllowDebugify = true);
324
325 /// Add standard passes after a pass that has just been added. For example,
326 /// the MachineVerifier if it is enabled.
327 void addMachinePostPasses(const std::string &Banner);
328
329 /// Check whether or not GlobalISel should abort on error.
330 /// When this is disabled, GlobalISel will fall back on SDISel instead of
331 /// erroring out.
332 bool isGlobalISelAbortEnabled() const;
333
334 /// Check whether or not a diagnostic should be emitted when GlobalISel
335 /// uses the fallback path. In other words, it will emit a diagnostic
336 /// when GlobalISel failed and isGlobalISelAbortEnabled is false.
337 virtual bool reportDiagnosticWhenGlobalISelFallback() const;
338
339 /// Check whether continuous CSE should be enabled in GISel passes.
340 /// By default, it's enabled for non O0 levels.
341 virtual bool isGISelCSEEnabled() const;
342
343 /// Returns the CSEConfig object to use for the current optimization level.
344 virtual std::unique_ptr<CSEConfigBase> getCSEConfig() const;
345
346protected:
347 // Helper to verify the analysis is really immutable.
348 void setOpt(bool &Opt, bool Val);
349
350 /// Return true if register allocator is specified by -regalloc=override.
352
353 /// Methods with trivial inline returns are convenient points in the common
354 /// codegen pass pipeline where targets may insert passes. Methods with
355 /// out-of-line standard implementations are major CodeGen stages called by
356 /// addMachinePasses. Some targets may override major stages when inserting
357 /// passes is insufficient, but maintaining overriden stages is more work.
358 ///
359
360 /// addPreISelPasses - This method should add any "last minute" LLVM->LLVM
361 /// passes (which are run just before instruction selector).
362 virtual bool addPreISel() {
363 return true;
364 }
365
366 /// addMachineSSAOptimization - Add standard passes that optimize machine
367 /// instructions in SSA form.
368 virtual void addMachineSSAOptimization();
369
370 /// Add passes that optimize instruction level parallelism for out-of-order
371 /// targets. These passes are run while the machine code is still in SSA
372 /// form, so they can use MachineTraceMetrics to control their heuristics.
373 ///
374 /// All passes added here should preserve the MachineDominatorTree,
375 /// MachineLoopInfo, and MachineTraceMetrics analyses.
376 virtual bool addILPOpts() {
377 return false;
378 }
379
380 /// This method may be implemented by targets that want to run passes
381 /// immediately before register allocation.
382 virtual void addPreRegAlloc() { }
383
384 /// createTargetRegisterAllocator - Create the register allocator pass for
385 /// this target at the current optimization level.
386 virtual FunctionPass *createTargetRegisterAllocator(bool Optimized);
387
388 /// addFastRegAlloc - Add the minimum set of target-independent passes that
389 /// are required for fast register allocation.
390 virtual void addFastRegAlloc();
391
392 /// addOptimizedRegAlloc - Add passes related to register allocation.
393 /// CodeGenTargetMachineImpl provides standard regalloc passes for most
394 /// targets.
395 virtual void addOptimizedRegAlloc();
396
397 /// addPreRewrite - Add passes to the optimized register allocation pipeline
398 /// after register allocation is complete, but before virtual registers are
399 /// rewritten to physical registers.
400 ///
401 /// These passes must preserve VirtRegMap and LiveIntervals, and when running
402 /// after RABasic or RAGreedy, they should take advantage of LiveRegMatrix.
403 /// When these passes run, VirtRegMap contains legal physreg assignments for
404 /// all virtual registers.
405 ///
406 /// Note if the target overloads addRegAssignAndRewriteOptimized, this may not
407 /// be honored. This is also not generally used for the fast variant,
408 /// where the allocation and rewriting are done in one pass.
409 virtual bool addPreRewrite() {
410 return false;
411 }
412
413 /// addPostFastRegAllocRewrite - Add passes to the optimized register
414 /// allocation pipeline after fast register allocation is complete.
415 virtual bool addPostFastRegAllocRewrite() { return false; }
416
417 /// Add passes to be run immediately after virtual registers are rewritten
418 /// to physical registers.
419 virtual void addPostRewrite() { }
420
421 /// This method may be implemented by targets that want to run passes after
422 /// register allocation pass pipeline but before prolog-epilog insertion.
423 virtual void addPostRegAlloc() { }
424
425 /// Add passes that optimize machine instructions after register allocation.
426 virtual void addMachineLateOptimization();
427
428 /// This method may be implemented by targets that want to run passes after
429 /// prolog-epilog insertion and before the second instruction scheduling pass.
430 virtual void addPreSched2() { }
431
432 /// addGCPasses - Add late codegen passes that analyze code for garbage
433 /// collection. This should return true if GC info should be printed after
434 /// these passes.
435 virtual bool addGCPasses();
436
437 /// Add standard basic block placement passes.
438 virtual void addBlockPlacement();
439
440 /// This pass may be implemented by targets that want to run passes
441 /// immediately before machine code is emitted.
442 virtual void addPreEmitPass() { }
443
444 /// This pass may be implemented by targets that want to run passes
445 /// immediately after basic block sections are assigned.
446 virtual void addPostBBSections() {}
447
448 /// Targets may add passes immediately before machine code is emitted in this
449 /// callback. This is called even later than `addPreEmitPass`.
450 // FIXME: Rename `addPreEmitPass` to something more sensible given its actual
451 // position and remove the `2` suffix here as this callback is what
452 // `addPreEmitPass` *should* be but in reality isn't.
453 virtual void addPreEmitPass2() {}
454
455 /// Utilities for targets to add passes to the pass manager.
456 ///
457
458 /// Add a CodeGen pass at this point in the pipeline after checking overrides.
459 /// Return the pass that was added, or zero if no pass was added.
461
462 /// Add a pass to the PassManager if that pass is supposed to be run, as
463 /// determined by the StartAfter and StopAfter options. Takes ownership of the
464 /// pass.
465 void addPass(Pass *P);
466
467 /// addMachinePasses helper to create the target-selected or overriden
468 /// regalloc pass.
469 virtual FunctionPass *createRegAllocPass(bool Optimized);
470
471 /// Add core register allocator passes which do the actual register assignment
472 /// and rewriting. \returns true if any passes were added.
473 virtual bool addRegAssignAndRewriteFast();
474 virtual bool addRegAssignAndRewriteOptimized();
475};
476
477void registerCodeGenCallback(PassInstrumentationCallbacks &PIC,
478 TargetMachine &);
479
480} // end namespace llvm
481
482#endif // LLVM_CODEGEN_TARGETPASSCONFIG_H
basic Basic Alias true
#define P(N)
PassInstrumentationCallbacks PIC
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Tagged union holding either a T or a Error.
Definition: Error.h:481
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:310
Discriminated union of Pass ID types.
AnalysisID getID() const
IdentifyingPassPtr(AnalysisID IDPtr)
IdentifyingPassPtr(Pass *InstancePtr)
ImmutablePass class - This class is used to provide information that does not need to be run.
Definition: Pass.h:281
Pass interface - Implemented by all 'passes'.
Definition: Pass.h:94
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:81
Target-Independent Code Generator Pass Configuration Options.
bool usingDefaultRegAlloc() const
Return true if the default global register allocator is in use and has not be overriden on the comman...
void enablePass(AnalysisID PassID)
Allow the target to enable a specific standard pass by default.
bool requiresCodeGenSCCOrder() const
void addCheckDebugPass()
Add a pass to check synthesized debug info for MIR.
virtual void addPreLegalizeMachineIR()
This method may be implemented by targets that want to run passes immediately before legalization.
void addPrintPass(const std::string &Banner)
Add a pass to print the machine function if printing is enabled.
virtual void addPreEmitPass2()
Targets may add passes immediately before machine code is emitted in this callback.
virtual std::unique_ptr< CSEConfigBase > getCSEConfig() const
Returns the CSEConfig object to use for the current optimization level.
bool RequireCodeGenSCCOrder
Require processing of functions such that callees are generated before callers.
bool EnableLoopTermFold
Enable LoopTermFold immediately after LSR.
void printAndVerify(const std::string &Banner)
printAndVerify - Add a pass to dump then verify the machine function, if those steps are enabled.
bool getEnableTailMerge() const
static bool hasLimitedCodeGenPipeline()
Returns true if one of the -start-after, -start-before, -stop-after or -stop-before options is set.
static Expected< StartStopInfo > getStartStopInfo(PassInstrumentationCallbacks &PIC)
Returns pass name in -stop-before or -stop-after NOTE: New pass manager migration only.
virtual void addCodeGenPrepare()
Add pass to prepare the LLVM IR for code generation.
void insertPass(AnalysisID TargetPassID, IdentifyingPassPtr InsertedPassID)
Insert InsertedPassID pass after TargetPassID pass.
void addMachinePostPasses(const std::string &Banner)
Add standard passes after a pass that has just been added.
virtual void addPreSched2()
This method may be implemented by targets that want to run passes after prolog-epilog insertion and b...
virtual bool isGISelCSEEnabled() const
Check whether continuous CSE should be enabled in GISel passes.
virtual bool addILPOpts()
Add passes that optimize instruction level parallelism for out-of-order targets.
virtual void addPostRegAlloc()
This method may be implemented by targets that want to run passes after register allocation pass pipe...
void addDebugifyPass()
Add a pass to add synthesized debug info to the MIR.
virtual bool addInstSelector()
addInstSelector - This method should install an instruction selector pass, which converts from LLVM c...
bool getEnableSinkAndFold() const
CodeGenOptLevel getOptLevel() const
virtual bool addPreISel()
Methods with trivial inline returns are convenient points in the common codegen pass pipeline where t...
void setOpt(bool &Opt, bool Val)
virtual void addBlockPlacement()
Add standard basic block placement passes.
virtual FunctionPass * createRegAllocPass(bool Optimized)
addMachinePasses helper to create the target-selected or overriden regalloc pass.
virtual void addPostBBSections()
This pass may be implemented by targets that want to run passes immediately after basic block section...
virtual void addOptimizedRegAlloc()
addOptimizedRegAlloc - Add passes related to register allocation.
virtual bool addRegAssignAndRewriteFast()
Add core register allocator passes which do the actual register assignment and rewriting.
virtual void addPreEmitPass()
This pass may be implemented by targets that want to run passes immediately before machine code is em...
bool isGlobalISelAbortEnabled() const
Check whether or not GlobalISel should abort on error.
bool getOptimizeRegAlloc() const
Return true if the optimized regalloc pipeline is enabled.
bool isCustomizedRegAlloc()
Return true if register allocator is specified by -regalloc=override.
virtual void addPreRegBankSelect()
This method may be implemented by targets that want to run passes immediately before the register ban...
virtual bool reportDiagnosticWhenGlobalISelFallback() const
Check whether or not a diagnostic should be emitted when GlobalISel uses the fallback path.
virtual bool addPreRewrite()
addPreRewrite - Add passes to the optimized register allocation pipeline after register allocation is...
virtual bool addRegBankSelect()
This method should install a register bank selector pass, which assigns register banks to virtual reg...
void setEnableSinkAndFold(bool Enable)
void setRequiresCodeGenSCCOrder(bool Enable=true)
virtual void addMachineLateOptimization()
Add passes that optimize machine instructions after register allocation.
virtual void addMachinePasses()
Add the complete, standard set of LLVM CodeGen passes.
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
virtual void addPreGlobalInstructionSelect()
This method may be implemented by targets that want to run passes immediately before the (global) ins...
virtual void addFastRegAlloc()
addFastRegAlloc - Add the minimum set of target-independent passes that are required for fast registe...
virtual bool addLegalizeMachineIR()
This method should install a legalize pass, which converts the instruction sequence into one that can...
virtual void addMachineSSAOptimization()
addMachineSSAOptimization - Add standard passes that optimize machine instructions in SSA form.
void substitutePass(AnalysisID StandardID, IdentifyingPassPtr TargetID)
Allow the target to override a specific pass without overriding the pass pipeline.
virtual bool addRegAssignAndRewriteOptimized()
void disablePass(AnalysisID PassID)
Allow the target to disable a specific standard pass by default.
virtual bool addGlobalInstructionSelect()
This method should install a (global) instruction selector pass, which converts possibly generic inst...
virtual void addPreRegAlloc()
This method may be implemented by targets that want to run passes immediately before register allocat...
bool EnableSinkAndFold
Enable sinking of instructions in MachineSink where a computation can be folded into the addressing m...
static std::string getLimitedCodeGenPipelineReason()
If hasLimitedCodeGenPipeline is true, this method returns a string with the name of the options that ...
bool EnableTailMerge
Default setting for -enable-tail-merge on this target.
AnalysisID addPass(AnalysisID PassID)
Utilities for targets to add passes to the pass manager.
void addPassesToHandleExceptions()
Add passes to lower exception handling for the code generator.
void addStripDebugPass()
Add a pass to remove debug info from the MIR.
bool isPassSubstitutedOrOverridden(AnalysisID ID) const
Return true if the pass has been substituted by the target or overridden on the command line.
bool addCoreISelPasses()
Add the actual instruction selection passes.
void setEnableTailMerge(bool Enable)
void setDisableVerify(bool Disable)
TMC & getTM() const
Get the right type of TargetMachine for this target.
virtual void addISelPrepare()
Add common passes that perform LLVM IR to IR transforms in preparation for instruction selection.
static bool willCompleteCodeGenPipeline()
Returns true if none of the -stop-before and -stop-after options is set.
void addMachinePrePasses(bool AllowDebugify=true)
Add standard passes before a pass that's about to be added.
virtual bool addGCPasses()
addGCPasses - Add late codegen passes that analyze code for garbage collection.
virtual bool addIRTranslator()
This method should install an IR translator pass, which converts from LLVM code to machine instructio...
void addVerifyPass(const std::string &Banner)
Add a pass to perform basic verification of the machine function if verification is enabled.
virtual FunctionPass * createTargetRegisterAllocator(bool Optimized)
createTargetRegisterAllocator - Create the register allocator pass for this target at the current opt...
virtual bool addPostFastRegAllocRewrite()
addPostFastRegAllocRewrite - Add passes to the optimized register allocation pipeline after fast regi...
IdentifyingPassPtr getPassSubstitution(AnalysisID StandardID) const
Return the pass substituted for StandardID by the target.
bool addISelPasses()
High level function that adds all passes necessary to go from llvm IR representation to the MI repres...
virtual void addPostRewrite()
Add passes to be run immediately after virtual registers are rewritten to physical registers.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void registerCodeGenCallback(PassInstrumentationCallbacks &PIC, TargetMachine &)
CodeGenOptLevel
Code generation optimization level.
Definition: CodeGen.h:54
const void * AnalysisID
Definition: Pass.h:50
@ Enable
Enable colors.
@ Disable
Disable colors.
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...