feat(phi): Step 5-5-D - Skip __pin$ in build_exit_phis()
Implementation: - loopform_builder.rs:505-512: Filter __pin$ from body_local_names collection - Result: All __pin$ variables correctly classified as BodyLocalInternal - Exit PHI generation properly skipped for __pin$ temps Verification (NYASH_OPTION_C_DEBUG=1): ✅ All __pin$ vars: BodyLocalInternal needs_exit_phi=false ✅ Exit PHI generation: SKIP for all __pin$ variables Progress: - ValueId error: 256→260 (minor variation, different root cause) - Dominator errors: Still 1 remaining - Test status: 267 PASS / 1 FAIL (no regressions) Next: Investigate ValueId(260) - not a __pin$ variable 🐛 PHI Bug Option C実装: 箱分割設計で根本修正
This commit is contained in:
@ -502,6 +502,15 @@ impl LoopFormBuilder {
|
||||
let mut body_local_set: std::collections::HashSet<String> = std::collections::HashSet::new();
|
||||
for (_block_id, snapshot) in exit_snapshots {
|
||||
for var_name in snapshot.keys() {
|
||||
// Step 5-5-D: Skip __pin$ temporary variables in exit PHI generation
|
||||
// These are BodyLocalInternal and should NOT get exit PHIs
|
||||
if var_name.starts_with("__pin$") && var_name.contains("$@") {
|
||||
if debug {
|
||||
eprintln!("[DEBUG/exit_phi] SKIP __pin$ variable: {}", var_name);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let is_pinned = self.pinned.iter().any(|p| &p.name == var_name);
|
||||
let is_carrier = self.carriers.iter().any(|c| &c.name == var_name);
|
||||
if !is_pinned && !is_carrier && !body_local_set.contains(var_name) {
|
||||
|
||||
Reference in New Issue
Block a user