Robert Lytton
2013-Aug-23 17:30 UTC
[LLVMdev] how do I disable vectorization passes for a target by default?
Hi I would like to disable vectorization on the XCore target by default. I assume I need to push_back -fno-vectorize in clang/lib/driver/Tools.cpp for Triple::xcore. Should I also disable the pass in llvm explicitly? I tried setting getNumberOfRegisters in XCoreTTI::TargetTransformInfo viz: unsigned getNumberOfRegisters(bool Vector) const { if (Vector) { return 0; } return 12; } But this made no difference (I need to double check). What is the correct way to disable vectorization passes? Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130823/9cfc5366/attachment.html>
Nadav Rotem
2013-Aug-23 18:00 UTC
[LLVMdev] how do I disable vectorization passes for a target by default?
Hi Robert, The best way is to push “-vectorize-loops=false”. You can look at PassManagerBuilder.cpp in LLVM to see the flag. You can also run "clang -###” to see which flags the compiler driver passes. Setting the register number will only influence the unroll-factor of the vectorized code. You would also want to vectorize the SLP-vectorizer in a similar way. Thanks, Nadav On Aug 23, 2013, at 10:30 AM, Robert Lytton <robert at xmos.com> wrote:> Hi > > I would like to disable vectorization on the XCore target by default. > > I assume I need to push_back -fno-vectorize in clang/lib/driver/Tools.cpp for Triple::xcore. > > Should I also disable the pass in llvm explicitly? > I tried setting getNumberOfRegisters in XCoreTTI::TargetTransformInfo viz: > > unsigned getNumberOfRegisters(bool Vector) const { > if (Vector) { > return 0; > } > return 12; > } > > But this made no difference (I need to double check). > > What is the correct way to disable vectorization passes? > > Robert > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130823/ff5e01cb/attachment.html>