From: Dan Gohman Date: Fri, 19 Dec 2008 00:45:13 +0000 (+0000) Subject: Fix RegScavenger::forward() to work on basic blocks containing exactly X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5b200d8a133a07af1f7802025bd5a58a1cdd544d;p=oota-llvm.git 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 --- diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index 40dd66c06a7..05e9e55e234 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) {