Fix RegScavenger::forward() to work on basic blocks containing exactly

one instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61236 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-12-19 00:45:13 +00:00
parent 9755faab60
commit 5b200d8a13

View File

@ -98,6 +98,7 @@ public:
/// forward / backward - Move the internal MBB iterator and update register
/// states until it has processed the specific iterator.
void forward(MachineBasicBlock::iterator I) {
if (!Tracking && MBB->begin() != I) forward();
while (MBBI != I) forward();
}
void backward(MachineBasicBlock::iterator I) {