**Changes**: 1. Created phi_core/conservative.rs module - ConservativeMerge struct for PHI generation analysis - Unified Conservative strategy implementation - Box-First theory application 2. Refactored phi.rs merge_modified_vars - Use ConservativeMerge::analyze() instead of inline logic - Reduced from ~60 lines to ~35 lines (42% reduction) - Improved code clarity and maintainability **Benefits**: - Centralized Conservative PHI logic (easier to maintain) - Eliminated duplicate variable union calculation - Clear separation of concerns (analysis vs execution) - Foundation for future PhiMergeHelper unification **Testing**: ✅ mir_stage1_using_resolver_full_collect_entries_verifies passes ✅ Phase 25.1c/k SSA fix preserved ✅ MIR correctness verified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
634 B
Rust
20 lines
634 B
Rust
/*!
|
||
* phi_core – Unified PHI management scaffold (Phase 1)
|
||
*
|
||
* Purpose:
|
||
* - Provide a single, stable entry point for PHI-related helpers.
|
||
* - Start with re-exports of existing, verified logic (zero behavior change).
|
||
* - Prepare ground for gradual consolidation of loop PHI handling.
|
||
*/
|
||
|
||
pub mod common;
|
||
pub mod conservative;
|
||
pub mod if_phi;
|
||
pub mod loop_phi;
|
||
pub mod loopform_builder;
|
||
|
||
// 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
|
||
// stable wrappers here once migrated.
|