[PATCH] D17864: [PGO] Promote indirect calls to conditional direct calls with value-profile

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 12:33:23 PST 2016


silvas added inline comments.

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1213
@@ +1212,3 @@
+    annotateValueSite(*M, *I, &(ValueDataArray.get()[NumPromoted]),
+                      NumVals - NumPromoted, TotalCount,
+                      IPVK_IndirectCallTarget, MaxNumPromotions);
----------------
xur wrote:
> silvas wrote:
> > If you had ValueDataArray in an ArrayRef (and annotateValueSite took an ArrayRef), then this would be `annotateValueSite(*M, *I, ValueDataArray.drop_front(NumPromoted, TotalCount, IPVK_IndirectCallTarget, MaxNumPromotions)` which would be a lot nicer.
> yes. this is cleaner. but this requires a annotateValueSite() change. I prefer to do this in a post-commit cleanup patch.
A pre-commit cleanup patch is also possible.


http://reviews.llvm.org/D17864





More information about the llvm-commits mailing list