summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-19 05:55:50 +0000
committerChris Lattner <sabre@nondot.org>2004-07-19 05:55:50 +0000
commita618e13c8390040521e3bd55cfd072d3afd3f7d0 (patch)
treeaadcb0c39264415ebe78e8727354183e2af94b7d /llvm/lib
parentc56f90d156a89d149c1b0b98654bb29f44c7070a (diff)
downloadbcm5719-llvm-a618e13c8390040521e3bd55cfd072d3afd3f7d0.tar.gz
bcm5719-llvm-a618e13c8390040521e3bd55cfd072d3afd3f7d0.zip
Two changes, both very significant:
* vreg <-> vreg joining now works, enable it unconditionally when joining is enabled (which is the default). * Fix a serious pessimization of spill code where we were saying that a spilled DEF operand was live into the subsequent instruction. This allows for substantially better code when spilling starts to happen. llvm-svn: 14993
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveIntervals.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervals.cpp b/llvm/lib/CodeGen/LiveIntervals.cpp
index 9687e589812..ee988b10a40 100644
--- a/llvm/lib/CodeGen/LiveIntervals.cpp
+++ b/llvm/lib/CodeGen/LiveIntervals.cpp
@@ -60,11 +60,6 @@ namespace {
EnableJoining("join-liveintervals",
cl::desc("Join compatible live intervals"),
cl::init(true));
-
- cl::opt<bool>
- EnableVirtVirtJoining("join-liveintervals-virtvirtjoining",
- cl::desc("Join live intervals for virtreg pairs (buggy)"),
- cl::init(false));
};
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const
@@ -251,7 +246,7 @@ std::vector<LiveInterval*> LiveIntervals::addIntervalsForSpills(
// use of the next instruction. Otherwise we end
// after the use of this instruction.
unsigned end = 1 + (mop.isDef() ?
- getUseIndex(index+InstrSlots::NUM) :
+ getStoreIndex(index) :
getUseIndex(index));
// create a new register for this spill
@@ -545,11 +540,7 @@ void LiveIntervals::joinIntervals()
Intervals::iterator intB = r2iB->second;
// both A and B are virtual registers
-
- // FIXME: coallescing two virtual registers together is
- // apparently broken.
- if (EnableVirtVirtJoining &&
- MRegisterInfo::isVirtualRegister(intA->reg) &&
+ if (MRegisterInfo::isVirtualRegister(intA->reg) &&
MRegisterInfo::isVirtualRegister(intB->reg)) {
const TargetRegisterClass *rcA, *rcB;
OpenPOWER on IntegriCloud