llvm.org GIT mirror llvm / 7eaa93a
LiveIntervalAnalysis: Remove LiveVariables requirement This requirement was a huge hack to keep LiveVariables alive because it was optionally used by TwoAddressInstructionPass and PHIElimination. However we have AnalysisUsage::addUsedIfAvailable() which we can use in those passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260806 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 4 years ago
3 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
88 //
99 // This file implements the LiveInterval analysis pass which is used
1010 // by the Linear Scan Register allocator. This pass linearizes the
11 // basic blocks of the function in DFS order and uses the
12 // LiveVariables pass to conservatively compute live intervals for
11 // basic blocks of the function in DFS order and computes live intervals for
1312 // each virtual and physical register.
1413 //
1514 //===----------------------------------------------------------------------===//
4746 INITIALIZE_PASS_BEGIN(LiveIntervals, "liveintervals",
4847 "Live Interval Analysis", false, false)
4948 INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
50 INITIALIZE_PASS_DEPENDENCY(LiveVariables)
5149 INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
5250 INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
5351 INITIALIZE_PASS_END(LiveIntervals, "liveintervals",
7674 AU.setPreservesCFG();
7775 AU.addRequired();
7876 AU.addPreserved();
79 // LiveVariables isn't really required by this analysis, it is only required
80 // here to make sure it is live during TwoAddressInstructionPass and
81 // PHIElimination. This is temporary.
82 AU.addRequired();
8377 AU.addPreserved();
8478 AU.addPreservedID(MachineLoopInfoID);
8579 AU.addRequiredTransitiveID(MachineDominatorsID);
120120 "Eliminate PHI nodes for register allocation", false, false)
121121
122122 void PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const {
123 AU.addUsedIfAvailable();
123124 AU.addPreserved();
124125 AU.addPreserved();
125126 AU.addPreserved();
156156 void getAnalysisUsage(AnalysisUsage &AU) const override {
157157 AU.setPreservesCFG();
158158 AU.addRequired();
159 AU.addUsedIfAvailable();
159160 AU.addPreserved();
160161 AU.addPreserved();
161162 AU.addPreserved();