You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MLIR: -O1+ infers D_DoomMain as noreturn and drops the main loop #253
doom-flow's MLIR build is currently forced to -O0 in scripts/build_wasm.sh because -O1+ makes wasm-ld/binaryen infer that D_DoomMain is noreturn and drop most of the game, including the main game loop.
Details:
D_DoomMain in dmain.flow ends with D_DoomLoop(), which in this port intentionally returns so the ASYNCIFY stack stays shallow.
doom.flow's main calls doom_bootstrap (which calls D_DoomMain) and then runs the frame loop.
When BACKEND=mlir is built with emcc -O1 or -O2, the resulting .wasm is missing the post-bootstrap loop, so the title screen renders but the game cannot continue.
Current workaround: scripts/build_wasm.sh line 78 sets EMCC_OPT=(-O0) for MLIR, which keeps the loop but produces an unusably slow binary.
Requested change: Flow's MLIR/LLVM lowering should not mark or infer D_DoomMain as noreturn when it has a return path, or give the user a way to suppress that attribute for a specific function.
Activity
fix(mlir): resolve doom -O2 blockers; ILP32 ptr sizing (#253–#255) (#257
fix+docs: close resolved issues; ILP32 sizeof_ptr; Homebrew; linguist…
fix(mlir): resolve doom -O2 blockers; ILP32 ptr sizing (#253–#255) (#257