[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervals.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jul 17 14:51:35 PDT 2004
Changes in directory llvm/lib/CodeGen:
LiveIntervals.cpp updated: 1.88 -> 1.89
---
Log message:
It looks like physref->virtreg joining is working fine. Enable it by default
but make virtreg->virtreg joining stay off by default
---
Diffs of the changes: (+19 -10)
Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.88 llvm/lib/CodeGen/LiveIntervals.cpp:1.89
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.88 Fri Jul 9 06:25:27 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp Sat Jul 17 16:51:25 2004
@@ -57,9 +57,13 @@
("liveintervals", "Number of loads/stores folded into instructions");
cl::opt<bool>
- join("join-liveintervals",
- cl::desc("Join compatible live intervals"),
- cl::init(false));
+ 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
@@ -115,7 +119,7 @@
numIntervals += intervals_.size();
// join intervals if requested
- if (join) joinIntervals();
+ if (EnableJoining) joinIntervals();
numIntervalsAfter += intervals_.size();
@@ -494,15 +498,21 @@
continue;
Reg2IntervalMap::iterator r2iA = r2iMap_.find(regA);
- assert(r2iA != r2iMap_.end());
+ assert(r2iA != r2iMap_.end() &&
+ "Found unknown vreg in 'isMoveInstr' instruction");
Reg2IntervalMap::iterator r2iB = r2iMap_.find(regB);
- assert(r2iB != r2iMap_.end());
+ assert(r2iB != r2iMap_.end() &&
+ "Found unknown vreg in 'isMoveInstr' instruction");
Intervals::iterator intA = r2iA->second;
Intervals::iterator intB = r2iB->second;
// both A and B are virtual registers
- if (MRegisterInfo::isVirtualRegister(intA->reg) &&
+
+ // FIXME: coallescing two virtual registers together is
+ // apparently broken.
+ if (EnableVirtVirtJoining &&
+ MRegisterInfo::isVirtualRegister(intA->reg) &&
MRegisterInfo::isVirtualRegister(intB->reg)) {
const TargetRegisterClass *rcA, *rcB;
@@ -519,9 +529,8 @@
r2rMap_.insert(std::make_pair(intB->reg, intA->reg));
intervals_.erase(intB);
}
- }
- else if (MRegisterInfo::isPhysicalRegister(intA->reg) ^
- MRegisterInfo::isPhysicalRegister(intB->reg)) {
+ } else if (MRegisterInfo::isPhysicalRegister(intA->reg) ^
+ MRegisterInfo::isPhysicalRegister(intB->reg)) {
if (MRegisterInfo::isPhysicalRegister(intB->reg)) {
std::swap(regA, regB);
std::swap(intA, intB);
More information about the llvm-commits
mailing list