fix(codegen): lower precise roots in native LLVM construction - #8062
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughNative LLVM construction now applies precise-root lowering before RS4GC for direct and split codegen units. Stack-map declarations and accessors support this path, while tests compare lowered output and native objects byte-for-byte. ChangesNative RS4GC lowering
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to The change aligns native LLVM construction with precise-root lowering and preserves the split-unit path, with exact emitted-object checks confirming matching behavior; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Cause
LlFunction::to_ir()is wherejs_shadow_slot_bindcalls becomeptr addrspace(1)root slots. The direct native backend streamedFinalItems before that whole-function pass, while still copyinggc "statepoint-example"onto the function. LLVM therefore verified and optimized a native arm with no RS4GC-visible roots. The existing byte comparison correctly reported a semantic mismatch; this is not object metadata and nothing is normalized away.LlModule::skeleton_ir()also now mirrors the statepoint declarations and Apple stack-map retention directive used by the text module.Verification
addrspace(1)roots and no shadow-slot bind callcargo fmt --all -- --checkgit diff --checkCloses #8052.
Refs #7971, #7966.
No version bump.
Summary by CodeRabbit