[llvm] r348944 - [Unroll/UnrollAndJam/Vectorizer/Distribute] Add followup loop attributes.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 14 13:35:47 PST 2018


Am Do., 13. Dez. 2018 um 18:27 Uhr schrieb Finkel, Hal J. <hfinkel at anl.gov>:
>
> On 12/13/18 5:34 PM, Michael Kruse via llvm-commits wrote:
> > A)
> > I just discovered that some code in the clang frontend disables
> > unrolling in -O1:
> >
> > Opts.UnrollLoops =
> >       Args.hasFlag(OPT_funroll_loops, OPT_fno_unroll_loops,
> >                    (Opts.OptimizationLevel > 1));
>
> Michael and I chatted offline. It seems that we need to do two things:
>
>  1. We need to change the unrolling pass to explicitly take the
> unrolling-disabled Boolean (as opposed to using the Boolean directly
> when populating the pass manager). Like with vectorization, the pragma
> should override general defaults from command-line options and we should
> unroll the loop in this case (even at -O1).

https://reviews.llvm.org/D55716

>  2. We also need to disable the warnings for optnone functions (a
> situation that can arise during LTO).

https://reviews.llvm.org/D55690


Michael


More information about the llvm-commits mailing list