It looks like physref->virtreg joining is working fine. Enable it by default

but make virtreg->virtreg joining stay off by default


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14916 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-07-17 21:51:25 +00:00
parent 42df461c90
commit e1b9536d54

View File

@ -57,8 +57,12 @@ namespace {
("liveintervals", "Number of loads/stores folded into instructions");
cl::opt<bool>
join("join-liveintervals",
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));
};
@ -115,7 +119,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
numIntervals += intervals_.size();
// join intervals if requested
if (join) joinIntervals();
if (EnableJoining) joinIntervals();
numIntervalsAfter += intervals_.size();
@ -494,15 +498,21 @@ void LiveIntervals::joinIntervals()
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,8 +529,7 @@ void LiveIntervals::joinIntervals()
r2rMap_.insert(std::make_pair(intB->reg, intA->reg));
intervals_.erase(intB);
}
}
else if (MRegisterInfo::isPhysicalRegister(intA->reg) ^
} else if (MRegisterInfo::isPhysicalRegister(intA->reg) ^
MRegisterInfo::isPhysicalRegister(intB->reg)) {
if (MRegisterInfo::isPhysicalRegister(intB->reg)) {
std::swap(regA, regB);