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
@@ -351,7 +351,7 @@ impl DominatorTree {
|
||||
/// post-order. Split-invariant means that if a block is split in two, we get the same
|
||||
/// post-order except for the insertion of the new block header at the split point.
|
||||
fn push_successors(&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(succ, _) => self.push_if_unseen(succ),
|
||||
BranchInfo::Table(jt, dest) => {
|
||||
|
||||
Reference in New Issue
Block a user