aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PreAllocSplitting.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-03-14 21:40:05 +0000
committerOwen Anderson <resistor@mac.com>2009-03-14 21:40:05 +0000
commit14579cc542e52439b1768244822eb241938104c6 (patch)
treefe23c8844642accc88a98ec24111ac49feaedee9 /lib/CodeGen/PreAllocSplitting.cpp
parent778081a49dbbd1150b2f0de8b82b3d2dab4634e3 (diff)
downloadexternal_llvm-14579cc542e52439b1768244822eb241938104c6.zip
external_llvm-14579cc542e52439b1768244822eb241938104c6.tar.gz
external_llvm-14579cc542e52439b1768244822eb241938104c6.tar.bz2
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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp
index 581320a..f5e540d 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;