feat(phi): Phase 26-F-2 - 箱理論による責務分離(IfBodyLocalMergeBox新設)
**箱理論による問題解決**: - ❌ 問題: LoopVarClassBox(ループスコープ分析)とif-merge処理が混在 - ✅ 解決: if-merge専用箱を新設して責務分離 **新箱: IfBodyLocalMergeBox**: - 責務: if-merge専用のbody-local φ候補決定 - ロジック: - 両腕に存在する変数を検出 - pre_ifと比較して値が変わった変数のみ - empty elseは空リスト返す - 特徴: LocalScopeInspector不要、LoopVarClassBox不使用 **変更ファイル**: - src/mir/phi_core/if_body_local_merge.rs: 新規作成(IfBodyLocalMergeBox) - src/mir/phi_core/phi_builder_box.rs: IfBodyLocalMergeBox使用に切り替え - src/mir/phi_core/body_local_phi_builder.rs: filter_if_merge_candidates()削除 - src/mir/loop_builder.rs: BodyLocalPhiBuilder setup削除 - src/mir/phi_core/mod.rs: if_body_local_merge追加 **テスト結果**: - Passed: 353→354 (+1) ✅ - Failed: 14→14 (退行なし) **既知の問題**: - domination error依然残存(%48 in bb48 from bb52) - 次フェーズで調査・修正予定 技術詳細: - ChatGPT箱理論分析による設計 - A案ベースのシンプル実装 - 責務明確化: ループスコープ分析 vs if-merge専用処理
This commit is contained in:
@ -32,6 +32,12 @@ pub mod exit_phi_builder;
|
||||
// Phase 26-E: PHI SSOT Unification - PhiBuilderBox
|
||||
pub mod phi_builder_box;
|
||||
|
||||
// Phase 26-F-2: If Body-Local Merge Box - if-merge専用φ候補決定箱
|
||||
pub mod if_body_local_merge;
|
||||
|
||||
// Phase 26-F-3: PHI invariants guard box(Fail-Fast共通化)
|
||||
pub mod phi_invariants;
|
||||
|
||||
// Public surface for callers that want a stable path:
|
||||
// Phase 1: No re-exports to avoid touching private builder internals.
|
||||
// Callers should continue using existing paths. Future phases may expose
|
||||
|
||||
Reference in New Issue
Block a user