Changes in directory llvm/include/llvm/CodeGen:
MachineJumpTableInfo.h updated: 1.3 -> 1.4 --- Log message: add a ReplaceMBBInJumpTables method --- Diffs of the changes: (+12 -0) MachineJumpTableInfo.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/include/llvm/CodeGen/MachineJumpTableInfo.h diff -u llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.3 llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.4 --- llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.3 Tue May 2 20:29:56 2006 +++ llvm/include/llvm/CodeGen/MachineJumpTableInfo.h Mon Oct 16 15:41:42 2006 @@ -26,6 +26,7 @@ namespace llvm { class MachineBasicBlock; +class TargetData; /// MachineJumpTableEntry - One jump table in the jump table info. /// @@ -54,6 +55,17 @@ return JumpTables; } + /// 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) { + 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) + JTE.MBBs[j] = New; + } + } + /// getEntrySize - returns the size of an individual field in a jump table unsigned getEntrySize() const; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits