[llvm-commits] [llvm] r55911 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Evan Cheng evan.cheng at apple.com
Mon Sep 8 09:01:28 PDT 2008


Author: evancheng
Date: Mon Sep  8 11:01:27 2008
New Revision: 55911

URL: http://llvm.org/viewvc/llvm-project?rev=55911&view=rev
Log:
Avoid redefinition and nnbreak windows build.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=55911&r1=55910&r2=55911&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Sep  8 11:01:27 2008
@@ -718,7 +718,7 @@
 
     BasicBlock::iterator const Begin = LLVMBB->begin();
     BasicBlock::iterator const End = LLVMBB->end();
-    BasicBlock::iterator I = Begin;
+    BasicBlock::iterator BI = Begin;
 
     // Lower any arguments needed in this block if this is the entry block.
     if (LLVMBB == &Fn.getEntryBlock())
@@ -738,7 +738,7 @@
         }
         F->setCurrentBlock(BB);
         // Do FastISel on as many instructions as possible.
-        for (; I != End; ++I) {
+        for (; BI != End; ++BI) {
           // Just before the terminator instruction, insert instructions to
           // feed PHI nodes in successor blocks.
           if (isa<TerminatorInst>(I))
@@ -746,41 +746,41 @@
               if (DisableFastISelAbort)
                 break;
 #ifndef NDEBUG
-              I->dump();
+              BI->dump();
 #endif  
               assert(0 && "FastISel didn't handle a PHI in a successor");
             }
 
           // First try normal tablegen-generated "fast" selection.
-          if (F->SelectInstruction(I))
+          if (F->SelectInstruction(BI))
             continue;
 
           // Next, try calling the target to attempt to handle the instruction.
-          if (F->TargetSelectInstruction(I))
+          if (F->TargetSelectInstruction(BI))
             continue;
 
           // Then handle certain instructions as single-LLVM-Instruction blocks.
-          if (isa<CallInst>(I) || isa<LoadInst>(I) ||
-              isa<StoreInst>(I)) {
-            if (I->getType() != Type::VoidTy) {
+          if (isa<CallInst>(BI) || isa<LoadInst>(BI) ||
+              isa<StoreInst>(BI)) {
+            if (BI->getType() != Type::VoidTy) {
               unsigned &R = FuncInfo->ValueMap[I];
               if (!R)
-                R = FuncInfo->CreateRegForValue(I);
+                R = FuncInfo->CreateRegForValue(BI);
             }
 
-            SelectBasicBlock(LLVMBB, I, next(I));
+            SelectBasicBlock(LLVMBB, BI, next(BI));
             continue;
           }
 
           if (!DisableFastISelAbort &&
               // For now, don't abort on non-conditional-branch terminators.
-              (!isa<TerminatorInst>(I) ||
-               (isa<BranchInst>(I) &&
-                cast<BranchInst>(I)->isUnconditional()))) {
+              (!isa<TerminatorInst>(BI) ||
+               (isa<BranchInst>(BI) &&
+                cast<BranchInst>(BI)->isUnconditional()))) {
             // The "fast" selector couldn't handle something and bailed.
             // For the purpose of debugging, just abort.
 #ifndef NDEBUG
-            I->dump();
+            BI->dump();
 #endif
             assert(0 && "FastISel didn't select the entire block");
           }
@@ -793,8 +793,8 @@
     // Run SelectionDAG instruction selection on the remainder of the block
     // not handled by FastISel. If FastISel is not run, this is the entire
     // block.
-    if (I != End)
-      SelectBasicBlock(LLVMBB, I, End);
+    if (BI != End)
+      SelectBasicBlock(LLVMBB, BI, End);
 
     FinishBasicBlock();
   }





More information about the llvm-commits mailing list