diff options
author | Andrew Trick <atrick@apple.com> | 2013-11-22 19:07:42 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-11-22 19:07:42 +0000 |
commit | 09f1b252af316c3edff5ab07de20ca8eeedb648d (patch) | |
tree | ba4cbeb7d158aca8e975242b2c764ca8331e2959 /lib/CodeGen | |
parent | 833a9e939503ef9f4e7ddc7a25c70ea9110a7ec9 (diff) | |
download | llvm-09f1b252af316c3edff5ab07de20ca8eeedb648d.tar.gz llvm-09f1b252af316c3edff5ab07de20ca8eeedb648d.tar.bz2 llvm-09f1b252af316c3edff5ab07de20ca8eeedb648d.tar.xz |
DEBUG shouldEvict decisions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/RegAllocBase.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAllocGreedy.cpp | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocBase.cpp b/lib/CodeGen/RegAllocBase.cpp index 293e306a29..2e433811f4 100644 --- a/lib/CodeGen/RegAllocBase.cpp +++ b/lib/CodeGen/RegAllocBase.cpp @@ -101,8 +101,8 @@ void RegAllocBase::allocatePhysRegs() { // register if possible and populate a list of new live intervals that // result from splitting. DEBUG(dbgs() << "\nselectOrSplit " - << MRI->getRegClass(VirtReg->reg)->getName() - << ':' << *VirtReg << '\n'); + << MRI->getRegClass(VirtReg->reg)->getName() + << ':' << *VirtReg << " w=" << VirtReg->weight << '\n'); typedef SmallVector<unsigned, 4> VirtRegVec; VirtRegVec SplitVRegs; unsigned AvailablePhysReg = selectOrSplit(*VirtReg, SplitVRegs); diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index ce3818a6c2..27dc07b54c 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -548,7 +548,11 @@ bool RAGreedy::shouldEvict(LiveInterval &A, bool IsHint, if (CanSplit && IsHint && !BreaksHint) return true; - return A.weight > B.weight; + if (A.weight > B.weight) { + DEBUG(dbgs() << "should evict: " << B << " w= " << B.weight << '\n'); + return true; + } + return false; } /// canEvictInterference - Return true if all interferences between VirtReg and |