[PATCH] D20143: New pass: guard widening

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 18:17:08 PDT 2016


chandlerc added a comment.

In http://reviews.llvm.org/D20143#431619, @reames wrote:

> Sanjoy and I talked about this one offline and I wanted to highlight a key point which is not obvious from the review thread:
>
> This code is not intended to be long term solution to guard widening.  This is essentially an experimental piece of code whose purposes is to inform what real optimization passes need to be extended to handle the majority of cases which arrive in practice.  It was deliberately designed to be simple and effective at the cost of compile time.
>
> My own review was from the perspective of this being a "real" optimization pass.  I don't know if we have a history of landing and evolving such experimental pieces of code in tree.  I certainly wouldn't feel comfortable approving such a thing since I have a clear conflict of interest, but I'm also not opposed to the notion either.
>
> What do others think?  Is having a pass that is expected to be experimental and unlikely to survive in its current form in tree a good idea?


I think this is fine. We have several passes in-tree that are not realistic passes to add to the default pipeline:

- reg2mem
- mem2reg
- bb-vectorize

Probably others that I'm forgetting. Some of these are testing or experimentation passes. Some are prototypes that help us understand a problem. I think bb-vectorize is a great example of this. Maybe it doesn't fit the cost model for the majority of targets and/or users, or the compile time hit is just too significant, but it teaches us about how to do non-loop vectorization and is valuable to have in tree IMO as a consequence.

I'm perfectly happy with this pass going in in just such a fashion. I would carefully document at the top of the file and elsewhere that this is *not* intended to be a practical or production-ready pass, but is intended to somewhat brute force expose opportunities to make it clear where we should focus other efforts.

-Chandler


http://reviews.llvm.org/D20143





More information about the llvm-commits mailing list