diff options
author | Lang Hames <lhames@gmail.com> | 2010-09-02 08:27:00 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2010-09-02 08:27:00 +0000 |
commit | 33198391d6d30127643c0d1f4ae9ed1ef85ed7f0 (patch) | |
tree | 96d08c0ea047540f1648adf4ee06c13e8bda3f34 /lib/CodeGen/RegAllocPBQP.cpp | |
parent | fc6e29d4ab52b7d3efd83846ed495a9ca7e51e49 (diff) | |
download | llvm-33198391d6d30127643c0d1f4ae9ed1ef85ed7f0.tar.gz llvm-33198391d6d30127643c0d1f4ae9ed1ef85ed7f0.tar.bz2 llvm-33198391d6d30127643c0d1f4ae9ed1ef85ed7f0.tar.xz |
Added support for register allocators to record which intervals are spill intervals, and where the uses and defs of the original intervals were in the original code.
Spill intervals can be hidden using the "-rmf-intervals=virt-nospills*" option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocPBQP.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocPBQP.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp index c6fdf04c7a..61f337bab4 100644 --- a/lib/CodeGen/RegAllocPBQP.cpp +++ b/lib/CodeGen/RegAllocPBQP.cpp @@ -140,6 +140,7 @@ namespace { const TargetInstrInfo *tii; const MachineLoopInfo *loopInfo; MachineRegisterInfo *mri; + RenderMachineFunction *rmf; LiveIntervals *lis; LiveStacks *lss; @@ -761,9 +762,11 @@ bool PBQPRegAlloc::mapPBQPToRegAlloc(const PBQP::Solution &solution) { const LiveInterval *spillInterval = node2LI[node]; double oldSpillWeight = spillInterval->weight; SmallVector<LiveInterval*, 8> spillIs; + rmf->rememberUseDefs(spillInterval); std::vector<LiveInterval*> newSpills = lis->addIntervalsForSpills(*spillInterval, spillIs, loopInfo, *vrm); addStackInterval(spillInterval, mri); + rmf->rememberSpills(spillInterval, newSpills); (void) oldSpillWeight; DEBUG(dbgs() << "VREG " << virtReg << " -> SPILLED (Cost: " @@ -871,7 +874,7 @@ bool PBQPRegAlloc::runOnMachineFunction(MachineFunction &MF) { lis = &getAnalysis<LiveIntervals>(); lss = &getAnalysis<LiveStacks>(); loopInfo = &getAnalysis<MachineLoopInfo>(); - RenderMachineFunction *rmf = &getAnalysis<RenderMachineFunction>(); + rmf = &getAnalysis<RenderMachineFunction>(); vrm = &getAnalysis<VirtRegMap>(); |