summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/RegisterScavenging.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-19 00:45:13 +0000
committerDan Gohman <gohman@apple.com>2008-12-19 00:45:13 +0000
commit5b200d8a133a07af1f7802025bd5a58a1cdd544d (patch)
tree029252c8d94ba373daef186f2fa08d10f4e04b93 /include/llvm/CodeGen/RegisterScavenging.h
parent9755faab609d65ccd06220625b50dc9d792be3c4 (diff)
downloadllvm-5b200d8a133a07af1f7802025bd5a58a1cdd544d.tar.gz
llvm-5b200d8a133a07af1f7802025bd5a58a1cdd544d.tar.bz2
llvm-5b200d8a133a07af1f7802025bd5a58a1cdd544d.tar.xz
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
Diffstat (limited to 'include/llvm/CodeGen/RegisterScavenging.h')
-rw-r--r--include/llvm/CodeGen/RegisterScavenging.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h
index 40dd66c06a..05e9e55e23 100644
--- a/include/llvm/CodeGen/RegisterScavenging.h
+++ b/include/llvm/CodeGen/RegisterScavenging.h
@@ -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) {