[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineJumpTableInfo.h

Chris Lattner sabre at nondot.org
Sat Oct 28 11:00:19 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

MachineJumpTableInfo.h updated: 1.4 -> 1.5
---
Log message:

determine whether a change was made


---
Diffs of the changes:  (+6 -2)

 MachineJumpTableInfo.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineJumpTableInfo.h
diff -u llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.4 llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.5
--- llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.4	Mon Oct 16 15:41:42 2006
+++ llvm/include/llvm/CodeGen/MachineJumpTableInfo.h	Sat Oct 28 13:00:05 2006
@@ -57,13 +57,17 @@
   
   /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update
   /// the jump tables to branch to New instead.
-  void ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {
+  bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {
+    bool MadeChange = false;
     for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) {
       MachineJumpTableEntry &JTE = JumpTables[i];
       for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j)
-        if (JTE.MBBs[j] == Old)
+        if (JTE.MBBs[j] == Old) {
           JTE.MBBs[j] = New;
+          MadeChange = true;
+        }
     }
+    return MadeChange;
   }
   
   /// getEntrySize - returns the size of an individual field in a jump table 






More information about the llvm-commits mailing list