mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-19 08:35:45 +00:00
- Check if a register is livein before removing it. It may have already been removed.
- Do not iterate over SmallPtrSet, the order of iteration is not deterministic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -205,6 +205,11 @@ void MachineBasicBlock::removeLiveIn(unsigned Reg) {
|
||||
LiveIns.erase(I);
|
||||
}
|
||||
|
||||
bool MachineBasicBlock::isLiveIn(unsigned Reg) const {
|
||||
const_livein_iterator I = std::find(livein_begin(), livein_end(), Reg);
|
||||
return I != livein_end();
|
||||
}
|
||||
|
||||
void MachineBasicBlock::moveBefore(MachineBasicBlock *NewAfter) {
|
||||
MachineFunction::BasicBlockListType &BBList =getParent()->getBasicBlockList();
|
||||
getParent()->getBasicBlockList().splice(NewAfter, BBList, this);
|
||||
|
||||
Reference in New Issue
Block a user