Skip to content

Commit

Permalink
Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126005 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
stoklund committed Feb 19, 2011
1 parent 4b19c98 commit 1b847de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/CodeGen/RegAllocGreedy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions lib/CodeGen/SplitKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion lib/CodeGen/SplitKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -105,7 +106,7 @@ class SplitAnalysis {
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
Expand Down

0 comments on commit 1b847de

Please sign in to comment.