MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / block_successors

Method block_successors

cranelift/codegen/src/ir/function.rs:327–334  ·  view source on GitHub ↗

Returns an iterator over the blocks succeeding the given block.

(&self, block: Block)

Source from the content-addressed store, hash-verified

325
326 /// Returns an iterator over the blocks succeeding the given block.
327 pub fn block_successors(&self, block: Block) -> impl DoubleEndedIterator<Item = Block> + '_ {
328 self.layout.last_inst(block).into_iter().flat_map(|inst| {
329 self.dfg.insts[inst]
330 .branch_destination(&self.dfg.jump_tables, &self.dfg.exception_tables)
331 .iter()
332 .map(|block| block.block(&self.dfg.value_lists))
333 })
334 }
335
336 /// Replace the `dst` instruction's data with the `src` instruction's data
337 /// and then remove `src`.

Callers 4

runMethod · 0.80
nextMethod · 0.80
compute_spanning_treeMethod · 0.80

Calls 6

last_instMethod · 0.80
branch_destinationMethod · 0.80
into_iterMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
blockMethod · 0.45

Tested by

no test coverage detected