Closed ezrosent closed 3 months ago
Question for reviewers: this will remove more branches if we iterate to a fixed point. It's easy to add; let me know if you want to try it.
Went ahead and added that in the next commit. Figure it's worth looking at nightly with everything. It's a small change and easy to revert. Here's the result for the same sqrt program.
There's a fairly detailed doc comment in
simplify_branches.rs
. The goal here is to clean up the CFG output and remove redundant branches from the generated code. Here's an example: at head, thesqrt
benchmark generates the following cfg:And with this PR, we get: