[llvm-commits] [llvm] r61236 - /llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h

Dan Gohman gohman at apple.com
Thu Dec 18 16:45:14 PST 2008


Author: djg
Date: Thu Dec 18 18:45:13 2008
New Revision: 61236

URL: http://llvm.org/viewvc/llvm-project?rev=61236&view=rev
Log:
Fix RegScavenger::forward() to work on basic blocks containing exactly
one instruction.

Modified:
    llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h

Modified: llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h?rev=61236&r1=61235&r2=61236&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h (original)
+++ llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h Thu Dec 18 18:45:13 2008
@@ -98,6 +98,7 @@
   /// 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) {





More information about the llvm-commits mailing list