[llvm-branch-commits] [llvm-branch] r165112 - in /llvm/branches/R600/lib/Target/AMDGPU: SILowerFlowControl.cpp SILowerLiteralConstants.cpp

Tom Stellard thomas.stellard at amd.com
Wed Oct 3 06:39:41 PDT 2012


Author: tstellar
Date: Wed Oct  3 08:39:41 2012
New Revision: 165112

URL: http://llvm.org/viewvc/llvm-project?rev=165112&view=rev
Log:
SI: Fix bug in loops where iterators may be deleted

Modified:
    llvm/branches/R600/lib/Target/AMDGPU/SILowerFlowControl.cpp
    llvm/branches/R600/lib/Target/AMDGPU/SILowerLiteralConstants.cpp

Modified: llvm/branches/R600/lib/Target/AMDGPU/SILowerFlowControl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/AMDGPU/SILowerFlowControl.cpp?rev=165112&r1=165111&r2=165112&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/AMDGPU/SILowerFlowControl.cpp (original)
+++ llvm/branches/R600/lib/Target/AMDGPU/SILowerFlowControl.cpp Wed Oct  3 08:39:41 2012
@@ -106,7 +106,8 @@
                                                   BB != BB_E; ++BB) {
     MachineBasicBlock &MBB = *BB;
     for (MachineBasicBlock::iterator I = MBB.begin(), Next = llvm::next(I);
-                               I != MBB.end(); I = Next, Next = llvm::next(I)) {
+                               I != MBB.end(); I = Next) {
+      Next = llvm::next(I);
       MachineInstr &MI = *I;
       switch (MI.getOpcode()) {
         default: break;

Modified: llvm/branches/R600/lib/Target/AMDGPU/SILowerLiteralConstants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/AMDGPU/SILowerLiteralConstants.cpp?rev=165112&r1=165111&r2=165112&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/AMDGPU/SILowerLiteralConstants.cpp (original)
+++ llvm/branches/R600/lib/Target/AMDGPU/SILowerLiteralConstants.cpp Wed Oct  3 08:39:41 2012
@@ -65,7 +65,8 @@
                                                   BB != BB_E; ++BB) {
     MachineBasicBlock &MBB = *BB;
     for (MachineBasicBlock::iterator I = MBB.begin(), Next = llvm::next(I);
-                               I != MBB.end(); I = Next, Next = llvm::next(I)) {
+                               I != MBB.end(); I = Next) {
+      Next = llvm::next(I);
       MachineInstr &MI = *I;
       switch (MI.getOpcode()) {
       default: break;





More information about the llvm-branch-commits mailing list