Added a separate metadata to indicate when the loop has already been vectorized instead of setting width and count to 1.
Worked in collaboration with Aditya Kumar
Paths
| Differential D36220
[Loop Vectorize] Added a separate metadata ClosedPublic Authored by DIVYA on Aug 2 2017, 7:05 AM.
Details Summary Added a separate metadata to indicate when the loop has already been vectorized instead of setting width and count to 1. Worked in collaboration with Aditya Kumar
Diff Detail
Event TimelineComment Actions
What's the motivation?
Comment Actions LGTM
This revision is now accepted and ready to land.Aug 11 2017, 1:25 PM Closed by commit rL311281: [Loop Vectorize] Added a separate metadata (authored by hiraditya). · Explain WhyAug 20 2017, 3:34 AM This revision was automatically updated to reflect the committed changes. Comment Actions I have a question: Is there any reason not to mark the scalar loop and the vectorized version with the "llvm.loop.vectorize.width" and "llvm.loop.interleave.count" metadata reflecting the real outcome from the LV. Our out of tree compiler have later loop passes that could benefit from that information. I do not know if would be of any use for any of the in-tree targets or if it would hurt something. Comment Actions
I'm not clear on how a later pass might use that information in a robust way. Can you please elaborate?
Revision Contents
Diff 111874 llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/trunk/test/Transforms/LoopVectorize/X86/already-vectorized.ll
llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-loopid-dbg.ll
llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll
llvm/trunk/test/Transforms/LoopVectorize/duplicated-metadata.ll
llvm/trunk/test/Transforms/LoopVectorize/if-conversion-nest.ll
llvm/trunk/test/Transforms/LoopVectorize/multiple-strides-vectorization.ll
llvm/trunk/test/Transforms/LoopVectorize/vectorize-once.ll
|