[PATCH] D64744: Loop #pragma tail_predicate

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 11:33:38 PDT 2019

Meinersbur added a comment.

IMHO, this loops like an option of a particular transformation, not an independent pragma. E.g.

  #pragma clang loop vectorize(enable) vectorize_remainder(predicated)

There could be multiple choices for how to execute remainder iterations, e.g. instead of an epilogue, the first iterations could be executed in an prologue. Or an option where the compiler may assume that the iteration-count is always a multiple of the vector width, etc.

Also consider interactions with other transformations: What would happen with the `llvm.loop.tailpredicate` metadata after, e.g. loop fusion/distribution? How does the user know whether the pragma had an effect?



More information about the cfe-commits mailing list