phase29ap(p7): remove pattern9 legacy routing

This commit is contained in:
2025-12-31 06:17:49 +09:00
parent 2ccc2c75e4
commit abff2ca682
7 changed files with 18 additions and 496 deletions

View File

@ -222,7 +222,7 @@ pub(crate) struct LoopPatternEntry {
///
/// **IMPORTANT**: Patterns are tried in array order (SSOT).
/// Array order defines priority - earlier entries are tried first.
/// Pattern6_NestedLoopMinimal → Pattern4 → Pattern9
/// Pattern6_NestedLoopMinimal → Pattern4
///
/// # Current Patterns (Structure-based detection, established Phase 131-11+)
///
@ -241,6 +241,7 @@ pub(crate) struct LoopPatternEntry {
/// Phase 286: Pattern5 removed (migrated to Plan-based routing)
/// Phase 29ap P4: Pattern8 removed (migrated to Plan-based routing)
/// Phase 29ap P5: Pattern2 removed (migrated to Plan-based routing)
/// Phase 29ap P7: Pattern9 removed (migrated to Plan-based routing)
pub(crate) static LOOP_PATTERNS: &[LoopPatternEntry] = &[
LoopPatternEntry {
name: "Pattern6_NestedLoopMinimal", // Phase 188.3: 1-level nested loop
@ -256,11 +257,6 @@ pub(crate) static LOOP_PATTERNS: &[LoopPatternEntry] = &[
// Pattern6_ScanWithInit now handled via extract_scan_with_init_plan() + PlanLowerer
// Phase 273 P2: Pattern7 entry removed (migrated to Plan-based routing)
// Pattern7_SplitScan now handled via extract_split_scan_plan() + PlanLowerer
LoopPatternEntry {
name: "Pattern9_AccumConstLoop", // Phase 270 P1: accumulator const loop (橋渡しパターン, before P1)
detect: super::pattern9_accum_const_loop::can_lower,
lower: super::pattern9_accum_const_loop::lower,
},
];
/// Try all registered patterns in priority order.
@ -281,7 +277,7 @@ pub(crate) static LOOP_PATTERNS: &[LoopPatternEntry] = &[
/// This function implements the following routing strategy:
/// 1. Try Plan-based Pattern6 (extract_scan_with_init_plan) → DomainPlan
/// 2. Try Plan-based Pattern7 (extract_split_scan_plan) → DomainPlan
/// 3. Fall through to legacy Pattern4/9 table for other patterns
/// 3. Fall through to legacy Pattern4 table for other patterns
///
/// The Plan line (Extractor → Normalizer → Verifier → Lowerer) is the
/// current operational SSOT for Pattern6/7. Legacy patterns (1/2/4/8/9) use
@ -296,7 +292,7 @@ pub(crate) static LOOP_PATTERNS: &[LoopPatternEntry] = &[
/// SSOT Entry Points:
/// - Pattern6: src/mir/builder/control_flow/plan/normalizer.rs (ScanWithInit normalization)
/// - Pattern7: src/mir/builder/control_flow/plan/normalizer.rs (SplitScan normalization)
/// - Pattern4/9: src/mir/builder/control_flow/joinir/patterns/pattern*.rs (direct lowering)
/// - Pattern4: src/mir/builder/control_flow/joinir/patterns/pattern*.rs (direct lowering)
/// - Pattern6_NestedLoopMinimal: src/mir/builder/control_flow/joinir/patterns/pattern6_nested_minimal.rs
pub(crate) fn route_loop_pattern(
builder: &mut MirBuilder,