From 7e12abce71e54c390efb81d7b19c0dcbdac9295a Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Thu, 21 Jan 2021 16:01:46 -0800 Subject: [PATCH] Fix a few comment typos and add a clarifying comment. --- cranelift/codegen/src/machinst/debug.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cranelift/codegen/src/machinst/debug.rs b/cranelift/codegen/src/machinst/debug.rs index be0d0a8ec7..79a7467c56 100644 --- a/cranelift/codegen/src/machinst/debug.rs +++ b/cranelift/codegen/src/machinst/debug.rs @@ -13,7 +13,7 @@ //! We track, at every program point, the correspondence between each value //! label and *all* locations in which it resides. E.g., if it is stored to the //! stack, we remember that it is in both a register and the stack slot; but if -//! the register is later overridden, then we have it just in the stack slot. +//! the register is later overwritten, then we have it just in the stack slot. //! This allows us to avoid false-positives observing loads/stores that we think //! are spillslots but really aren't. //! @@ -320,7 +320,7 @@ pub(crate) fn compute( // Initialize state at entry. block_starts.insert(0, AnalysisInfo::new()); - // Worklist: basic-block start offset. + // Worklist: label indices for basic blocks. let mut worklist = VecDeque::new(); let mut worklist_set = HashSet::new(); worklist.push_back(0); @@ -332,6 +332,8 @@ pub(crate) fn compute( let mut state = block_starts.get(&block).unwrap().clone(); trace!("at block {} -> state: {:?}", block, state); + // Iterate for each instruction in the block (we break at the first + // terminator we see). let mut iix = label_insn_iix[block as usize]; while iix < insts.len() as u32 { state.step(&insts[iix as usize]);