1 //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines interfaces to access the target independent code generation
11 // passes provided by the LLVM backend.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CODEGEN_PASSES_H
16 #define LLVM_CODEGEN_PASSES_H
18 #include "llvm/Pass.h"
19 #include "llvm/Target/TargetMachine.h"
25 class MachineFunctionPass;
28 class ScheduleDAGInstrs;
30 class TargetLoweringBase;
31 class TargetRegisterClass;
33 struct MachineSchedContext;
35 // The old pass manager infrastructure is hidden in a legacy namespace now.
37 class PassManagerBase;
39 using legacy::PassManagerBase;
41 /// Discriminated union of Pass ID types.
43 /// The PassConfig API prefers dealing with IDs because they are safer and more
44 /// efficient. IDs decouple configuration from instantiation. This way, when a
45 /// pass is overriden, it isn't unnecessarily instantiated. It is also unsafe to
46 /// refer to a Pass pointer after adding it to a pass manager, which deletes
47 /// redundant pass instances.
49 /// However, it is convient to directly instantiate target passes with
50 /// non-default ctors. These often don't have a registered PassInfo. Rather than
51 /// force all target passes to implement the pass registry boilerplate, allow
52 /// the PassConfig API to handle either type.
54 /// AnalysisID is sadly char*, so PointerIntPair won't work.
55 class IdentifyingPassPtr {
62 IdentifyingPassPtr() : P(nullptr), IsInstance(false) {}
63 IdentifyingPassPtr(AnalysisID IDPtr) : ID(IDPtr), IsInstance(false) {}
64 IdentifyingPassPtr(Pass *InstancePtr) : P(InstancePtr), IsInstance(true) {}
66 bool isValid() const { return P; }
67 bool isInstance() const { return IsInstance; }
69 AnalysisID getID() const {
70 assert(!IsInstance && "Not a Pass ID");
73 Pass *getInstance() const {
74 assert(IsInstance && "Not a Pass Instance");
79 template <> struct isPodLike<IdentifyingPassPtr> {
80 static const bool value = true;
83 /// Target-Independent Code Generator Pass Configuration Options.
85 /// This is an ImmutablePass solely for the purpose of exposing CodeGen options
86 /// to the internals of other CodeGen passes.
87 class TargetPassConfig : public ImmutablePass {
89 /// Pseudo Pass IDs. These are defined within TargetPassConfig because they
90 /// are unregistered pass IDs. They are only useful for use with
91 /// TargetPassConfig APIs to identify multiple occurrences of the same pass.
94 /// EarlyTailDuplicate - A clone of the TailDuplicate pass that runs early
95 /// during codegen, on SSA form.
96 static char EarlyTailDuplicateID;
98 /// PostRAMachineLICM - A clone of the LICM pass that runs during late machine
99 /// optimization after regalloc.
100 static char PostRAMachineLICMID;
104 AnalysisID StartBefore, StartAfter;
105 AnalysisID StopAfter;
108 bool AddingMachinePasses;
112 PassConfigImpl *Impl; // Internal data structures
113 bool Initialized; // Flagged after all passes are configured.
115 // Target Pass Options
116 // Targets provide a default setting, user flags override.
120 /// Default setting for -enable-tail-merge on this target.
121 bool EnableTailMerge;
124 TargetPassConfig(TargetMachine *tm, PassManagerBase &pm);
125 // Dummy constructor.
128 ~TargetPassConfig() override;
132 /// Get the right type of TargetMachine for this target.
133 template<typename TMC> TMC &getTM() const {
134 return *static_cast<TMC*>(TM);
138 void setInitialized() { Initialized = true; }
140 CodeGenOpt::Level getOptLevel() const { return TM->getOptLevel(); }
142 /// Set the StartAfter, StartBefore and StopAfter passes to allow running only
143 /// a portion of the normal code-gen pass sequence.
145 /// If the StartAfter and StartBefore pass ID is zero, then compilation will
146 /// begin at the normal point; otherwise, clear the Started flag to indicate
147 /// that passes should not be added until the starting pass is seen. If the
148 /// Stop pass ID is zero, then compilation will continue to the end.
150 /// This function expects that at least one of the StartAfter or the
151 /// StartBefore pass IDs is null.
152 void setStartStopPasses(AnalysisID StartBefore, AnalysisID StartAfter,
153 AnalysisID StopAfter) {
155 assert(!StartBefore && "Start after and start before passes are given");
156 this->StartBefore = StartBefore;
157 this->StartAfter = StartAfter;
158 this->StopAfter = StopAfter;
159 Started = (StartAfter == nullptr) && (StartBefore == nullptr);
162 void setDisableVerify(bool Disable) { setOpt(DisableVerify, Disable); }
164 bool getEnableTailMerge() const { return EnableTailMerge; }
165 void setEnableTailMerge(bool Enable) { setOpt(EnableTailMerge, Enable); }
167 /// Allow the target to override a specific pass without overriding the pass
168 /// pipeline. When passes are added to the standard pipeline at the
169 /// point where StandardID is expected, add TargetID in its place.
170 void substitutePass(AnalysisID StandardID, IdentifyingPassPtr TargetID);
172 /// Insert InsertedPassID pass after TargetPassID pass.
173 void insertPass(AnalysisID TargetPassID, IdentifyingPassPtr InsertedPassID,
174 bool VerifyAfter = true, bool PrintAfter = true);
176 /// Allow the target to enable a specific standard pass by default.
177 void enablePass(AnalysisID PassID) { substitutePass(PassID, PassID); }
179 /// Allow the target to disable a specific standard pass by default.
180 void disablePass(AnalysisID PassID) {
181 substitutePass(PassID, IdentifyingPassPtr());
184 /// Return the pass substituted for StandardID by the target.
185 /// If no substitution exists, return StandardID.
186 IdentifyingPassPtr getPassSubstitution(AnalysisID StandardID) const;
188 /// Return true if the optimized regalloc pipeline is enabled.
189 bool getOptimizeRegAlloc() const;
191 /// Return true if shrink wrapping is enabled.
192 bool getEnableShrinkWrap() const;
194 /// Return true if the default global register allocator is in use and
195 /// has not be overriden on the command line with '-regalloc=...'
196 bool usingDefaultRegAlloc() const;
198 /// Add common target configurable passes that perform LLVM IR to IR
199 /// transforms following machine independent optimization.
200 virtual void addIRPasses();
202 /// Add passes to lower exception handling for the code generator.
203 void addPassesToHandleExceptions();
205 /// Add pass to prepare the LLVM IR for code generation. This should be done
206 /// before exception handling preparation passes.
207 virtual void addCodeGenPrepare();
209 /// Add common passes that perform LLVM IR to IR transforms in preparation for
210 /// instruction selection.
211 virtual void addISelPrepare();
213 /// addInstSelector - This method should install an instruction selector pass,
214 /// which converts from LLVM code to machine instructions.
215 virtual bool addInstSelector() {
219 /// Add the complete, standard set of LLVM CodeGen passes.
220 /// Fully developed targets will not generally override this.
221 virtual void addMachinePasses();
223 /// Create an instance of ScheduleDAGInstrs to be run within the standard
224 /// MachineScheduler pass for this function and target at the current
225 /// optimization level.
227 /// This can also be used to plug a new MachineSchedStrategy into an instance
228 /// of the standard ScheduleDAGMI:
229 /// return new ScheduleDAGMI(C, make_unique<MyStrategy>(C), /*RemoveKillFlags=*/false)
231 /// Return NULL to select the default (generic) machine scheduler.
232 virtual ScheduleDAGInstrs *
233 createMachineScheduler(MachineSchedContext *C) const {
237 /// Similar to createMachineScheduler but used when postRA machine scheduling
239 virtual ScheduleDAGInstrs *
240 createPostMachineScheduler(MachineSchedContext *C) const {
245 // Helper to verify the analysis is really immutable.
246 void setOpt(bool &Opt, bool Val);
248 /// Methods with trivial inline returns are convenient points in the common
249 /// codegen pass pipeline where targets may insert passes. Methods with
250 /// out-of-line standard implementations are major CodeGen stages called by
251 /// addMachinePasses. Some targets may override major stages when inserting
252 /// passes is insufficient, but maintaining overriden stages is more work.
255 /// addPreISelPasses - This method should add any "last minute" LLVM->LLVM
256 /// passes (which are run just before instruction selector).
257 virtual bool addPreISel() {
261 /// addMachineSSAOptimization - Add standard passes that optimize machine
262 /// instructions in SSA form.
263 virtual void addMachineSSAOptimization();
265 /// Add passes that optimize instruction level parallelism for out-of-order
266 /// targets. These passes are run while the machine code is still in SSA
267 /// form, so they can use MachineTraceMetrics to control their heuristics.
269 /// All passes added here should preserve the MachineDominatorTree,
270 /// MachineLoopInfo, and MachineTraceMetrics analyses.
271 virtual bool addILPOpts() {
275 /// This method may be implemented by targets that want to run passes
276 /// immediately before register allocation.
277 virtual void addPreRegAlloc() { }
279 /// createTargetRegisterAllocator - Create the register allocator pass for
280 /// this target at the current optimization level.
281 virtual FunctionPass *createTargetRegisterAllocator(bool Optimized);
283 /// addFastRegAlloc - Add the minimum set of target-independent passes that
284 /// are required for fast register allocation.
285 virtual void addFastRegAlloc(FunctionPass *RegAllocPass);
287 /// addOptimizedRegAlloc - Add passes related to register allocation.
288 /// LLVMTargetMachine provides standard regalloc passes for most targets.
289 virtual void addOptimizedRegAlloc(FunctionPass *RegAllocPass);
291 /// addPreRewrite - Add passes to the optimized register allocation pipeline
292 /// after register allocation is complete, but before virtual registers are
293 /// rewritten to physical registers.
295 /// These passes must preserve VirtRegMap and LiveIntervals, and when running
296 /// after RABasic or RAGreedy, they should take advantage of LiveRegMatrix.
297 /// When these passes run, VirtRegMap contains legal physreg assignments for
298 /// all virtual registers.
299 virtual bool addPreRewrite() {
303 /// This method may be implemented by targets that want to run passes after
304 /// register allocation pass pipeline but before prolog-epilog insertion.
305 virtual void addPostRegAlloc() { }
307 /// Add passes that optimize machine instructions after register allocation.
308 virtual void addMachineLateOptimization();
310 /// This method may be implemented by targets that want to run passes after
311 /// prolog-epilog insertion and before the second instruction scheduling pass.
312 virtual void addPreSched2() { }
314 /// addGCPasses - Add late codegen passes that analyze code for garbage
315 /// collection. This should return true if GC info should be printed after
317 virtual bool addGCPasses();
319 /// Add standard basic block placement passes.
320 virtual void addBlockPlacement();
322 /// This pass may be implemented by targets that want to run passes
323 /// immediately before machine code is emitted.
324 virtual void addPreEmitPass() { }
326 /// Utilities for targets to add passes to the pass manager.
329 /// Add a CodeGen pass at this point in the pipeline after checking overrides.
330 /// Return the pass that was added, or zero if no pass was added.
331 /// @p printAfter if true and adding a machine function pass add an extra
332 /// machine printer pass afterwards
333 /// @p verifyAfter if true and adding a machine function pass add an extra
334 /// machine verification pass afterwards.
335 AnalysisID addPass(AnalysisID PassID, bool verifyAfter = true,
336 bool printAfter = true);
338 /// Add a pass to the PassManager if that pass is supposed to be run, as
339 /// determined by the StartAfter and StopAfter options. Takes ownership of the
341 /// @p printAfter if true and adding a machine function pass add an extra
342 /// machine printer pass afterwards
343 /// @p verifyAfter if true and adding a machine function pass add an extra
344 /// machine verification pass afterwards.
345 void addPass(Pass *P, bool verifyAfter = true, bool printAfter = true);
347 /// addMachinePasses helper to create the target-selected or overriden
349 FunctionPass *createRegAllocPass(bool Optimized);
351 /// printAndVerify - Add a pass to dump then verify the machine function, if
352 /// those steps are enabled.
354 void printAndVerify(const std::string &Banner);
356 /// Add a pass to print the machine function if printing is enabled.
357 void addPrintPass(const std::string &Banner);
359 /// Add a pass to perform basic verification of the machine function if
360 /// verification is enabled.
361 void addVerifyPass(const std::string &Banner);
365 /// List of target independent CodeGen pass IDs.
367 FunctionPass *createAtomicExpandPass(const TargetMachine *TM);
369 /// createUnreachableBlockEliminationPass - The LLVM code generator does not
370 /// work well with unreachable basic blocks (what live ranges make sense for a
371 /// block that cannot be reached?). As such, a code generator should either
372 /// not instruction select unreachable blocks, or run this pass as its
373 /// last LLVM modifying pass to clean up blocks that are not reachable from
375 FunctionPass *createUnreachableBlockEliminationPass();
377 /// MachineFunctionPrinter pass - This pass prints out the machine function to
378 /// the given stream as a debugging tool.
379 MachineFunctionPass *
380 createMachineFunctionPrinterPass(raw_ostream &OS,
381 const std::string &Banner ="");
383 /// MIRPrinting pass - this pass prints out the LLVM IR into the given stream
384 /// using the MIR serialization format.
385 MachineFunctionPass *createPrintMIRPass(raw_ostream &OS);
387 /// createCodeGenPreparePass - Transform the code to expose more pattern
388 /// matching during instruction selection.
389 FunctionPass *createCodeGenPreparePass(const TargetMachine *TM = nullptr);
391 /// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg
392 /// load-linked/store-conditional loops.
393 extern char &AtomicExpandID;
395 /// MachineLoopInfo - This pass is a loop analysis pass.
396 extern char &MachineLoopInfoID;
398 /// MachineDominators - This pass is a machine dominators analysis pass.
399 extern char &MachineDominatorsID;
401 /// MachineDominanaceFrontier - This pass is a machine dominators analysis pass.
402 extern char &MachineDominanceFrontierID;
404 /// EdgeBundles analysis - Bundle machine CFG edges.
405 extern char &EdgeBundlesID;
407 /// LiveVariables pass - This pass computes the set of blocks in which each
408 /// variable is life and sets machine operand kill flags.
409 extern char &LiveVariablesID;
411 /// PHIElimination - This pass eliminates machine instruction PHI nodes
412 /// by inserting copy instructions. This destroys SSA information, but is the
413 /// desired input for some register allocators. This pass is "required" by
414 /// these register allocator like this: AU.addRequiredID(PHIEliminationID);
415 extern char &PHIEliminationID;
417 /// LiveIntervals - This analysis keeps track of the live ranges of virtual
418 /// and physical registers.
419 extern char &LiveIntervalsID;
421 /// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
422 extern char &LiveStacksID;
424 /// TwoAddressInstruction - This pass reduces two-address instructions to
425 /// use two operands. This destroys SSA information but it is desired by
426 /// register allocators.
427 extern char &TwoAddressInstructionPassID;
429 /// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
430 extern char &ProcessImplicitDefsID;
432 /// RegisterCoalescer - This pass merges live ranges to eliminate copies.
433 extern char &RegisterCoalescerID;
435 /// MachineScheduler - This pass schedules machine instructions.
436 extern char &MachineSchedulerID;
438 /// PostMachineScheduler - This pass schedules machine instructions postRA.
439 extern char &PostMachineSchedulerID;
441 /// SpillPlacement analysis. Suggest optimal placement of spill code between
443 extern char &SpillPlacementID;
445 /// ShrinkWrap pass. Look for the best place to insert save and restore
446 // instruction and update the MachineFunctionInfo with that information.
447 extern char &ShrinkWrapID;
449 /// VirtRegRewriter pass. Rewrite virtual registers to physical registers as
450 /// assigned in VirtRegMap.
451 extern char &VirtRegRewriterID;
453 /// UnreachableMachineBlockElimination - This pass removes unreachable
454 /// machine basic blocks.
455 extern char &UnreachableMachineBlockElimID;
457 /// DeadMachineInstructionElim - This pass removes dead machine instructions.
458 extern char &DeadMachineInstructionElimID;
460 /// FastRegisterAllocation Pass - This pass register allocates as fast as
461 /// possible. It is best suited for debug code where live ranges are short.
463 FunctionPass *createFastRegisterAllocator();
465 /// BasicRegisterAllocation Pass - This pass implements a degenerate global
466 /// register allocator using the basic regalloc framework.
468 FunctionPass *createBasicRegisterAllocator();
470 /// Greedy register allocation pass - This pass implements a global register
471 /// allocator for optimized builds.
473 FunctionPass *createGreedyRegisterAllocator();
475 /// PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean
476 /// Quadratic Prograaming (PBQP) based register allocator.
478 FunctionPass *createDefaultPBQPRegisterAllocator();
480 /// PrologEpilogCodeInserter - This pass inserts prolog and epilog code,
481 /// and eliminates abstract frame references.
482 extern char &PrologEpilogCodeInserterID;
484 /// ExpandPostRAPseudos - This pass expands pseudo instructions after
485 /// register allocation.
486 extern char &ExpandPostRAPseudosID;
488 /// createPostRAScheduler - This pass performs post register allocation
490 extern char &PostRASchedulerID;
492 /// BranchFolding - This pass performs machine code CFG based
493 /// optimizations to delete branches to branches, eliminate branches to
494 /// successor blocks (creating fall throughs), and eliminating branches over
496 extern char &BranchFolderPassID;
498 /// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
499 extern char &MachineFunctionPrinterPassID;
501 /// MIRPrintingPass - this pass prints out the LLVM IR using the MIR
502 /// serialization format.
503 extern char &MIRPrintingPassID;
505 /// TailDuplicate - Duplicate blocks with unconditional branches
506 /// into tails of their predecessors.
507 extern char &TailDuplicateID;
509 /// MachineTraceMetrics - This pass computes critical path and CPU resource
510 /// usage in an ensemble of traces.
511 extern char &MachineTraceMetricsID;
513 /// EarlyIfConverter - This pass performs if-conversion on SSA form by
514 /// inserting cmov instructions.
515 extern char &EarlyIfConverterID;
517 /// This pass performs instruction combining using trace metrics to estimate
518 /// critical-path and resource depth.
519 extern char &MachineCombinerID;
521 /// StackSlotColoring - This pass performs stack coloring and merging.
522 /// It merges disjoint allocas to reduce the stack size.
523 extern char &StackColoringID;
525 /// IfConverter - This pass performs machine code if conversion.
526 extern char &IfConverterID;
528 FunctionPass *createIfConverter(std::function<bool(const Function &)> Ftor);
530 /// MachineBlockPlacement - This pass places basic blocks based on branch
532 extern char &MachineBlockPlacementID;
534 /// MachineBlockPlacementStats - This pass collects statistics about the
535 /// basic block placement using branch probabilities and block frequency
537 extern char &MachineBlockPlacementStatsID;
539 /// GCLowering Pass - Used by gc.root to perform its default lowering
541 FunctionPass *createGCLoweringPass();
543 /// ShadowStackGCLowering - Implements the custom lowering mechanism
544 /// used by the shadow stack GC. Only runs on functions which opt in to
545 /// the shadow stack collector.
546 FunctionPass *createShadowStackGCLoweringPass();
548 /// GCMachineCodeAnalysis - Target-independent pass to mark safe points
549 /// in machine code. Must be added very late during code generation, just
550 /// prior to output, and importantly after all CFG transformations (such as
552 extern char &GCMachineCodeAnalysisID;
554 /// Creates a pass to print GC metadata.
556 FunctionPass *createGCInfoPrinter(raw_ostream &OS);
558 /// MachineCSE - This pass performs global CSE on machine instructions.
559 extern char &MachineCSEID;
561 /// ImplicitNullChecks - This pass folds null pointer checks into nearby
562 /// memory operations.
563 extern char &ImplicitNullChecksID;
565 /// MachineLICM - This pass performs LICM on machine instructions.
566 extern char &MachineLICMID;
568 /// MachineSinking - This pass performs sinking on machine instructions.
569 extern char &MachineSinkingID;
571 /// MachineCopyPropagation - This pass performs copy propagation on
572 /// machine instructions.
573 extern char &MachineCopyPropagationID;
575 /// PeepholeOptimizer - This pass performs peephole optimizations -
576 /// like extension and comparison eliminations.
577 extern char &PeepholeOptimizerID;
579 /// OptimizePHIs - This pass optimizes machine instruction PHIs
580 /// to take advantage of opportunities created during DAG legalization.
581 extern char &OptimizePHIsID;
583 /// StackSlotColoring - This pass performs stack slot coloring.
584 extern char &StackSlotColoringID;
586 /// \brief This pass lays out funclets contiguously.
587 extern char &FuncletLayoutID;
589 /// createStackProtectorPass - This pass adds stack protectors to functions.
591 FunctionPass *createStackProtectorPass(const TargetMachine *TM);
593 /// createMachineVerifierPass - This pass verifies cenerated machine code
594 /// instructions for correctness.
596 FunctionPass *createMachineVerifierPass(const std::string& Banner);
598 /// createDwarfEHPass - This pass mulches exception handling code into a form
599 /// adapted to code generation. Required if using dwarf exception handling.
600 FunctionPass *createDwarfEHPass(const TargetMachine *TM);
602 /// createWinEHPass - Prepares personality functions used by MSVC on Windows,
603 /// in addition to the Itanium LSDA based personalities.
604 FunctionPass *createWinEHPass(const TargetMachine *TM);
606 /// createSjLjEHPreparePass - This pass adapts exception handling code to use
607 /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow.
609 FunctionPass *createSjLjEHPreparePass();
611 /// LocalStackSlotAllocation - This pass assigns local frame indices to stack
612 /// slots relative to one another and allocates base registers to access them
613 /// when it is estimated by the target to be out of range of normal frame
614 /// pointer or stack pointer index addressing.
615 extern char &LocalStackSlotAllocationID;
617 /// ExpandISelPseudos - This pass expands pseudo-instructions.
618 extern char &ExpandISelPseudosID;
620 /// createExecutionDependencyFixPass - This pass fixes execution time
621 /// problems with dependent instructions, such as switching execution
622 /// domains to match.
624 /// The pass will examine instructions using and defining registers in RC.
626 FunctionPass *createExecutionDependencyFixPass(const TargetRegisterClass *RC);
628 /// UnpackMachineBundles - This pass unpack machine instruction bundles.
629 extern char &UnpackMachineBundlesID;
632 createUnpackMachineBundles(std::function<bool(const Function &)> Ftor);
634 /// FinalizeMachineBundles - This pass finalize machine instruction
635 /// bundles (created earlier, e.g. during pre-RA scheduling).
636 extern char &FinalizeMachineBundlesID;
638 /// StackMapLiveness - This pass analyses the register live-out set of
639 /// stackmap/patchpoint intrinsics and attaches the calculated information to
640 /// the intrinsic for later emission to the StackMap.
641 extern char &StackMapLivenessID;
643 /// createJumpInstrTables - This pass creates jump-instruction tables.
644 ModulePass *createJumpInstrTablesPass();
646 /// createForwardControlFlowIntegrityPass - This pass adds control-flow
648 ModulePass *createForwardControlFlowIntegrityPass();
650 /// InterleavedAccess Pass - This pass identifies and matches interleaved
651 /// memory accesses to target specific intrinsics.
653 FunctionPass *createInterleavedAccessPass(const TargetMachine *TM);
654 } // End llvm namespace
656 /// Target machine pass initializer for passes with dependencies. Use with
657 /// INITIALIZE_TM_PASS_END.
658 #define INITIALIZE_TM_PASS_BEGIN INITIALIZE_PASS_BEGIN
660 /// Target machine pass initializer for passes with dependencies. Use with
661 /// INITIALIZE_TM_PASS_BEGIN.
662 #define INITIALIZE_TM_PASS_END(passName, arg, name, cfg, analysis) \
663 PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
664 PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis, \
665 PassInfo::TargetMachineCtor_t(callTargetMachineCtor< passName >)); \
666 Registry.registerPass(*PI, true); \
669 void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
670 CALL_ONCE_INITIALIZATION(initialize##passName##PassOnce) \
673 /// This initializer registers TargetMachine constructor, so the pass being
674 /// initialized can use target dependent interfaces. Please do not move this
675 /// macro to be together with INITIALIZE_PASS, which is a complete target
676 /// independent initializer, and we don't want to make libScalarOpts depend
678 #define INITIALIZE_TM_PASS(passName, arg, name, cfg, analysis) \
679 INITIALIZE_TM_PASS_BEGIN(passName, arg, name, cfg, analysis) \
680 INITIALIZE_TM_PASS_END(passName, arg, name, cfg, analysis)