Repository navigation
fix(mlir): doom -O2 path; close out #253/#254 and ILP32 ptr sizing (#255) - #257
Merged
Merged
Conversation
Confirm #253/#254 against Flow tip: addressof for module globals (from #250) stops -O1+ turning drawshim getters into unreachable/noreturn, and static string arrays initialize via _emit_static_llvm_array_global. Size ptr/string to 4 bytes under --wasm32 in memref layouts (#255). Refresh doom_mlir -O2 preview and document status. Co-authored-by: Abhishek Shivakumar <[email protected]>
godofecht
marked this pull request as ready for review
August 9, 2026 20:40
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. |
Contributor
|
Follow-up (agent cannot write issues or push doom-flow):
|
1 of 2 tasks
cursor Bot
pushed a commit
that referenced
this pull request
Aug 9, 2026
Agent cannot push godofecht/doom-flow or close flow#253/#254/#256. Bundle the verified build_wasm.sh/README patch and point wasm.md at it after #257. Co-authored-by: Cursor Agent <[email protected]>
godofecht
added a commit
that referenced
this pull request
Aug 9, 2026
) Confirm #253/#254 against Flow tip: addressof for module globals (from #250) stops -O1+ turning drawshim getters into unreachable/noreturn, and static string arrays initialize via _emit_static_llvm_array_global. Size ptr/string to 4 bytes under --wasm32 in memref layouts (#255). Refresh doom_mlir -O2 preview and document status. Co-authored-by: Cursor Agent <[email protected]>
godofecht
added a commit
that referenced
this pull request
Aug 9, 2026
Agent cannot push godofecht/doom-flow or close flow#253/#254/#256. Bundle the verified build_wasm.sh/README patch and point wasm.md at it after #257. Co-authored-by: Cursor Agent <[email protected]>
4 tasks done
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
Sorts the new doom-flow MLIR follow-ups (#253–#256) against Flow tip.
#253 —
-O1+drops the main loopAlready fixed by #250 (addressof for
&module_global). Root cause was not a noreturn attribute onD_DoomMain:drawshim_*_addr/return &dc_yhused to load the global into a stack alloca and return that pointer (UB). At-O1+, LLVM turns callers intounreachable, false-noreturnspreads through draw/render, and emcc/binaryen drop usable code. Tip emitsret ptr @dc_yh.Verified: doom-flow
BACKEND=mlir+emcc -O2smoke reaches thousands of frames (D_DoomLoopreturns →mainloop ticks).#254 — static string-array globals
Already on main via
_emit_static_llvm_array_global(#250).@config_doom_namesis a concrete[N x ptr]initializer (not undef). Added regression tests + API existence check matching doom-flow’s build gate.#255 — wasm32 ILP32 pointer width
Partial fix:
--wasm32now sizesptr/stringas 4 bytes in memref struct layouts and pointer-element byte scaling (several fallbacks hardcoded 8). Typed LLVM GEP was already target-correct. doom-flow should keeprmain_ptr_bytes()instead of Flow-source* 8.u8 as i32zero-extend remains from #250 (rdata masks are defensive).#256 tracking
Please close #253 and #254, and update #256 to drop closed #221/#232/#233 plus these two.
#255can stay open for any remaining LP64 offsetof constants in doom-flow itself.Also
docs/language/wasm.md,ROADMAP.md,CHANGELOGsite/wasm/doom_mlir/preview at-O2Test plan
pytestMLIR unit tests (addressof, string arrays, pointer ABI, struct statics, unsigned, module statics)-O2(no crash; frame loop runs)