Skip to content

Commit 7e12abc

Browse files
committed
Fix a few comment typos and add a clarifying comment.
1 parent 997fab5 commit 7e12abc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cranelift/codegen/src/machinst/debug.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! We track, at every program point, the correspondence between each value
1414
//! label and *all* locations in which it resides. E.g., if it is stored to the
1515
//! 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.
1717
//! This allows us to avoid false-positives observing loads/stores that we think
1818
//! are spillslots but really aren't.
1919
//!
@@ -320,7 +320,7 @@ pub(crate) fn compute<I: VCodeInst>(
320320
// Initialize state at entry.
321321
block_starts.insert(0, AnalysisInfo::new());
322322

323-
// Worklist: basic-block start offset.
323+
// Worklist: label indices for basic blocks.
324324
let mut worklist = VecDeque::new();
325325
let mut worklist_set = HashSet::new();
326326
worklist.push_back(0);
@@ -332,6 +332,8 @@ pub(crate) fn compute<I: VCodeInst>(
332332

333333
let mut state = block_starts.get(&block).unwrap().clone();
334334
trace!("at block {} -> state: {:?}", block, state);
335+
// Iterate for each instruction in the block (we break at the first
336+
// terminator we see).
335337
let mut iix = label_insn_iix[block as usize];
336338
while iix < insts.len() as u32 {
337339
state.step(&insts[iix as usize]);

0 commit comments

Comments
 (0)