Ignore already sealed blocks in seal_all_blocks
This commit is contained in:
@@ -259,7 +259,7 @@ impl<'a> FunctionBuilder<'a> {
|
|||||||
self.handle_ssa_side_effects(side_effects);
|
self.handle_ssa_side_effects(side_effects);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Effectively calls seal_block on all blocks in the function.
|
/// Effectively calls seal_block on all unsealed blocks in the function.
|
||||||
///
|
///
|
||||||
/// It's more efficient to seal `Block`s as soon as possible, during
|
/// It's more efficient to seal `Block`s as soon as possible, during
|
||||||
/// translation, but for frontends where this is impractical to do, this
|
/// translation, but for frontends where this is impractical to do, this
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ impl SSABuilder {
|
|||||||
mem::replace(&mut self.side_effects, SideEffects::new())
|
mem::replace(&mut self.side_effects, SideEffects::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Completes the global value numbering for all `Block`s in `func`.
|
/// Completes the global value numbering for all unsealed `Block`s in `func`.
|
||||||
///
|
///
|
||||||
/// It's more efficient to seal `Block`s as soon as possible, during
|
/// It's more efficient to seal `Block`s as soon as possible, during
|
||||||
/// translation, but for frontends where this is impractical to do, this
|
/// translation, but for frontends where this is impractical to do, this
|
||||||
@@ -383,8 +383,10 @@ impl SSABuilder {
|
|||||||
// and creation of new blocks, however such new blocks are sealed on
|
// and creation of new blocks, however such new blocks are sealed on
|
||||||
// the fly, so we don't need to account for them here.
|
// the fly, so we don't need to account for them here.
|
||||||
for block in self.ssa_blocks.keys() {
|
for block in self.ssa_blocks.keys() {
|
||||||
|
if !self.is_sealed(block) {
|
||||||
self.seal_one_block(block, func);
|
self.seal_one_block(block, func);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
mem::replace(&mut self.side_effects, SideEffects::new())
|
mem::replace(&mut self.side_effects, SideEffects::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user