[PATCH] D26420: Encode duplication factor from loop vectorization and loop unrolling to discriminator.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 17:22:27 PST 2017


hfinkel added inline comments.


================
Comment at: lib/Transforms/Utils/AddDiscriminators.cpp:100
 
+cl::opt<bool> EncodeDuplicationInDiscriminators(
+    "encode-duplication-in-discriminators", cl::init(false),
----------------
danielcdh wrote:
> hfinkel wrote:
> > I'm assuming that this is for testing, correct? We'll need to add a function attribute to really control this.
> This is for testing purpose, and will be "true" by default when -fdebug-info-profiling is set.
> 
> I'm not sure why would we need this as a function attribute. I would suppose all binaries built with this on or off. Or am I missing something?
Because we shouldn't use command-line options to communicate between the frontend and the backend. Some legacy aside, this is the strongly-preferred mechanism. It is also necessary for this to work correctly with LTO.


https://reviews.llvm.org/D26420





More information about the llvm-commits mailing list