The WebAssembly text and binary formats have different operand orders
for the "type" and "table" fields of call_indirect (and
return_call_indirect). In LLVM we use the binary order for the MCInstr,
but when we produce or consume the text format we should use the text
order. For compilation units targetting WebAssembly 1.0 (without the
reference types feature), we omit the table operand entirely.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
50 ms | x64 debian > Flang.Semantics::resolve102.f90 |
Event Timeline
Comment Actions
Related to https://reviews.llvm.org/D90948#2572528. Note that this patch parses call_indirect () -> () the same as call_indirect __indirect_function_table, () -> () when reference-types is enabled, i.e. supplying the "missing" operand. Advantage is that you can compile the same input with or without reference types. Disadvantage is that it's slightly magical. Feedback welcome.
Comment Actions
LGTM with the current behavior of implicitly inserting the __indirect_function_table operand. Thanks, @wingo!
clang-tidy: warning: 'auto &Tok' can be declared as 'const auto &Tok' [llvm-qualified-auto]
not useful