[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Apr 27 23:34:01 PDT 2004


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.239 -> 1.240

---
Log message:

In InsertFPRegKills(), use the machine-CFG itself rather than the
LLVM CFG when trying to find the successors of BB.


---
Diffs of the changes:  (+3 -3)

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.239 llvm/lib/Target/X86/InstSelectSimple.cpp:1.240
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.239	Tue Apr 27 23:19:37 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Tue Apr 27 23:34:16 2004
@@ -743,9 +743,9 @@
     // If we haven't found an FP register use or def in this basic block, check
     // to see if any of our successors has an FP PHI node, which will cause a
     // copy to be inserted into this block.
-    for (succ_const_iterator SI = succ_begin(BB->getBasicBlock()),
-           E = succ_end(BB->getBasicBlock()); SI != E; ++SI) {
-      MachineBasicBlock *SBB = MBBMap[*SI];
+    for (MachineBasicBlock::const_succ_iterator SI = BB->succ_begin(),
+         SE = BB->succ_end(); SI != SE; ++SI) {
+      MachineBasicBlock *SBB = *SI;
       for (MachineBasicBlock::iterator I = SBB->begin();
            I != SBB->end() && I->getOpcode() == X86::PHI; ++I) {
         if (RegMap.getRegClass(I->getOperand(0).getReg())->getSize() == 10)





More information about the llvm-commits mailing list