forked from OSchip/llvm-project
If a livein is not used in the block. It's live through.
llvm-svn: 37764
This commit is contained in:
parent
77f541ddfd
commit
df0c705d7d
|
@ -625,13 +625,15 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
|
|||
exit:
|
||||
// Live-in register might not be used at all.
|
||||
if (end == MIIdx) {
|
||||
DOUT << " dead";
|
||||
if (isAlias)
|
||||
if (isAlias) {
|
||||
DOUT << " dead";
|
||||
end = getDefIndex(MIIdx) + 1;
|
||||
} else {
|
||||
DOUT << " live through";
|
||||
end = baseIndex;
|
||||
}
|
||||
}
|
||||
|
||||
assert(start < end && "did not find end of interval?");
|
||||
|
||||
LiveRange LR(start, end, interval.getNextValue(~0U, 0));
|
||||
DOUT << " +" << LR << '\n';
|
||||
interval.addRange(LR);
|
||||
|
@ -662,7 +664,8 @@ void LiveIntervals::computeIntervals() {
|
|||
// Multiple live-ins can alias the same register.
|
||||
for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS)
|
||||
if (!hasInterval(*AS))
|
||||
handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), true);
|
||||
handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS),
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue