llvm.org GIT mirror llvm / 2721567
Refer to the RegisterCoalescer pass by ID. A public interface is no longer needed since RegisterCoalescer is not an analysis any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137082 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 8 years ago
7 changed file(s) with 11 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
2323 class MachineFunctionPass;
2424 class PassInfo;
2525 class TargetLowering;
26 class RegisterCoalescer;
2726 class raw_ostream;
2827
2928 /// createUnreachableBlockEliminationPass - The LLVM code generator does not
8079 /// register allocators.
8180 extern char &TwoAddressInstructionPassID;
8281
82 /// RegisteCoalescer pass - This pass merges live ranges to eliminate copies.
83 extern char &RegisterCoalescerPassID;
84
8385 /// SpillPlacement analysis. Suggest optimal placement of spill code between
8486 /// basic blocks.
8587 ///
123125 /// Quadratic Prograaming (PBQP) based register allocator.
124126 ///
125127 FunctionPass *createDefaultPBQPRegisterAllocator();
126
127 /// RegisterCoalescer Pass - Coalesce all copies possible. Can run
128 /// independently of the register allocator.
129 ///
130 RegisterCoalescer *createRegisterCoalescer();
131128
132129 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
133130 /// and eliminates abstract frame references.
1919 #include "RenderMachineFunction.h"
2020 #include "Spiller.h"
2121 #include "VirtRegMap.h"
22 #include "RegisterCoalescer.h"
2322 #include "llvm/ADT/OwningPtr.h"
2423 #include "llvm/ADT/Statistic.h"
2524 #include "llvm/Analysis/AliasAnalysis.h"
159158 AU.addPreserved();
160159 if (StrongPHIElim)
161160 AU.addRequiredID(StrongPHIEliminationID);
162 AU.addRequiredTransitive();
161 AU.addRequiredTransitiveID(RegisterCoalescerPassID);
163162 AU.addRequired();
164163 AU.addRequired();
165164 AU.addPreserved();
2121 #include "SpillPlacement.h"
2222 #include "SplitKit.h"
2323 #include "VirtRegMap.h"
24 #include "RegisterCoalescer.h"
2524 #include "llvm/ADT/Statistic.h"
2625 #include "llvm/Analysis/AliasAnalysis.h"
2726 #include "llvm/Function.h"
323322 AU.addPreserved();
324323 if (StrongPHIElim)
325324 AU.addRequiredID(StrongPHIEliminationID);
326 AU.addRequiredTransitive();
325 AU.addRequiredTransitiveID(RegisterCoalescerPassID);
327326 AU.addRequired();
328327 AU.addRequired();
329328 AU.addPreserved();
1717 #include "VirtRegRewriter.h"
1818 #include "RegisterClassInfo.h"
1919 #include "Spiller.h"
20 #include "RegisterCoalescer.h"
2120 #include "llvm/Analysis/AliasAnalysis.h"
2221 #include "llvm/Function.h"
2322 #include "llvm/CodeGen/CalcSpillWeights.h"
208207 AU.addRequiredID(StrongPHIEliminationID);
209208 // Make sure PassManager knows which analyses to make available
210209 // to coalescing and which analyses coalescing invalidates.
211 AU.addRequiredTransitive();
210 AU.addRequiredTransitiveID(RegisterCoalescerPassID);
212211 AU.addRequired();
213212 AU.addRequiredID(LiveStacksID);
214213 AU.addPreservedID(LiveStacksID);
449449 au.addPreserved();
450450 au.addRequired();
451451 //au.addRequiredID(SplitCriticalEdgesID);
452 au.addRequired();
452 au.addRequiredID(RegisterCoalescerPassID);
453453 if (customPassID)
454454 au.addRequiredID(*customPassID);
455455 au.addRequired();
7373 VerifyCoalescing("verify-coalescing",
7474 cl::desc("Verify machine instrs before and after register coalescing"),
7575 cl::Hidden);
76
77 char &llvm::RegisterCoalescerPassID = RegisterCoalescer::ID;
7678
7779 INITIALIZE_PASS_BEGIN(RegisterCoalescer, "simple-register-coalescing",
7880 "Simple Register Coalescing", false, false)
18401842 void RegisterCoalescer::print(raw_ostream &O, const Module* m) const {
18411843 li_->print(O, m);
18421844 }
1843
1844 RegisterCoalescer *llvm::createRegisterCoalescer() {
1845 return new RegisterCoalescer();
1846 }
1010
1111 #include "Splitter.h"
1212
13 #include "RegisterCoalescer.h"
1413 #include "llvm/Module.h"
1514 #include "llvm/CodeGen/CalcSpillWeights.h"
1615 #include "llvm/CodeGen/LiveIntervalAnalysis.h"
1918 #include "llvm/CodeGen/MachineInstrBuilder.h"
2019 #include "llvm/CodeGen/MachineFunction.h"
2120 #include "llvm/CodeGen/MachineRegisterInfo.h"
21 #include "llvm/CodeGen/Passes.h"
2222 #include "llvm/CodeGen/SlotIndexes.h"
2323 #include "llvm/Support/Debug.h"
2424 #include "llvm/Support/raw_ostream.h"
261261 au.addPreserved();
262262 au.addRequired();
263263 au.addPreserved();
264 au.addPreserved();
264 au.addPreservedID(RegisterCoalescerPassID);
265265 au.addPreserved();
266266 au.addPreserved();
267267 au.addRequired();