feat(llvm): Add optional latch→header connection in LoopForm
- Added NYASH_LOOPFORM_LATCH2HEADER environment variable - When enabled, latch block jumps back to header (completing the loop) - When disabled (default), latch remains unreachable (safe mode) - Preserves header predecessor count stability in default mode This allows gradual testing of full LoopForm loop structure.
This commit is contained in:
@ -500,6 +500,9 @@ impl LLVMCompiler {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Note: LoopForm latch→header adds a new LLVM pred not represented in MIR.
|
||||
// Header PHI normalization for this extra pred will be implemented later
|
||||
// using a LoopForm-aware finalize that does not rely on MIR inputs.
|
||||
}
|
||||
}
|
||||
// Finalize function: ensure every basic block is closed with a terminator.
|
||||
|
||||
Reference in New Issue
Block a user