mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
llvm: Don't use the optimized jump table construction logic for wasm.
This commit is contained in:
parent
36b89101df
commit
2fc1f9b971
1 changed files with 6 additions and 0 deletions
|
|
@ -6544,6 +6544,12 @@ pub const FuncGen = struct {
|
|||
|
||||
const jmp_table: ?SwitchDispatchInfo.JmpTable = jmp_table: {
|
||||
if (!is_dispatch_loop) break :jmp_table null;
|
||||
|
||||
// Workaround for:
|
||||
// * https://github.com/llvm/llvm-project/blob/56905dab7da50bccfcceaeb496b206ff476127e1/llvm/lib/MC/WasmObjectWriter.cpp#L560
|
||||
// * https://github.com/llvm/llvm-project/blob/56905dab7da50bccfcceaeb496b206ff476127e1/llvm/test/MC/WebAssembly/blockaddress.ll
|
||||
if (zcu.comp.getTarget().isWasm()) break :jmp_table null;
|
||||
|
||||
// On a 64-bit target, 1024 pointers in our jump table is about 8K of pointers. This seems just
|
||||
// about acceptable - it won't fill L1d cache on most CPUs.
|
||||
const max_table_len = 1024;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue