aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp2
-rw-r--r--lib/CodeGen/SplitKit.cpp7
-rw-r--r--lib/CodeGen/SplitKit.h3
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index 3c65cf3b29..c1372cd038 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -1266,7 +1266,7 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) {
Bundles = &getAnalysis<EdgeBundles>();
SpillPlacer = &getAnalysis<SpillPlacement>();
- SA.reset(new SplitAnalysis(*MF, *LIS, *Loops));
+ SA.reset(new SplitAnalysis(*VRM, *LIS, *Loops));
allocatePhysRegs();
addMBBLiveIns(MF);
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index 7b02b26623..5663936bf3 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/lib/CodeGen/SplitKit.cpp
@@ -37,13 +37,14 @@ AllowSplit("spiller-splits-edges",
// Split Analysis
//===----------------------------------------------------------------------===//
-SplitAnalysis::SplitAnalysis(const MachineFunction &mf,
+SplitAnalysis::SplitAnalysis(const VirtRegMap &vrm,
const LiveIntervals &lis,
const MachineLoopInfo &mli)
- : MF(mf),
+ : MF(vrm.getMachineFunction()),
+ VRM(vrm),
LIS(lis),
Loops(mli),
- TII(*mf.getTarget().getInstrInfo()),
+ TII(*MF.getTarget().getInstrInfo()),
CurLI(0) {}
void SplitAnalysis::clear() {
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 7adc0be10d..5c34afd1c8 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -43,6 +43,7 @@ typedef DomTreeNodeBase<MachineBasicBlock> MachineDomTreeNode;
class SplitAnalysis {
public:
const MachineFunction &MF;
+ const VirtRegMap &VRM;
const LiveIntervals &LIS;
const MachineLoopInfo &Loops;
const TargetInstrInfo &TII;
@@ -105,7 +106,7 @@ private:
bool canAnalyzeBranch(const MachineBasicBlock *MBB);
public:
- SplitAnalysis(const MachineFunction &mf, const LiveIntervals &lis,
+ SplitAnalysis(const VirtRegMap &vrm, const LiveIntervals &lis,
const MachineLoopInfo &mli);
/// analyze - set CurLI to the specified interval, and analyze how it may be