Skip non-branching blocks now that we're using basic blocks
This is a rebase of [1]. In the long term, we'll want to simplify these analysis passes. For now, this is simple and will reduce the number of instructions processed in certain cases. [1] https://github.com/bytecodealliance/cranelift/pull/866
This commit is contained in:
committed by
Benjamin Bouvier
parent
135a48ca7e
commit
4aa8776a9b
@@ -120,7 +120,7 @@ impl ControlFlowGraph {
|
||||
}
|
||||
|
||||
fn compute_block(&mut self, func: &Function, block: Block) {
|
||||
for inst in func.layout.block_insts(block) {
|
||||
for inst in func.layout.block_likely_branches(block) {
|
||||
match func.dfg.analyze_branch(inst) {
|
||||
BranchInfo::SingleDest(dest, _) => {
|
||||
self.add_edge(block, inst, dest);
|
||||
|
||||
Reference in New Issue
Block a user