mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Should be more careful. The previously applied change made all counts
outside of loops = 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
84a102a780
commit
b606eaca1b
@ -109,17 +109,13 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
|
||||
const MachineBasicBlock* mbb = mbbi;
|
||||
unsigned loopDepth = loopInfo.getLoopDepth(mbb->getBasicBlock());
|
||||
|
||||
if (loopDepth) {
|
||||
for (MachineBasicBlock::const_iterator mii = mbb->begin(),
|
||||
mie = mbb->end(); mii != mie; ++mii) {
|
||||
MachineInstr* mi = *mii;
|
||||
|
||||
for (int i = mi->getNumOperands() - 1; i >= 0; --i) {
|
||||
MachineOperand& mop = mi->getOperand(i);
|
||||
|
||||
if (!mop.isVirtualRegister())
|
||||
continue;
|
||||
for (MachineBasicBlock::const_iterator mii = mbb->begin(),
|
||||
mie = mbb->end(); mii != mie; ++mii) {
|
||||
MachineInstr* mi = *mii;
|
||||
|
||||
for (int i = mi->getNumOperands() - 1; i >= 0; --i) {
|
||||
MachineOperand& mop = mi->getOperand(i);
|
||||
if (mop.isVirtualRegister()) {
|
||||
unsigned reg = mop.getAllocatedRegNum();
|
||||
Reg2IntervalMap::iterator r2iit = r2iMap_.find(reg);
|
||||
assert(r2iit != r2iMap_.end());
|
||||
|
Loading…
Reference in New Issue
Block a user