Repository navigation
fix(mlir): wasm32 ABI on MLIR→emcc path; CI mlir-18 (#230) - #247
Merged
Merged
Conversation
doom-flow MLIR emit already works on main; the remaining #230 gap was linking with LP64 size_t into wasm32. Always pass --wasm32 from scripts/wasm_build.py, document it, and cover with a unit test. Bump the shared toolchain action from mlir-14-tools to mlir-18-tools so mlir-opt understands convert-scf-to-cf / convert-func-to-llvm / finalize-memref-to-llvm (required for --llvm lowering). Co-authored-by: Abhishek Shivakumar <[email protected]>
Absorb tip refresh from chore/repository-stats (attribute to fa4cd67). Co-authored-by: Abhishek Shivakumar <[email protected]>
godofecht
marked this pull request as ready for review
August 9, 2026 14:43
Contributor
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Co-authored-by: Abhishek Shivakumar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Toward #230 (doom-flow end-to-end on MLIR).
On current
main,doom.flowalready emits MLIR and lowers to non-empty.ll(with a modernmlir-opt). The WASM link path was still wrong: without--wasm32, libcsize_t/longstayi64and emcc reportsmalloc/memcpy/… signature mismatches.Changes
scripts/wasm_build.py: always pass--wasm32on the MLIR→LLVM path used by./flow wasm --backend=mlirdocs/language/wasm.md: document the ABI requirementtests/integration/test_wasm_backends.py: assert--wasm32is in the transpiler argv.github/actions/install-toolchain: install mlir-18-tools (not 14) so CI’smlir-optunderstandsconvert-scf-to-cf/convert-func-to-llvm/finalize-memref-to-llvmrepository-stats.jsontip refresh (absorbed fromchore/repository-stats)Verified locally
python3 -m flow.transpiler doom.flow --mlir --llvm --lenient→ ~3.4 MB.llBACKEND=mlirdoom wasm build with--wasm32→doom.{js,wasm,data}, no signature-mismatch warnings--wasm32passesFollow-up (doom-flow repo)
scripts/build_wasm.shstill needs--wasm32on the raw transpiler invocation (companion fix; push to that repo was 403). Browser IWAD smoke remains the last #230 checkbox.Test plan
pytest tests/integration/test_wasm_backends.py::test_flow_to_llvm_ir_passes_wasm32./flow wasm examples/wasm/hello_wasm.flow --backend=mlirif emcc available