13
13
//! We track, at every program point, the correspondence between each value
14
14
//! label and *all* locations in which it resides. E.g., if it is stored to the
15
15
//! stack, we remember that it is in both a register and the stack slot; but if
16
- //! the register is later overridden , then we have it just in the stack slot.
16
+ //! the register is later overwritten , then we have it just in the stack slot.
17
17
//! This allows us to avoid false-positives observing loads/stores that we think
18
18
//! are spillslots but really aren't.
19
19
//!
@@ -320,7 +320,7 @@ pub(crate) fn compute<I: VCodeInst>(
320
320
// Initialize state at entry.
321
321
block_starts. insert ( 0 , AnalysisInfo :: new ( ) ) ;
322
322
323
- // Worklist: basic-block start offset .
323
+ // Worklist: label indices for basic blocks .
324
324
let mut worklist = VecDeque :: new ( ) ;
325
325
let mut worklist_set = HashSet :: new ( ) ;
326
326
worklist. push_back ( 0 ) ;
@@ -332,6 +332,8 @@ pub(crate) fn compute<I: VCodeInst>(
332
332
333
333
let mut state = block_starts. get ( & block) . unwrap ( ) . clone ( ) ;
334
334
trace ! ( "at block {} -> state: {:?}" , block, state) ;
335
+ // Iterate for each instruction in the block (we break at the first
336
+ // terminator we see).
335
337
let mut iix = label_insn_iix[ block as usize ] ;
336
338
while iix < insts. len ( ) as u32 {
337
339
state. step ( & insts[ iix as usize ] ) ;
0 commit comments