[llvm-commits] [llvm] r65122 - in /llvm/branches/Apple/Dib: lib/CodeGen/PreAllocSplitting.cpp test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll
Bill Wendling
isanbard at gmail.com
Fri Feb 20 02:16:15 PST 2009
Author: void
Date: Fri Feb 20 04:16:12 2009
New Revision: 65122
URL: http://llvm.org/viewvc/llvm-project?rev=65122&view=rev
Log:
Pull r65121 into Dib:
Added:
llvm/branches/Apple/Dib/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll
- copied unchanged from r65121, llvm/trunk/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll
Modified:
llvm/branches/Apple/Dib/lib/CodeGen/PreAllocSplitting.cpp
Modified: llvm/branches/Apple/Dib/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/PreAllocSplitting.cpp?rev=65122&r1=65121&r2=65122&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/PreAllocSplitting.cpp Fri Feb 20 04:16:12 2009
@@ -224,6 +224,9 @@
if (RefsInMBB.empty() && !DefMI) {
MachineBasicBlock::iterator MII = MBB->begin();
MachineBasicBlock::iterator EndPt = MI;
+
+ if (MII == EndPt) return Pt;
+
do {
++MII;
unsigned Index = LIs->getInstructionIndex(MII);
@@ -303,6 +306,9 @@
if (RefsInMBB.empty() && LastIdx >= EndIdx) {
MachineBasicBlock::iterator MII = MBB->getFirstTerminator();
MachineBasicBlock::iterator EndPt = MI;
+
+ if (MII == EndPt) return Pt;
+
--MII;
do {
unsigned Index = LIs->getInstructionIndex(MII);
More information about the llvm-commits
mailing list