pub fn layout_renumber() -> TimingToken
Expand description

Layout full renumbering

Examples found in repository?
src/ir/layout.rs (line 327)
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
    pub(crate) fn full_renumber(&mut self) {
        let _tt = timing::layout_renumber();
        let mut seq = 0;
        let mut next_block = self.first_block;
        while let Some(block) = next_block {
            self.blocks[block].seq = seq;
            seq += MAJOR_STRIDE;
            next_block = self.blocks[block].next.expand();

            let mut next_inst = self.blocks[block].first_inst.expand();
            while let Some(inst) = next_inst {
                self.insts[inst].seq = seq;
                seq += MAJOR_STRIDE;
                next_inst = self.insts[inst].next.expand();
            }
        }
        trace!("Renumbered {} program points", seq / MAJOR_STRIDE);
    }