aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
commit8626f09dfd7db498d0a934218a29ea5441e7d018 (patch)
tree029252c8d94ba373daef186f2fa08d10f4e04b93 /include
parentc7224b884e272cdb590be14cbe3fd4718e4b6265 (diff)
downloadexternal_llvm-8626f09dfd7db498d0a934218a29ea5441e7d018.zip
external_llvm-8626f09dfd7db498d0a934218a29ea5441e7d018.tar.gz
external_llvm-8626f09dfd7db498d0a934218a29ea5441e7d018.tar.bz2
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')
-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 40dd66c..05e9e55 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) {