s/merged_block_count/statements_to_merge/g

This commit is contained in:
Markus Westerlind 2020-03-02 20:08:21 +01:00
parent 84c024d92f
commit 851e9d64ba

View File

@ -128,12 +128,12 @@ pub fn simplify(mut self) {
changed |= inner_changed; changed |= inner_changed;
} }
let merged_block_count = let statements_to_merge =
merged_blocks.iter().map(|&i| self.basic_blocks[i].statements.len()).sum(); merged_blocks.iter().map(|&i| self.basic_blocks[i].statements.len()).sum();
if merged_block_count > 0 { if statements_to_merge > 0 {
let mut statements = std::mem::take(&mut self.basic_blocks[bb].statements); let mut statements = std::mem::take(&mut self.basic_blocks[bb].statements);
statements.reserve(merged_block_count); statements.reserve(statements_to_merge);
for &from in &merged_blocks { for &from in &merged_blocks {
statements.append(&mut self.basic_blocks[from].statements); statements.append(&mut self.basic_blocks[from].statements);
} }