[llvm-dev] KNL Vectorization with larger vector width

hameeza ahmed via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 23 10:49:59 PDT 2018


Thank You.

But I cannot find your mentioned function
LoopVectorizationCostModel::computeFeasibleMaxVF(bool
OptForSize, unsigned ConstTripCount). I am using LLVM 4. I have been trying
to get the required code portion in LoopVectorize.cpp file. But I am unable
to debug this. each time i debug it, it returns me vectorized IR in gdb.

My goal is simple when i mention my target name in opt it should vectorize
by keeping the vector width= highest supported by my target which is 2048.
So $ opt -O3 -mytarget 1.ll -o 1_opt.ll

1_opt.ll should emit <2048xi32>,
<1024xi32>.........................<32xi32> etc.

How to achieve this? Please help.

Thank You
Regards

On Fri, Jul 13, 2018 at 12:40 AM, Hal Finkel <hfinkel at anl.gov> wrote:

>
> On 07/12/2018 02:32 PM, hameeza ahmed via llvm-dev wrote:
>
> Hello,
>
> If we pass march=knl, the llvm vectorizer (O3) generates max 16xi32 vector
> width instruction and 8xi32 or 4xi32 in recursive manner.
>
> I am working on a target with larger vector widths like 32,64...
> Now how to enable the vectorizer (O3) to automatically generate larger
> vector size instructions recursively by specifying the new target. Which
> files have the code for this?
>
>
> I believe that the thing that you're trying to affect is this:
>
> LoopVectorizationCostModel::computeFeasibleMaxVF(bool OptForSize,
>                                                  unsigned ConstTripCount)
> {
> ...
>   unsigned WidestRegister = TTI.getRegisterBitWidth(true);
>
>
> and so your target's TargetTransformInfo class should return an
> appropriate value from getRegisterBitWidth.
>
>  -Hal
>
>
>
> Please help
>
> Thank You
> Regards
>
>
>
>
> _______________________________________________
> LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
> --
> Hal Finkel
> Lead, Compiler Technology and Programming Languages
> Leadership Computing Facility
> Argonne National Laboratory
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180723/f551a72e/attachment.html>


More information about the llvm-dev mailing list