[PATCH] D40230: Add -mprefer-vector-width driver option and attribute during CodeGen.
Sanjay Patel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 20 06:17:35 PST 2017
spatel added a reviewer: hfinkel.
spatel added inline comments.
================
Comment at: include/clang/Frontend/CodeGenOptions.h:254
+ /// The prefered vector width.
+ std::string PreferVectorWidth;
----------------
typo - 'preferred'. Should add a bit more to the explanation. "The preferred width for auto-vectorization transforms. This is intended to override default transforms based on the width of the architected vector registers." ?
================
Comment at: lib/Driver/ToolChains/Clang.cpp:277
+/// The -mpreferred
+static void ParseMPreferVectorWidth(const Driver &D, const ArgList &Args,
----------------
Comment got chopped off? Should we also include an explanation in the clang manual?
================
Comment at: lib/Driver/ToolChains/Clang.cpp:285-286
+ StringRef Value = A->getValue();
+ if (Value == "none") {
+ CmdArgs.push_back("-mprefer-vector-width=none");
+ } else {
----------------
What is the intended functionality when specifying 'none'? If it's equivalent to passing "-vectorize-slp" + "-vectorize-loops", can we use the existing flags?
https://reviews.llvm.org/D40230
More information about the cfe-commits
mailing list