phase29ap(p4): shrink joinir legacy loop pattern table
This commit is contained in:
@ -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.
|
||||
/// Pattern4 → Pattern8 → Pattern9 → Pattern2
|
||||
/// Pattern4 → Pattern9 → Pattern2
|
||||
///
|
||||
/// # Current Patterns (Structure-based detection, established Phase 131-11+)
|
||||
///
|
||||
@ -243,6 +243,7 @@ pub(crate) struct LoopPatternEntry {
|
||||
///
|
||||
/// Note: func_name is now only used for debug logging, not pattern detection
|
||||
/// Phase 286: Pattern5 removed (migrated to Plan-based routing)
|
||||
/// Phase 29ap P4: Pattern8 removed (migrated to Plan-based routing)
|
||||
pub(crate) static LOOP_PATTERNS: &[LoopPatternEntry] = &[
|
||||
LoopPatternEntry {
|
||||
name: "Pattern6_NestedLoopMinimal", // Phase 188.3: 1-level nested loop
|
||||
@ -258,11 +259,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: "Pattern8_BoolPredicateScan", // Phase 259 P0: boolean predicate scan (is_integer/is_valid)
|
||||
detect: super::pattern8_scan_bool_predicate::can_lower,
|
||||
lower: super::pattern8_scan_bool_predicate::lower,
|
||||
},
|
||||
LoopPatternEntry {
|
||||
name: "Pattern9_AccumConstLoop", // Phase 270 P1: accumulator const loop (橋渡しパターン, before P1)
|
||||
detect: super::pattern9_accum_const_loop::can_lower,
|
||||
@ -293,7 +289,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 Pattern2/4/8/9 table for other patterns
|
||||
/// 3. Fall through to legacy Pattern2/4/9 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
|
||||
@ -308,7 +304,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)
|
||||
/// - Pattern2/4/8/9: src/mir/builder/control_flow/joinir/patterns/pattern*.rs (direct lowering)
|
||||
/// - Pattern2/4/9: src/mir/builder/control_flow/joinir/patterns/pattern*.rs (direct lowering)
|
||||
pub(crate) fn route_loop_pattern(
|
||||
builder: &mut MirBuilder,
|
||||
ctx: &LoopPatternContext,
|
||||
|
||||
Reference in New Issue
Block a user