[PATCH] D14003: Express and handle specific info about the processing of invariant intrinsics

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 22:04:21 PDT 2015


lvoufo added inline comments.

================
Comment at: include/llvm/IR/InvariantInfo.h:27
@@ +26,3 @@
+/// intrinsic calls.
+class InvariantInfo {
+  DenseMap<Value *, IntrinsicInst *> InvariantMarkers;
----------------
sanjoy wrote:
> Please add some high level comments describing how this is supposed to be used.
Ok. 

================
Comment at: include/llvm/IR/InvariantInfo.h:28
@@ +27,3 @@
+class InvariantInfo {
+  DenseMap<Value *, IntrinsicInst *> InvariantMarkers;
+public:
----------------
sanjoy wrote:
> Please add some comments on how you deal with passes RAUW'ing or erasing values.
Ok. 

================
Comment at: include/llvm/IR/InvariantInfo.h:55
@@ +54,3 @@
+
+bool processInvariantIntrinsic(IntrinsicInst *II, InvariantInfo &InvInfo);
+bool BackwardScanInvariantIntrinsic(const IntrinsicInst *II,
----------------
sanjoy wrote:
> lvoufo wrote:
> > sanjoy wrote:
> > > Please document these functions.
> > Do you mean in addition to the documentation of its implementation in lib/IR/InvariantInfo.cpp ?
> Never mind, I just saw the docs in the implementation file.  :)
> 
> The doxygen comments are typically put in the header.
No problem. I just figured it would be more legible to have the detailed documentation right next to the implementation. I can add some high-level comments on the prototypes too if it help.


http://reviews.llvm.org/D14003





More information about the llvm-commits mailing list