summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb4c55bb857d41fb7064cb9c458b9f93a66cfab61 (patch)
tree1f78be97f2b8145bbe3404c72c8bb6aedcebe60e /llvm/include
parent4293cea3e5eff24cc31355d937efc838bf4662e2 (diff)
downloadbcm5719-llvm-b4c55bb857d41fb7064cb9c458b9f93a66cfab61.tar.gz
bcm5719-llvm-b4c55bb857d41fb7064cb9c458b9f93a66cfab61.zip
Fix RegScavenger::forward() to work on basic blocks containing exactly
one instruction. llvm-svn: 61236
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/RegisterScavenging.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/RegisterScavenging.h b/llvm/include/llvm/CodeGen/RegisterScavenging.h
index 40dd66c06a7..05e9e55e234 100644
--- a/llvm/include/llvm/CodeGen/RegisterScavenging.h
+++ b/llvm/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) {
OpenPOWER on IntegriCloud