Coverage Report

Created: 2026-09-28 06:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/WasmEdge/lib/llvm/compiler/function_compiler.h
Line
Count
Source
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright The WasmEdge Authors
3
#pragma once
4
5
#include "compiler/context.h"
6
7
#include <cstdint>
8
#include <tuple>
9
#include <unordered_map>
10
#include <utility>
11
#include <vector>
12
13
namespace WasmEdge {
14
15
class FunctionCompiler {
16
  struct Control;
17
18
public:
19
  FunctionCompiler(LLVM::Compiler::CompileContext &Context,
20
                   LLVM::FunctionCallee F, Span<const ValType> Locals,
21
                   bool Interruptible, bool InstructionCounting,
22
                   bool GasMeasuring, bool IsLazyJIT) noexcept;
23
24
  LLVM::BasicBlock getTrapBB(ErrCode::Value Error) noexcept;
25
26
  Expect<void>
27
  compile(const AST::CodeSegment &Code,
28
          std::pair<std::vector<ValType>, std::vector<ValType>> Type) noexcept;
29
30
  Expect<void> compile(AST::InstrView Instrs) noexcept;
31
  Expect<void> compileAtomicOp(const AST::Instruction &Instr) noexcept;
32
  Expect<void> compileVectorOp(const AST::Instruction &Instr) noexcept;
33
  Expect<void> compileMemoryOp(const AST::Instruction &Instr) noexcept;
34
  Expect<void> compileNumericOp(const AST::Instruction &Instr) noexcept;
35
  Expect<void> compileRefOp(const AST::Instruction &Instr) noexcept;
36
  void compileSignedTrunc(LLVM::Type IntType) noexcept;
37
  void compileSignedTruncSat(LLVM::Type IntType) noexcept;
38
  void compileUnsignedTrunc(LLVM::Type IntType) noexcept;
39
  void compileUnsignedTruncSat(LLVM::Type IntType) noexcept;
40
41
  void compileAtomicCheckOffsetAlignment(LLVM::Value Offset,
42
                                         LLVM::Type IntType) noexcept;
43
44
  void compileMemoryFence() noexcept;
45
  void compileAtomicNotify(unsigned MemoryIndex,
46
                           uint64_t MemoryOffset) noexcept;
47
  void compileAtomicWait(unsigned MemoryIndex, uint64_t MemoryOffset,
48
                         LLVM::Type TargetType, uint32_t BitWidth) noexcept;
49
  void compileAtomicLoad(unsigned MemoryIndex, uint64_t MemoryOffset,
50
                         unsigned Alignment, LLVM::Type IntType,
51
                         LLVM::Type TargetType, bool Signed = false) noexcept;
52
  void compileAtomicStore(unsigned MemoryIndex, uint64_t MemoryOffset,
53
                          unsigned Alignment, LLVM::Type, LLVM::Type TargetType,
54
                          bool Signed = false) noexcept;
55
56
  void compileAtomicRMWOp(unsigned MemoryIndex, uint64_t MemoryOffset,
57
                          [[maybe_unused]] unsigned Alignment,
58
                          LLVMAtomicRMWBinOp BinOp, LLVM::Type IntType,
59
                          LLVM::Type TargetType, bool Signed = false) noexcept;
60
  void compileAtomicCompareExchange(unsigned MemoryIndex, uint64_t MemoryOffset,
61
                                    [[maybe_unused]] unsigned Alignment,
62
                                    LLVM::Type IntType, LLVM::Type TargetType,
63
                                    bool Signed = false) noexcept;
64
65
  void compileReturn() noexcept;
66
67
  void updateInstrCount() noexcept;
68
69
  void updateGas() noexcept;
70
71
  void updateGasAtTrap() noexcept;
72
73
private:
74
  void compileTryTableOp(const AST::Instruction &Instr) noexcept;
75
76
  void compileThrowOp(const uint32_t TagIndex) noexcept;
77
78
  void compileThrowRefOp() noexcept;
79
80
  void compileCallOp(const unsigned int FuncIndex) noexcept;
81
82
  void compileIndirectCallOp(const uint32_t TableIndex,
83
                             const uint32_t FuncTypeIndex) noexcept;
84
85
  void compileReturnCallOp(const unsigned int FuncIndex) noexcept;
86
87
  void compileReturnIndirectCallOp(const uint32_t TableIndex,
88
                                   const uint32_t FuncTypeIndex) noexcept;
89
90
  void compileCallRefOp(const unsigned int TypeIndex) noexcept;
91
92
  void compileReturnCallRefOp(const unsigned int TypeIndex) noexcept;
93
94
  void boundsCheckMemory64(unsigned MemoryIndex, LLVM::Value Addr,
95
                           uint64_t Offset, uint64_t AccessSize) noexcept;
96
  void compileLoadOp(unsigned MemoryIndex, uint64_t Offset, unsigned Alignment,
97
                     LLVM::Type LoadTy) noexcept;
98
  void compileLoadOp(unsigned MemoryIndex, uint64_t Offset, unsigned Alignment,
99
                     LLVM::Type LoadTy, LLVM::Type ExtendTy,
100
                     bool Signed) noexcept;
101
  void compileVectorLoadOp(unsigned MemoryIndex, uint64_t Offset,
102
                           unsigned Alignment, LLVM::Type LoadTy) noexcept;
103
  void compileVectorLoadOp(unsigned MemoryIndex, uint64_t Offset,
104
                           unsigned Alignment, LLVM::Type LoadTy,
105
                           LLVM::Type ExtendTy, bool Signed) noexcept;
106
  void compileSplatLoadOp(unsigned MemoryIndex, uint64_t Offset,
107
                          unsigned Alignment, LLVM::Type LoadTy,
108
                          LLVM::Type VectorTy) noexcept;
109
  void compileLoadLaneOp(unsigned MemoryIndex, uint64_t Offset,
110
                         unsigned Alignment, unsigned Index, LLVM::Type LoadTy,
111
                         LLVM::Type VectorTy) noexcept;
112
  void compileStoreOp(uint32_t MemoryIndex, uint64_t Offset, uint32_t Alignment,
113
                      LLVM::Type LoadTy, bool Trunc = false,
114
                      bool BitCast = false) noexcept;
115
  void compileStoreLaneOp(uint32_t MemoryIndex, uint64_t Offset,
116
                          uint32_t Alignment, uint8_t Index, LLVM::Type LoadTy,
117
                          LLVM::Type VectorTy) noexcept;
118
  void compileSplatOp(LLVM::Type VectorTy) noexcept;
119
  void compileExtractLaneOp(LLVM::Type VectorTy, unsigned Index) noexcept;
120
  void compileExtractLaneOp(LLVM::Type VectorTy, unsigned Index,
121
                            LLVM::Type ExtendTy, bool Signed) noexcept;
122
  void compileReplaceLaneOp(LLVM::Type VectorTy, unsigned Index) noexcept;
123
  void compileVectorCompareOp(LLVM::Type VectorTy,
124
                              LLVMIntPredicate Predicate) noexcept;
125
  void compileVectorCompareOp(LLVM::Type VectorTy, LLVMRealPredicate Predicate,
126
                              LLVM::Type ResultTy) noexcept;
127
  template <typename Func>
128
28.2k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
28.2k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
28.2k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
28.2k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorAbs(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorAbs(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
2.59k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
2.59k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
2.59k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
2.59k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorConvertS(WasmEdge::LLVM::Type, WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorConvertS(WasmEdge::LLVM::Type, WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
128
634
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
634
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
634
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
634
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorConvertU(WasmEdge::LLVM::Type, WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorConvertU(WasmEdge::LLVM::Type, WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
128
1.83k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
1.83k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
1.83k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
1.83k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorDemote()::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorDemote()::$_0&&)
Line
Count
Source
128
710
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
710
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
710
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
710
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorExtAddPairwise(WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorExtAddPairwise(WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
128
2.94k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
2.94k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
2.94k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
2.94k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFAbs(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFAbs(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
551
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
551
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
551
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
551
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFCeil(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFCeil(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
1.70k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
1.70k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
1.70k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
1.70k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFFloor(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFFloor(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
2.72k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
2.72k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
2.72k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
2.72k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFNearest(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFNearest(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
427
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
427
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
427
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
427
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFNeg(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFNeg(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
785
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
785
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
785
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
785
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFSqrt(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFSqrt(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
266
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
266
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
266
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
266
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorFTrunc(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorFTrunc(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
1.99k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
1.99k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
1.99k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
1.99k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorNeg(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorNeg(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
128
3.28k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
3.28k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
3.28k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
3.28k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorPopcnt()::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorPopcnt()::$_0&&)
Line
Count
Source
128
139
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
139
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
139
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
139
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorPromote()::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorPromote()::$_0&&)
Line
Count
Source
128
774
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
774
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
774
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
774
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorTruncSatS32(WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorTruncSatS32(WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
128
924
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
924
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
924
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
924
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorOp<WasmEdge::FunctionCompiler::compileVectorTruncSatU32(WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorTruncSatU32(WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
128
5.94k
  void compileVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
129
5.94k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
130
5.94k
    Stack.back() = Builder.createBitCast(Op(V), Context.Int64x2Ty);
131
5.94k
  }
132
  void compileVectorAbs(LLVM::Type VectorTy) noexcept;
133
  void compileVectorNeg(LLVM::Type VectorTy) noexcept;
134
  void compileVectorPopcnt() noexcept;
135
  template <typename Func>
136
2.07k
  void compileVectorReduceIOp(LLVM::Type VectorTy, Func &&Op) noexcept {
137
2.07k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
138
2.07k
    Stack.back() = Builder.createZExt(Op(V), Context.Int32Ty);
139
2.07k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorReduceIOp<WasmEdge::FunctionCompiler::compileVectorAllTrue(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorAllTrue(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
136
872
  void compileVectorReduceIOp(LLVM::Type VectorTy, Func &&Op) noexcept {
137
872
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
138
872
    Stack.back() = Builder.createZExt(Op(V), Context.Int32Ty);
139
872
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorReduceIOp<WasmEdge::FunctionCompiler::compileVectorAnyTrue()::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorAnyTrue()::$_0&&)
Line
Count
Source
136
147
  void compileVectorReduceIOp(LLVM::Type VectorTy, Func &&Op) noexcept {
137
147
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
138
147
    Stack.back() = Builder.createZExt(Op(V), Context.Int32Ty);
139
147
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorReduceIOp<WasmEdge::FunctionCompiler::compileVectorBitMask(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorBitMask(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
136
1.05k
  void compileVectorReduceIOp(LLVM::Type VectorTy, Func &&Op) noexcept {
137
1.05k
    auto V = Builder.createBitCast(Stack.back(), VectorTy);
138
1.05k
    Stack.back() = Builder.createZExt(Op(V), Context.Int32Ty);
139
1.05k
  }
140
  void compileVectorAnyTrue() noexcept;
141
  void compileVectorAllTrue(LLVM::Type VectorTy) noexcept;
142
  void compileVectorBitMask(LLVM::Type VectorTy) noexcept;
143
  template <typename Func>
144
3.89k
  void compileVectorShiftOp(LLVM::Type VectorTy, Func &&Op) noexcept {
145
3.89k
    const bool Trunc = VectorTy.getElementType().getIntegerBitWidth() < 32;
146
3.89k
    const uint32_t Mask = VectorTy.getElementType().getIntegerBitWidth() - 1;
147
3.89k
    auto N = Builder.createAnd(stackPop(), LLContext.getInt32(Mask));
148
3.89k
    auto RHS = Builder.createVectorSplat(
149
3.89k
        VectorTy.getVectorSize(),
150
3.89k
        Trunc ? Builder.createTrunc(N, VectorTy.getElementType())
151
3.89k
              : Builder.createZExtOrTrunc(N, VectorTy.getElementType()));
152
3.89k
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
153
3.89k
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
154
3.89k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorShiftOp<WasmEdge::FunctionCompiler::compileVectorAShr(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorAShr(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
144
1.87k
  void compileVectorShiftOp(LLVM::Type VectorTy, Func &&Op) noexcept {
145
1.87k
    const bool Trunc = VectorTy.getElementType().getIntegerBitWidth() < 32;
146
1.87k
    const uint32_t Mask = VectorTy.getElementType().getIntegerBitWidth() - 1;
147
1.87k
    auto N = Builder.createAnd(stackPop(), LLContext.getInt32(Mask));
148
1.87k
    auto RHS = Builder.createVectorSplat(
149
1.87k
        VectorTy.getVectorSize(),
150
1.87k
        Trunc ? Builder.createTrunc(N, VectorTy.getElementType())
151
1.87k
              : Builder.createZExtOrTrunc(N, VectorTy.getElementType()));
152
1.87k
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
153
1.87k
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
154
1.87k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorShiftOp<WasmEdge::FunctionCompiler::compileVectorLShr(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorLShr(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
144
694
  void compileVectorShiftOp(LLVM::Type VectorTy, Func &&Op) noexcept {
145
694
    const bool Trunc = VectorTy.getElementType().getIntegerBitWidth() < 32;
146
694
    const uint32_t Mask = VectorTy.getElementType().getIntegerBitWidth() - 1;
147
694
    auto N = Builder.createAnd(stackPop(), LLContext.getInt32(Mask));
148
694
    auto RHS = Builder.createVectorSplat(
149
694
        VectorTy.getVectorSize(),
150
694
        Trunc ? Builder.createTrunc(N, VectorTy.getElementType())
151
694
              : Builder.createZExtOrTrunc(N, VectorTy.getElementType()));
152
694
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
153
694
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
154
694
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorShiftOp<WasmEdge::FunctionCompiler::compileVectorShl(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorShl(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
144
1.32k
  void compileVectorShiftOp(LLVM::Type VectorTy, Func &&Op) noexcept {
145
1.32k
    const bool Trunc = VectorTy.getElementType().getIntegerBitWidth() < 32;
146
1.32k
    const uint32_t Mask = VectorTy.getElementType().getIntegerBitWidth() - 1;
147
1.32k
    auto N = Builder.createAnd(stackPop(), LLContext.getInt32(Mask));
148
1.32k
    auto RHS = Builder.createVectorSplat(
149
1.32k
        VectorTy.getVectorSize(),
150
1.32k
        Trunc ? Builder.createTrunc(N, VectorTy.getElementType())
151
1.32k
              : Builder.createZExtOrTrunc(N, VectorTy.getElementType()));
152
1.32k
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
153
1.32k
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
154
1.32k
  }
155
  void compileVectorShl(LLVM::Type VectorTy) noexcept;
156
  void compileVectorLShr(LLVM::Type VectorTy) noexcept;
157
  void compileVectorAShr(LLVM::Type VectorTy) noexcept;
158
  template <typename Func>
159
7.38k
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
7.38k
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
7.38k
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
7.38k
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
7.38k
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorAdd(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorAdd(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
410
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
410
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
410
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
410
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
410
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorAddSat(WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorAddSat(WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
159
870
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
870
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
870
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
870
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
870
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFAdd(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFAdd(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
172
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
172
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
172
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
172
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
172
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFDiv(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFDiv(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
196
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
196
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
196
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
196
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
196
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFMax(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFMax(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
208
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
208
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
208
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
208
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
208
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFMin(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFMin(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
339
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
339
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
339
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
339
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
339
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFMul(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFMul(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
268
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
268
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
268
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
268
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
268
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFPMax(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFPMax(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
332
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
332
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
332
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
332
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
332
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFPMin(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFPMin(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
326
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
326
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
326
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
326
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
326
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorFSub(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorFSub(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
460
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
460
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
460
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
460
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
460
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorMul(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorMul(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
450
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
450
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
450
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
450
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
450
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorQ15MulSat()::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorQ15MulSat()::$_0&&)
Line
Count
Source
159
160
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
160
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
160
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
160
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
160
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorSMax(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorSMax(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
513
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
513
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
513
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
513
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
513
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorSMin(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorSMin(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
322
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
322
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
322
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
322
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
322
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorSub(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorSub(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
679
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
679
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
679
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
679
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
679
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorSubSat(WasmEdge::LLVM::Type, bool)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorSubSat(WasmEdge::LLVM::Type, bool)::$_0&&)
Line
Count
Source
159
394
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
394
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
394
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
394
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
394
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorUAvgr(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorUAvgr(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
269
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
269
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
269
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
269
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
269
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorUMax(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorUMax(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
727
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
727
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
727
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
727
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
727
  }
vectorInstr.cpp:void WasmEdge::FunctionCompiler::compileVectorVectorOp<WasmEdge::FunctionCompiler::compileVectorVectorUMin(WasmEdge::LLVM::Type)::$_0>(WasmEdge::LLVM::Type, WasmEdge::FunctionCompiler::compileVectorVectorUMin(WasmEdge::LLVM::Type)::$_0&&)
Line
Count
Source
159
294
  void compileVectorVectorOp(LLVM::Type VectorTy, Func &&Op) noexcept {
160
294
    auto RHS = Builder.createBitCast(stackPop(), VectorTy);
161
294
    auto LHS = Builder.createBitCast(stackPop(), VectorTy);
162
294
    stackPush(Builder.createBitCast(Op(LHS, RHS), Context.Int64x2Ty));
163
294
  }
164
  void compileVectorVectorAdd(LLVM::Type VectorTy) noexcept;
165
  void compileVectorVectorAddSat(LLVM::Type VectorTy, bool Signed) noexcept;
166
  void compileVectorVectorSub(LLVM::Type VectorTy) noexcept;
167
  void compileVectorVectorSubSat(LLVM::Type VectorTy, bool Signed) noexcept;
168
  void compileVectorVectorMul(LLVM::Type VectorTy) noexcept;
169
  void compileVectorSwizzle() noexcept;
170
171
  void compileVectorVectorQ15MulSat() noexcept;
172
  void compileVectorVectorSMin(LLVM::Type VectorTy) noexcept;
173
  void compileVectorVectorUMin(LLVM::Type VectorTy) noexcept;
174
  void compileVectorVectorSMax(LLVM::Type VectorTy) noexcept;
175
  void compileVectorVectorUMax(LLVM::Type VectorTy) noexcept;
176
  void compileVectorVectorUAvgr(LLVM::Type VectorTy) noexcept;
177
  void compileVectorNarrow(LLVM::Type FromTy, bool Signed) noexcept;
178
  void compileVectorExtend(LLVM::Type FromTy, bool Signed, bool Low) noexcept;
179
  void compileVectorExtMul(LLVM::Type FromTy, bool Signed, bool Low) noexcept;
180
  void compileVectorExtAddPairwise(LLVM::Type VectorTy, bool Signed) noexcept;
181
  void compileVectorFAbs(LLVM::Type VectorTy) noexcept;
182
  void compileVectorFNeg(LLVM::Type VectorTy) noexcept;
183
  void compileVectorFSqrt(LLVM::Type VectorTy) noexcept;
184
  void compileVectorFCeil(LLVM::Type VectorTy) noexcept;
185
  void compileVectorFFloor(LLVM::Type VectorTy) noexcept;
186
  void compileVectorFTrunc(LLVM::Type VectorTy) noexcept;
187
  void compileVectorFNearest(LLVM::Type VectorTy) noexcept;
188
  void compileVectorVectorFAdd(LLVM::Type VectorTy) noexcept;
189
  void compileVectorVectorFSub(LLVM::Type VectorTy) noexcept;
190
  void compileVectorVectorFMul(LLVM::Type VectorTy) noexcept;
191
  void compileVectorVectorFDiv(LLVM::Type VectorTy) noexcept;
192
  void compileVectorVectorFMin(LLVM::Type VectorTy) noexcept;
193
  void compileVectorVectorFMax(LLVM::Type VectorTy) noexcept;
194
  void compileVectorVectorFPMin(LLVM::Type VectorTy) noexcept;
195
  void compileVectorVectorFPMax(LLVM::Type VectorTy) noexcept;
196
  void compileVectorTruncSatS32(LLVM::Type VectorTy, bool PadZero) noexcept;
197
  void compileVectorTruncSatU32(LLVM::Type VectorTy, bool PadZero) noexcept;
198
  void compileVectorConvertS(LLVM::Type VectorTy, LLVM::Type FPVectorTy,
199
                             bool Low) noexcept;
200
  void compileVectorConvertU(LLVM::Type VectorTy, LLVM::Type FPVectorTy,
201
                             bool Low) noexcept;
202
  void compileVectorDemote() noexcept;
203
  void compileVectorPromote() noexcept;
204
205
  void compileVectorVectorMAdd(LLVM::Type VectorTy) noexcept;
206
207
  void compileVectorVectorNMAdd(LLVM::Type VectorTy) noexcept;
208
209
  void compileVectorRelaxedIntegerDotProduct() noexcept;
210
211
  void compileVectorRelaxedIntegerDotProductAdd() noexcept;
212
213
  void
214
  enterBlock(LLVM::BasicBlock JumpBlock, LLVM::BasicBlock NextBlock,
215
             LLVM::BasicBlock ElseBlock, std::vector<LLVM::Value> Args,
216
             std::pair<std::vector<ValType>, std::vector<ValType>> Type,
217
             std::vector<std::tuple<std::vector<LLVM::Value>, LLVM::BasicBlock>>
218
                 ReturnPHI = {}) noexcept;
219
220
  Control leaveBlock() noexcept;
221
222
  void checkStop() noexcept;
223
224
  void checkPendingException() noexcept;
225
226
  void setUnreachable() noexcept;
227
228
  bool isUnreachable() const noexcept;
229
230
  void
231
  buildPHI(Span<const ValType> RetType,
232
           Span<const std::tuple<std::vector<LLVM::Value>, LLVM::BasicBlock>>
233
               Incomings) noexcept;
234
235
  void setLableJumpPHI(unsigned int Index) noexcept;
236
237
  LLVM::BasicBlock getLabel(unsigned int Index) const noexcept;
238
239
  LLVM::BasicBlock getEHDispatchTarget() noexcept;
240
241
863k
  void stackPush(LLVM::Value Value) noexcept { Stack.push_back(Value); }
242
  LLVM::Value stackPop() noexcept;
243
244
  LLVM::Value switchEndian(LLVM::Value Value);
245
246
  LLVM::Compiler::CompileContext &Context;
247
  LLVM::Context LLContext;
248
  std::vector<std::pair<LLVM::Type, LLVM::Value>> Local;
249
  std::vector<LLVM::Value> Stack;
250
  LLVM::Value LocalInstrCount = nullptr;
251
  LLVM::Value LocalGas = nullptr;
252
  // Entry-block slot reused by every call that resolves its callee at runtime.
253
  // Only entry-block allocas become static frame slots; one inside a loop body
254
  // grows the native stack on every iteration.
255
  LLVM::Value CalleeCtxSlot = nullptr;
256
  std::unordered_map<ErrCode::Value, LLVM::BasicBlock> TrapBB;
257
  bool IsUnreachable = false;
258
  bool Interruptible = false;
259
  struct Control {
260
    size_t StackSize;
261
    bool Unreachable;
262
    LLVM::BasicBlock JumpBlock;
263
    LLVM::BasicBlock NextBlock;
264
    LLVM::BasicBlock ElseBlock;
265
    LLVM::BasicBlock TryDispatchBB;
266
    std::vector<LLVM::Value> Args;
267
    std::pair<std::vector<ValType>, std::vector<ValType>> Type;
268
    std::vector<std::tuple<std::vector<LLVM::Value>, LLVM::BasicBlock>>
269
        ReturnPHI;
270
    Control(size_t S, bool U, LLVM::BasicBlock J, LLVM::BasicBlock N,
271
            LLVM::BasicBlock E, std::vector<LLVM::Value> A,
272
            std::pair<std::vector<ValType>, std::vector<ValType>> T,
273
            std::vector<std::tuple<std::vector<LLVM::Value>, LLVM::BasicBlock>>
274
                R) noexcept
275
22.5k
        : StackSize(S), Unreachable(U), JumpBlock(J), NextBlock(N),
276
22.5k
          ElseBlock(E), TryDispatchBB(), Args(std::move(A)), Type(std::move(T)),
277
22.5k
          ReturnPHI(std::move(R)) {}
278
    Control(const Control &) = default;
279
27.6k
    Control(Control &&) = default;
280
    Control &operator=(const Control &) = default;
281
1.39k
    Control &operator=(Control &&) = default;
282
  };
283
  bool IsLazyJIT;
284
  std::vector<Control> ControlStack;
285
  LLVM::FunctionCallee F;
286
  LLVM::Value ModCtx;
287
  LLVM::Value ExecCtx;
288
  LLVM::BasicBlock UnwindBB;
289
  LLVM::Builder Builder;
290
};
291
292
} // namespace WasmEdge