aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-10-30 07:59:36 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-10-30 07:59:36 +0000
commitc41cd9c391f1f69adf416145a5a1308d7ce342fc (patch)
treeceeef515ebb370fe12ff2a9d4a96e308afec5cf2
parent55d7244f690e6585771eb98a1901b61564a0da70 (diff)
Added a new SDNode type: BR_JT for jumptable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31292 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h4
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index cd09777be3..c3e6dee232 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -406,6 +406,10 @@ namespace ISD {
// is the value to branch to, which must be of the same type as the target's
// pointer type.
BRIND,
+
+ // BR_JT - Jumptable branch. The first operand is the chain, the second
+ // is the jumptable index, the last one is the jumptable entry index.
+ BR_JT,
// BRCOND - Conditional branch. The first operand is the chain,
// the second is the condition, the third is the block to branch
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 4b2f28396b..3d8441c512 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2734,6 +2734,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
// Control flow instructions
case ISD::BR: return "br";
case ISD::BRIND: return "brind";
+ case ISD::BR_JT: return "br_jt";
case ISD::BRCOND: return "brcond";
case ISD::BR_CC: return "br_cc";
case ISD::RET: return "ret";