summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/WebAssembly/funcref-tableget.ll
AgeCommit message (Collapse)Author
2022-09-27[WebAssembly] Use intrinsics for table.get/set instructionsPaulo Matos
Initial table.get/set implementation would match and lower combinations of GEP+load/store to table.get/set instructions. However, this is error prone due to potential combinations of GEP+load/store we don't implement, and load/store optimizations. By changing the code to using intrinsics, we avoid both issues and simplify the code. New builtins implemented: * @llvm.wasm.table.get.externref * @llvm.wasm.table.get.funcref * @llvm.wasm.table.set.externref * @llvm.wasm.table.set.funcref Reviewed By: asb, tlively Differential Revision: https://reviews.llvm.org/D134436
2022-06-20[WebAssembly][NFC] Update reftype and table tests to use opaque pointersAlex Bradbury
Differential Revision: https://reviews.llvm.org/D126535
2022-02-04[WebAssembly] Refactor and fix emission of external IR global declsPaulo Matos
Reland of 00bf4755. This patches fixes the visibility and linkage information of symbols referring to IR globals. Emission of external declarations is now done in the first execution of emitConstantPool rather than in emitLinkage (and a few other places). This is the point where we have already gathered information about used symbols (by running the MC Lower PrePass) and not yet started emitting any functions so that any declarations that need to be emitted are done so at the top of the file before any functions. This changes the order of a few directives in the final asm file which required an update to a few tests. Reviewed By: sbc100 Differential Revision: https://reviews.llvm.org/D118995
2022-01-31Revert "[WebAssembly] Refactor and fix emission of external IR global decls"Sam Clegg
This reverts commit 00bf4755e90c89963a135739218ef49c2417109f. This change broke the emscripten builder (among other things): https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8823500584349280721/overview Sample failure: ``` test_unistd_unlink (test_core.core0) ... wasm-ld: error: symbol type mismatch: __stdio_write >>> defined as WASM_SYMBOL_TYPE_FUNCTION in /usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/libc-debug.a(__stdio_write.o) >>> defined as WASM_SYMBOL_TYPE_DATA in /usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/libc-debug.a(stderr.o) ```
2022-01-31[WebAssembly] Refactor and fix emission of external IR global declsPaulo Matos
This patches fixes the visibility and linkage information of symbols referring to IR globals. Emission of external declarations is now done in the first execution of emitConstantPool rather than in emitLinkage (and a few other places). This is the point where we have already gathered information about used symbols (by running the MC Lower PrePass) and not yet started emitting any functions so that any declarations that need to be emitted are done so at the top of the file before any functions. This changes the order of a few directives in the final asm file which required an update to a few tests. Reviewed By: sbc100 Differential Revision: https://reviews.llvm.org/D118122
2021-12-13[WebAssembly] Lower global syms representing tables with .tabletypePaulo Matos
This patch implements a fix to recognize global symbols that represent WebAssembly appropriately and generate the necessary .tabletype directives. Reviewed By: sbc100 Differential Revision: https://reviews.llvm.org/D115511
2021-12-07[WebAssembly] Implement table instruction intrinsicsPaulo Matos
This change implements intrinsics for table.grow, table.fill, table.size, and table.copy. Differential Revision: https://reviews.llvm.org/D113420
2021-10-20[WebAssembly] Implementation of table.get/set for reftypes in LLVM IRPaulo Matos
This change implements new DAG nodes TABLE_GET/TABLE_SET, and lowering methods for load and stores of reference types from IR arrays. These global LLVM IR arrays represent tables at the Wasm level. Differential Revision: https://reviews.llvm.org/D111154