diff options
author | Owen Anderson <resistor@mac.com> | 2009-03-14 21:40:05 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-03-14 21:40:05 +0000 |
commit | 420dd3732633986267996e76650422c0fa6f4993 (patch) | |
tree | fe23c8844642accc88a98ec24111ac49feaedee9 /lib/CodeGen/PreAllocSplitting.cpp | |
parent | b24e6c4dd39a596ff55bdc8002895ab35115bd23 (diff) |
Give the pre-alloc splitter access to the VirtRegMap. It doesn't do anything
useful with it at the moment, but it will in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67012 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r-- | lib/CodeGen/PreAllocSplitting.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index 581320a396..f5e540dfbb 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/lib/CodeGen/PreAllocSplitting.cpp @@ -15,6 +15,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "pre-alloc-split" +#include "VirtRegMap.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/LiveStackAnalysis.h" #include "llvm/CodeGen/MachineDominators.h" @@ -57,6 +58,7 @@ namespace { MachineRegisterInfo *MRI; LiveIntervals *LIs; LiveStacks *LSs; + VirtRegMap *VRM; // Barrier - Current barrier being processed. MachineInstr *Barrier; @@ -100,8 +102,10 @@ namespace { AU.addPreservedID(PHIEliminationID); AU.addRequired<MachineDominatorTree>(); AU.addRequired<MachineLoopInfo>(); + AU.addRequired<VirtRegMap>(); AU.addPreserved<MachineDominatorTree>(); AU.addPreserved<MachineLoopInfo>(); + AU.addPreserved<VirtRegMap>(); MachineFunctionPass::getAnalysisUsage(AU); } @@ -917,6 +921,9 @@ void PreAllocSplitting::RenumberValno(VNInfo* VN) { MO.setReg(NewVReg); } + // Grow the VirtRegMap, since we've created a new vreg. + VRM->grow(); + // The renumbered vreg shares a stack slot with the old register. if (IntervalSSMap.count(CurrLI->reg)) IntervalSSMap[NewVReg] = IntervalSSMap[CurrLI->reg]; @@ -1512,6 +1519,7 @@ bool PreAllocSplitting::runOnMachineFunction(MachineFunction &MF) { MRI = &MF.getRegInfo(); LIs = &getAnalysis<LiveIntervals>(); LSs = &getAnalysis<LiveStacks>(); + VRM = &getAnalysis<VirtRegMap>(); bool MadeChange = false; |