[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:19:43 PDT 2017


I am doing it in here mainly because simplifyCFG will revert this
transformation by folding the peeled branched into switch. I can move it to
a separated pass. But I will probably still need to suppress the folding in
simplifyCFG.

-Rong

On Sep 15, 2017 4:39 PM, "Xinliang David Li" <davidxl at google.com> wrote:

> yes, I vote moving this out as a separate pass (enabled at O3 and above).
>
> 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
>>
>>
>> https://reviews.llvm.org/D37940
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170915/5f01ea5c/attachment.html>


More information about the llvm-commits mailing list