feat(joinir): Phase 61-4-F ToplevelOps and production path integration
Phase 61-4-F: Loop-outside If JoinIR production path Changes: - F.1: Add ToplevelOps struct implementing PhiBuilderOps for MirBuilder - Enables emit_toplevel_phis() to emit PHI instructions via MirBuilder - Uses insert_phi_at_head_spanned for proper PHI placement - ~70 lines, thin wrapper following box theory - F.2: Integrate production path with emit_toplevel_phis - Replace TODO with actual PHI emission call - Build IfShape from branch blocks - Log PHI count on dry-run - Add IfToplevelTest.* to try_lower_if_to_joinir allowed list - Fixes function name guard that blocked testing Note: Pattern matching currently only supports return patterns (IfMerge/IfSelect). Local variable assignment patterns fall back to existing PHI generation, which correctly produces valid MIR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -157,6 +157,7 @@ pub fn try_lower_if_to_joinir(
|
||||
func.signature.name.starts_with("IfSelectTest.") ||
|
||||
func.signature.name.starts_with("IfSelectLocalTest.") || // Phase 33-10 test
|
||||
func.signature.name.starts_with("IfMergeTest.") ||
|
||||
func.signature.name.starts_with("IfToplevelTest.") || // Phase 61-4: loop-outside if test
|
||||
func.signature.name.starts_with("Stage1JsonScannerTestBox.") || // Phase 33-5 test
|
||||
|
||||
// Stage-1 rollout (env-controlled)
|
||||
|
||||
Reference in New Issue
Block a user