hameeza ahmed via llvm-dev
2018-Jul-23 17:49 UTC
[llvm-dev] KNL Vectorization with larger vector width
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>
Friedman, Eli via llvm-dev
2018-Jul-23 18:33 UTC
[llvm-dev] KNL Vectorization with larger vector width
On 7/23/2018 10:49 AM, hameeza ahmed via llvm-dev wrote:> Thank You. > > But I cannot find your mentioned function > LoopVectorizationCostModel::computeFeasibleMaxVF(bool OptForSize, > unsigned ConstTripCount). I am using LLVM 4."git log -ScomputeFeasibleMaxVF" says this was refactored in https://reviews.llvm.org/rL297737 . -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180723/1594a9e9/attachment.html>
hameeza ahmed via llvm-dev
2018-Jul-23 19:40 UTC
[llvm-dev] KNL Vectorization with larger vector width
Thank You. I got it. Version issue. TTI.getRegisterBitWidth(true) How to put my target machine info in TTI? Please help. On Mon, Jul 23, 2018 at 11:33 PM, Friedman, Eli <efriedma at codeaurora.org> wrote:> On 7/23/2018 10:49 AM, hameeza ahmed via llvm-dev wrote: > > Thank You. > > But I cannot find your mentioned function LoopVectorizationCostModel::computeFeasibleMaxVF(bool > OptForSize, unsigned ConstTripCount). I am using LLVM 4. > > > "git log -ScomputeFeasibleMaxVF" says this was refactored in > https://reviews.llvm.org/rL297737 . > > -Eli > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180724/6876afbb/attachment.html>