[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 15:14:11 PST 2017


hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.

I apologize for my delay in getting back to this. Thanks for updating this with a more-flexible encoding scheme. It looks like in the future, should we desire, we can extend the number of fields (and/or their size). This LGTM. We can fixup replacing/supplementing the cl::opt with a function attribute in follow-up.



================
Comment at: include/llvm/IR/DebugInfoMetadata.h:1274
+  ///
+  /// Base discriminator: assigned before any optimization to identify IRs
+  ///                     that is defined by the same source line, but
----------------
We should say that, for example, the AddDiscriminators pass will do this.


================
Comment at: lib/Transforms/Utils/AddDiscriminators.cpp:100
 
+cl::opt<bool> EncodeDuplicationInDiscriminators(
+    "encode-duplication-in-discriminators", cl::init(false),
----------------
I'm assuming that this is for testing, correct? We'll need to add a function attribute to really control this.


https://reviews.llvm.org/D26420





More information about the llvm-commits mailing list