[PATCH] D57566: Refactor setAlreadyUnrolled() and setAlreadyVectorized().

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 9 13:43:19 PST 2019


etherzhhb accepted this revision.
etherzhhb added a comment.
This revision is now accepted and ready to land.

LGTM with a suggestion



================
Comment at: lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:111-113
+      MDNode::get(Context, {MDString::get(Context, "llvm.loop.isvectorized"),
+                            ConstantAsMetadata::get(ConstantInt::get(
+                                Type::getInt32Ty(Context), 1))});
----------------
maybe you could use "static ConstantInt *get(LLVMContext &Context, const APInt &V);" in this case you do not need to construct the i32 type explicitly


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57566





More information about the llvm-commits mailing list