[PATCH] D37940: Peel off the dominant case in switch statement

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 17:18:16 PDT 2017


On Fri, Sep 15, 2017 at 4:35 PM, Daniel Berlin via Phabricator <
reviews at reviews.llvm.org> wrote:

> dberlin added a comment.
>
> We've already discovered a slew of problem from over-optimizing things in
> simplifycfg, which is also being used as a canonicalization pass.
> Either it needs a set of flags controlling what it does, or it needs to
> not be trying to do "performance improvement" and "canonicalization" as a
> single pass.
> See, e.g, https://bugs.llvm.org/show_bug.cgi?id=34603
>
> Indeed. The original motivation case is a chain of if-else-if. We fold
them into a switch in simplifyCFG then lowered into a set of branches in
different order.
The original order was set based on the profiles (according to the user).


> https://reviews.llvm.org/D37940
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170915/9b1ea249/attachment.html>


More information about the llvm-commits mailing list