[PATCH] D53895: [LoopUnroll] add parsing for unroll parameters in -passes pipeline

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 10:04:49 PDT 2018


chandlerc added a comment.

In https://reviews.llvm.org/D53895#1285582, @philip.pfaffe wrote:

> What is the advantage of this over using command line args?
>
> Obviously you can do per-pass-instance configuration, but is that ever necessary in parsed pipelines?


I think there are a few passes where we routinely have different variations at different stages of the pipeline in common pipelines people are building / experimenting with.

I certainly hope we won't need this level of flexibility often or it will need a somewhat different engineering approach, but as long as it is fairly limited to <10 or small 10s of passes, I can understand the desire.

In https://reviews.llvm.org/D53895#1281939, @fedor.sergeev wrote:

> Sure thing I can keep the implementation of parser local to pass builder.
>  It needs to have a mapping for unroll parameter names, which does not really belong to pass builder,
>  but then it is a rather simple logic so there should not be any real harm...


FWIW, I really would have the whole parse thing to build the LoopUnrollOptions from a string to live exclusively inside the PassBuilder implementation.

The reason is that I'd rather not widely advertise a string-parsing API for building this. I really want to keep code-based users *not* parsing strings. ;]


Repository:
  rL LLVM

https://reviews.llvm.org/D53895





More information about the llvm-commits mailing list