(&mut self, from: Block, from_inst: Inst, to: Block)
| 148 | } |
| 149 | |
| 150 | fn add_edge(&mut self, from: Block, from_inst: Inst, to: Block) { |
| 151 | self.data[from] |
| 152 | .successors |
| 153 | .insert(to, &mut self.succ_forest, &()); |
| 154 | self.data[to] |
| 155 | .predecessors |
| 156 | .insert(from_inst, from, &mut self.pred_forest, &()); |
| 157 | } |
| 158 | |
| 159 | /// Get an iterator over the CFG predecessors to `block`. |
| 160 | pub fn pred_iter(&self, block: Block) -> PredIter<'_> { |