1 //===- WebAssemblyInstrControl.td-WebAssembly control-flow ------*- tablegen -*-
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief WebAssembly control-flow code-gen constructs.
13 //===----------------------------------------------------------------------===//
16 * TODO(jfb): Add the following.
18 * block: a fixed-length sequence of statements
20 * do_while: do while statement, basically a loop with a conditional branch
21 * forever: infinite loop statement (like while (1)), basically an unconditional
22 * branch (back to the top of the loop)
23 * continue: continue to start of nested loop
24 * break: break to end from nested loop or block
25 * switch: switch statement with fallthrough
28 let hasSideEffects = 1, isReturn = 1, isTerminator = 1, hasCtrlDep = 1,
30 //FIXME return more than just int32.
31 def RETURN : I<(outs), (ins Int32:$val), [(WebAssemblyreturn Int32:$val)]>;
32 def RETURN_VOID : I<(outs), (ins), [(WebAssemblyreturn)]>;
33 } // hasSideEffects = 1, isReturn = 1, isTerminator = 1, hasCtrlDep = 1,