MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / prev_live

Function prev_live

compiler/src/modules/vm/optimizer.rs:187–194  ·  view source on GitHub ↗

Nearest live instruction before `from`; skips entries already marked dead by inner folds. */

(dead: &[bool], from: usize)

Source from the content-addressed store, hash-verified

185
186/* Nearest live instruction before `from`; skips entries already marked dead by inner folds. */
187fn prev_live(dead: &[bool], from: usize) -> Option<usize> {
188 let mut i = from;
189 while i > 0 {
190 i -= 1;
191 if !dead[i] { return Some(i); }
192 }
193 None
194}
195
196fn try_fold_binop(chunk: &mut SSAChunk, dead: &mut [bool], ip: usize) {
197 let Some(prev1_ip) = prev_live(dead, ip) else { return };

Callers 3

try_fold_binopFunction · 0.85
try_fold_notFunction · 0.85
try_fold_negFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected