[llvm-dev] [RFC] Vector Predication
Luke Kenneth Casson Leighton via llvm-dev
llvm-dev at lists.llvm.org
Tue Feb 5 05:14:29 PST 2019
On Tue, Feb 5, 2019 at 1:01 PM Bruce Hoult <brucehoult at sifive.com> wrote:
> Robin also said then:
> For scenarios like two entirely separate vectorized loops within one
> function, it might be useful to drastically change the vector unit
> configuration in the middle of a function.
a workable solution that keeps the simplicity of the proposed
contract yet also provides flexibility that would otherwise result in
missed optimisation opportunities is to treat the vectorised loops
(plural), particularly if they are inner loops within outer loops, as
by splitting out the (two or more) separate loops into "functions
without names even though the programmer didn't actually *make* them
as functions", the infrastructure associated *with* functions may push
the required context (such as the current VL) onto the stack, and
restore it on exit from the [nameless] function.
kinda like the opposite of inlining. outlining? :)
i do not have enough compiler experience to say if the overhead of
the associated push/pop of a function call is worthwhile or not.
More information about the llvm-dev