From c41cd9c391f1f69adf416145a5a1308d7ce342fc Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 30 Oct 2006 07:59:36 +0000 Subject: [PATCH] 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 --- include/llvm/CodeGen/SelectionDAGNodes.h | 4 ++++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index cd09777be31..c3e6dee2328 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 4b2f28396b2..3d8441c5124 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"; -- 2.34.1