llvm.org GIT mirror llvm / faf05bb
Don't populate TryAgainList when coalescing only physical registers with virtual registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36240 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
2 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
204204 /// CopyCoallesceInMBB - Coallsece copies in the specified MBB, putting
205205 /// copies that cannot yet be coallesced into the "TryAgain" list.
206206 void CopyCoallesceInMBB(MachineBasicBlock *MBB,
207 std::vector &TryAgain, bool PhysOnly = false);
207 std::vector *TryAgain, bool PhysOnly = false);
208208
209209 /// JoinCopy - Attempt to join intervals corresponding to SrcReg/DstReg,
210210 /// which are the src/dst of the copy instruction CopyMI. This returns true
14721472
14731473
14741474 void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB,
1475 std::vector &TryAgain, bool PhysOnly) {
1475 std::vector *TryAgain, bool PhysOnly) {
14761476 DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n";
14771477
14781478 for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end();
14831483 unsigned SrcReg, DstReg;
14841484 if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue;
14851485
1486 if (!JoinCopy(Inst, SrcReg, DstReg, PhysOnly))
1487 TryAgain.push_back(getCopyRec(Inst, SrcReg, DstReg));
1486 if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly))
1487 TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg));
14881488 }
14891489 }
14901490
15011501 // If there are no loops in the function, join intervals in function order.
15021502 for (MachineFunction::iterator I = mf_->begin(), E = mf_->end();
15031503 I != E; ++I)
1504 CopyCoallesceInMBB(I, TryAgainList);
1504 CopyCoallesceInMBB(I, &TryAgainList);
15051505 } else {
15061506 // Otherwise, join intervals in inner loops before other intervals.
15071507 // Unfortunately we can't just iterate over loop hierarchy here because
15181518
15191519 // Finally, join intervals in loop nest order.
15201520 for (unsigned i = 0, e = MBBs.size(); i != e; ++i)
1521 CopyCoallesceInMBB(MBBs[i].second, TryAgainList, true);
1521 CopyCoallesceInMBB(MBBs[i].second, NULL, true);
15221522 for (unsigned i = 0, e = MBBs.size(); i != e; ++i)
1523 CopyCoallesceInMBB(MBBs[i].second, TryAgainList, false);
1523 CopyCoallesceInMBB(MBBs[i].second, &TryAgainList, false);
15241524 }
15251525
15261526 // Joining intervals can allow other intervals to be joined. Iteratively join