[polly] [Polly] Add vectorize metadata to loops identified as vectorizable by polly (PR #113994)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 05:33:56 PDT 2024
https://github.com/Meinersbur commented:
> This patch adds the metadata, setting it to true for loops created by Polly.
"llvm.loop.vectorize.enable" set to true will just ignore loop-vectorizer's cost heursitic, and vectorize any loop that is semantically legal to do. Being processed by Polly doesn't mean it becomes automatically profitable to vectorizer, and LoopVectorize would still vectorize it if it thinks it is beneficial without the metadata, which currently also only applies to innermost loops.
Also consider that Clang emits a warning when LoopVectorizer does not apply on a loop with "llvm.loop.vectorize.enable" set to true. Users using Polly would get a lot such warnings.
What are the long-term plans? Atm it is only okay-ish because this behaviour is disabled by a flag.
https://github.com/llvm/llvm-project/pull/113994
More information about the llvm-commits
mailing list