Files
hakorune/src/mir/phi_core/mod.rs
nyash-codex c27981c35a refactor(phi): Phase 25.1q - Conservative PHI strategy unification
**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>
2025-11-19 10:32:16 +09:00

20 lines
634 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* 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.