26 "_Unwind_Wasm_CallPersonality";
30 case WebAssembly::ARGUMENT_I32:
31 case WebAssembly::ARGUMENT_I64:
32 case WebAssembly::ARGUMENT_F32:
33 case WebAssembly::ARGUMENT_F64:
34 case WebAssembly::ARGUMENT_v16i8:
35 case WebAssembly::ARGUMENT_v8i16:
36 case WebAssembly::ARGUMENT_v4i32:
37 case WebAssembly::ARGUMENT_v4f32:
46 case WebAssembly::COPY_I32:
47 case WebAssembly::COPY_I64:
48 case WebAssembly::COPY_F32:
49 case WebAssembly::COPY_F64:
58 case WebAssembly::TEE_I32:
59 case WebAssembly::TEE_I64:
60 case WebAssembly::TEE_F32:
61 case WebAssembly::TEE_F64:
83 case WebAssembly::CALL_VOID:
84 case WebAssembly::CALL_I32:
85 case WebAssembly::CALL_I64:
86 case WebAssembly::CALL_F32:
87 case WebAssembly::CALL_F64:
88 case WebAssembly::CALL_v16i8:
89 case WebAssembly::CALL_v8i16:
90 case WebAssembly::CALL_v4i32:
91 case WebAssembly::CALL_v4f32:
92 case WebAssembly::CALL_EXCEPT_REF:
101 case WebAssembly::CALL_INDIRECT_VOID:
102 case WebAssembly::CALL_INDIRECT_I32:
103 case WebAssembly::CALL_INDIRECT_I64:
104 case WebAssembly::CALL_INDIRECT_F32:
105 case WebAssembly::CALL_INDIRECT_F64:
106 case WebAssembly::CALL_INDIRECT_v16i8:
107 case WebAssembly::CALL_INDIRECT_v8i16:
108 case WebAssembly::CALL_INDIRECT_v4i32:
109 case WebAssembly::CALL_INDIRECT_v4f32:
110 case WebAssembly::CALL_INDIRECT_EXCEPT_REF:
119 case WebAssembly::CALL_VOID:
120 case WebAssembly::CALL_INDIRECT_VOID:
122 case WebAssembly::CALL_I32:
123 case WebAssembly::CALL_I64:
124 case WebAssembly::CALL_F32:
125 case WebAssembly::CALL_F64:
126 case WebAssembly::CALL_EXCEPT_REF:
127 case WebAssembly::CALL_INDIRECT_I32:
128 case WebAssembly::CALL_INDIRECT_I64:
129 case WebAssembly::CALL_INDIRECT_F32:
130 case WebAssembly::CALL_INDIRECT_F64:
131 case WebAssembly::CALL_INDIRECT_EXCEPT_REF:
140 case WebAssembly::BLOCK:
143 case WebAssembly::END_LOOP:
144 case WebAssembly::TRY:
145 case WebAssembly::END_TRY:
154 case WebAssembly::THROW_I32:
155 case WebAssembly::THROW_I64:
164 case WebAssembly::RETHROW:
165 case WebAssembly::RETHROW_TO_CALLER:
174 case WebAssembly::CATCH_I32:
175 case WebAssembly::CATCH_I64:
176 case WebAssembly::CATCH_ALL:
185 case WebAssembly::THROW_I32:
186 case WebAssembly::THROW_I64:
187 case WebAssembly::RETHROW:
200 if (F->doesNotThrow())
212 bool SeenCatch =
false;
213 for (
auto &
MI : MBB) {
214 if (
MI.getOpcode() == WebAssembly::CATCH_I32 ||
215 MI.getOpcode() == WebAssembly::CATCH_I64)
217 if (SeenCatch &&
MI.isCall()) {
230 bool SeenCatchAll =
false;
231 for (
auto &
MI : MBB) {
232 if (
MI.getOpcode() == WebAssembly::CATCH_ALL)
234 if (SeenCatchAll &&
MI.isCall()) {
bool isCall(QueryType Type=AnyInBundle) const
Compute iterated dominance frontiers using a linear time algorithm.
bool mayThrow(const MachineInstr &MI)
unsigned getReg() const
getReg - Returns the register number.
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
unsigned getNumOperands() const
Access to explicit operands of the instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const char *const CxaBeginCatchFn
const char *const StdTerminateFn
bool isVRegStackified(unsigned VReg) const
bool isThrow(const MachineInstr &MI)
bool isCopy(const MachineInstr &MI)
This file contains the declaration of the WebAssembly-specific utility functions. ...
bool isCallDirect(const MachineInstr &MI)
const GlobalValue * getGlobal() const
const char *const CxaRethrowFn
bool isRethrow(const MachineInstr &MI)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool isTee(const MachineInstr &MI)
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
const char *const ClangCallTerminateFn
bool isArgument(const MachineInstr &MI)
MachineOperand class - Representation of each machine instruction operand.
bool isCatchTerminatePad(const MachineBasicBlock &MBB)
Returns if the given BB is a single BB terminate pad which starts with a 'catch' instruction.
const char *const PersonalityWrapperFn
Representation of each machine instruction.
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
bool isEHPad() const
Returns true if the block is a landing pad.
unsigned getCalleeOpNo(const MachineInstr &MI)
Returns the operand number of a callee, assuming the argument is a call instruction.
StringRef getName() const
Return a constant reference to the value's name.
bool isMarker(const MachineInstr &MI)
This file declares WebAssembly-specific per-machine-function information.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
bool isCatch(const MachineInstr &MI)
bool isReg() const
isReg - Tests if this is a MO_Register operand.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isCallIndirect(const MachineInstr &MI)
bool isChild(const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI)
Test whether MI is a child of some other node in an expression tree.
const MachineOperand & getOperand(unsigned i) const
bool isCatchAllTerminatePad(const MachineBasicBlock &MBB)
Returns if the given BB is a single BB terminate pad which starts with a 'catch_all' insrtruction...