[PATCH] D64744: #pragma clang loop predicate(enable|disable)

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 09:47:51 PDT 2019


Meinersbur added a comment.

[serious] Need to update docs.

I'd expect `predicate` to be an option of another transformation. For vectorization, by convention the #pragma name would be `vectorize_predicate` and the metadata `llvm.loop.vectorize.predicate`. As a standalone, it is not clear what it is supposed to do (docs missing) and I am against mixing similar semantics of options of different loop transformations.

I am currently trying to update the semantics of loop transformations such that a transformation order can be defined. An option without transformation it belongs to does not fit well into that. E.g. what happends with `llvm.loop.predicate` after unrolling/vectorization/distribution/interchange/unroll-and-jam/fusion?

Michael



================
Comment at: clang/lib/CodeGen/CGLoopInfo.cpp:426
+  MDNode *N = createPredicateMetadata(Attrs, LoopProperties, HasUserTransforms);
+  if(N)
+    LoopProperties.push_back(N);
----------------
[nit] run clang-format over your patch


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64744/new/

https://reviews.llvm.org/D64744





More information about the cfe-commits mailing list