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

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 11:33:01 PST 2016


danielcdh added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:216
 
+extern cl::opt<bool> EncodeDuplicationInDiscriminators;
+
----------------
hfinkel wrote:
> danielcdh wrote:
> > hfinkel wrote:
> > > Based on one of the other threads, I suppose we're going to add some command-line flag to enable/disable this? That being the case, we'll read this setting from some function attribute string instead of using  a cl::opt.
> > Yes, we will guard all the logic by check profile-debug flag once https://reviews.llvm.org/D25435 is submitted. I'm not sure whether it will be a function attribute string, or simply a flag passed down from frontend.
> > 
> > Meanwhile, I think it will be worth to have a flag to control whether we will encode duplication in discriminator so that we have a choice to fall back to the old discriminator assignment algorithm. We can remove the flag later if we find it useless.
> > Yes, we will guard all the logic by check profile-debug flag once https://reviews.llvm.org/D25435 is submitted. I'm not sure whether it will be a function attribute string, or simply a flag passed down from frontend.
> 
> I think it needs to be an attribute. Otherwise, it won't work correctly with LTO.
> 
I did not realize the LTO issue. But let's address that problem in https://reviews.llvm.org/D25435


https://reviews.llvm.org/D26420





More information about the llvm-commits mailing list