[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
Tue Jan 24 17:37:26 PST 2017


danielcdh added inline comments.


================
Comment at: lib/Transforms/Utils/AddDiscriminators.cpp:100
 
+cl::opt<bool> EncodeDuplicationInDiscriminators(
+    "encode-duplication-in-discriminators", cl::init(false),
----------------
hfinkel wrote:
> 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.
How about using TargetOption.DebugInfoForProfiling to decide, as we check it in lib/CodeGen/AsmPrinter/DwarfDebug.cpp?


https://reviews.llvm.org/D26420





More information about the llvm-commits mailing list