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 110812 lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/X86/already-vectorized.ll
test/Transforms/LoopVectorize/X86/vectorization-remarks-loopid-dbg.ll
test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
test/Transforms/LoopVectorize/X86/vectorization-remarks.ll
test/Transforms/LoopVectorize/duplicated-metadata.ll
test/Transforms/LoopVectorize/multiple-strides-vectorization.ll
test/Transforms/LoopVectorize/vectorize-once.ll
|
space after if.