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

Brian Gaeke gaeke at cs.uiuc.edu
Tue Apr 27 23:20:03 PDT 2004


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.238 -> 1.239

---
Log message:

Update the machine-CFG edges whenever we see a branch.


---
Diffs of the changes:  (+5 -0)

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.238 llvm/lib/Target/X86/InstSelectSimple.cpp:1.239
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.238	Wed Apr 14 16:27:56 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Tue Apr 27 23:19:37 2004
@@ -1295,6 +1295,11 @@
 /// just make a fall-through (but we don't currently).
 ///
 void ISel::visitBranchInst(BranchInst &BI) {
+  // Update machine-CFG edges
+  BB->addSuccessor (MBBMap[BI.getSuccessor(0)]);
+  if (BI.isConditional())
+    BB->addSuccessor (MBBMap[BI.getSuccessor(1)]);
+
   BasicBlock *NextBB = getBlockAfter(BI.getParent());  // BB after current one
 
   if (!BI.isConditional()) {  // Unconditional branch?





More information about the llvm-commits mailing list