mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
MachineBasicBlock: Add liveins() method returning an iterator_range
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245895 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -791,13 +791,12 @@ TailDuplicatePass::TailDuplicate(MachineBasicBlock *TailBB,
|
||||
RS->enterBasicBlock(PredBB);
|
||||
if (!PredBB->empty())
|
||||
RS->forward(std::prev(PredBB->end()));
|
||||
for (MachineBasicBlock::livein_iterator I = TailBB->livein_begin(),
|
||||
E = TailBB->livein_end(); I != E; ++I) {
|
||||
if (!RS->isRegUsed(*I, false))
|
||||
for (unsigned LI : TailBB->liveins()) {
|
||||
if (!RS->isRegUsed(LI, false))
|
||||
// If a register is previously livein to the tail but it's not live
|
||||
// at the end of predecessor BB, then it should be added to its
|
||||
// livein list.
|
||||
PredBB->addLiveIn(*I);
|
||||
PredBB->addLiveIn(LI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user