[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width
Matt Morehouse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 9 13:04:48 PDT 2018
morehouse added inline comments.
================
Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:141
+ << "!1 = !{!\"llvm.loop.vectorize.enable\", i1 true}\n"
+ << "!2 = !{!\"llvm.loop.vectorize.width\", i32 " << kArraySize
+ << "}\n";
----------------
I'm not sure `kArraySize` is what you want here. Does "width" refer to array size or the SIMD width?
Any problem with letting the vectorizer determine this automatically?
================
Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:142
+ << "!2 = !{!\"llvm.loop.vectorize.width\", i32 " << kArraySize
+ << "}\n";
}
----------------
Does this metadata change coverage in the vectorizer?
================
Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.h:18
+#include "../handle-llvm/input_arrays.h"
+
----------------
This include should be in the cpp file.
Repository:
rC Clang
https://reviews.llvm.org/D50530
More information about the cfe-commits
mailing list