Closed oflatt closed 2 weeks ago
Looks like this slightly improves nighly across many benchmarks!
Looks like this slightly improves nighly across many benchmarks!
Will this PR handle this case and remove part1_i_body:
?
br i1 %var40, label %part1_i_body, label %part1_i_done
part1_i_body: ; preds = %part1_i
br label %part1_j
part1_j: ...
What did you want the output optimized code to be? The empty block would be removed by collapse_empty_blocks
What did you want the output optimized code to be? The empty block would be removed by
collapse_empty_blocks
I want the result to be
br i1 %var40, label %%part1_j, label %part1_i_done
part1_j: ...
which i think this PR will do?
yep, it'll do that!
This change simplifies the empty block optimizer, and also adds a new pass that detects blocks that only contain identity operators. This cuts down on intermediate blocks.