[PATCH] D16016: [PGO] IR level instrumentation of indirect call value profiling

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 17:54:15 PST 2016


vsk added a subscriber: vsk.
vsk added a comment.

Thanks xur, sorry for jumping on this late. Two nits --


================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:326
@@ +325,3 @@
+    CallSite CS(&I);
+    if (!CS || CS.getCalledFunction())
+      return;
----------------
Is the `!CS` needed? If it doesn't feel too cramped, maybe the conditional could be `CS.getCalledFunction() || !CS.getCalledValue()`.

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:406
@@ -354,3 +405,3 @@
       return PGOEdge::infoString();
-    return (Twine(PGOEdge::infoString()) + "  Count=" + Twine(CountValue)).str();
+    return (Twine(PGOEdge::infoString()) + " Count=" + Twine(CountValue)).str();
   }
----------------
I don't think you need this for your test. Please use a separate commit for this.


http://reviews.llvm.org/D16016





More information about the llvm-commits mailing list