What's remaining open problem in polly?

41 views
Skip to first unread message

李拯先

unread,
Oct 17, 2021, 7:26:52 AM10/17/21
to Polly Development
Hello everyone:
  I have little compiler development experimence and now learned some loop optimization, I'm interested in developping more improvement for polly. And I saw some open projects in polly.
  I'm interested in BLAS and Integrate Polly with the LLVM vectorizers.
  Where should i start from?
Yours,lzx

Michael Kruse

unread,
Oct 20, 2021, 6:01:15 PM10/20/21
to Polly Development
Better integration of Polly with LLVM's LoopVectorize pass sounds like a good idea. At moment, Polly has two vectorization "modes". With --polly-vectorizer=polly, Polly emits vector instructions itself. With -polly-vectorizer=stripmine, it only splits loops into vector-sized chunks.

What you could do:
1. Emit Loop metadata ('"llvm.loop.vectorize.enable") to the innermost loops generated by -polly-vectorizer=stripmine. [1] and [2,3]
2. Emit that loop metadata even if not stripmining for loops that might be vectorizable.
3. Polly's vectorization heuristic is kind of dumb, it always assumes a vector width of 4 by default. An improvement would be to ask the backend for the native vector width(s). Furthermore, it could use LoopVectorizer's heuristic as well to determine whether vectorization is profitable at all.

Michael

[1] https://github.com/llvm/llvm-project/blob/3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8/polly/lib/CodeGen/IslNodeBuilder.cpp#L425
Reply all
Reply to author
Forward
0 new messages