summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-12 01:45:12 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-12 01:45:12 +0000
commit85159ca224494e82394c8633da8873b7151a1f26 (patch)
tree5f201631e7d800d054dad7bd2b8c943be2a3e775 /llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
parent94b08e3bf0ee2aa8cb0dc42c2850ce2520500516 (diff)
downloadbcm5719-llvm-85159ca224494e82394c8633da8873b7151a1f26.tar.gz
bcm5719-llvm-85159ca224494e82394c8633da8873b7151a1f26.zip
[WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.
llvm-svn: 257433
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
index 05efe890341..1c06b08597a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -41,13 +41,18 @@ let Defs = [ARGUMENTS] in {
// TODO: SelectionDAG's lowering insists on using a pointer as the index for
// jump tables, so in practice we don't ever use TABLESWITCH_I64 in wasm32 mode
// currently.
+// Set TSFlags{0} to 1 to indicate that the variable_ops are immediates.
let isTerminator = 1, hasCtrlDep = 1, isBarrier = 1 in {
def TABLESWITCH_I32 : I<(outs), (ins I32:$index, bb_op:$default, variable_ops),
[(WebAssemblytableswitch I32:$index, bb:$default)],
- "tableswitch\t$index, $default">;
+ "tableswitch\t$index, $default"> {
+ let TSFlags{0} = 1;
+}
def TABLESWITCH_I64 : I<(outs), (ins I64:$index, bb_op:$default, variable_ops),
[(WebAssemblytableswitch I64:$index, bb:$default)],
- "tableswitch\t$index, $default">;
+ "tableswitch\t$index, $default"> {
+ let TSFlags{0} = 1;
+}
} // isTerminator = 1, hasCtrlDep = 1, isBarrier = 1
// Placemarkers to indicate the start of a block or loop scope. These
OpenPOWER on IntegriCloud