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

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 09:58:47 PST 2016


davidxl added a comment.

Please also add test cases.


================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:347
@@ +346,3 @@
+
+  unsigned NumIndirectCallSites = 0;
+  for (auto &BB : F) {
----------------
To make sure that instrumentation and lowering assign the callsite index in the same way, some refactoring is needed -- defined a Icall visitor class that can be shared across.

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:351
@@ +350,3 @@
+      CallSite CS(&Inst);
+      if (!CS || CS.getCalledFunction()) continue;
+      Value *Callee = CS.getCalledValue();
----------------
Fix format.


http://reviews.llvm.org/D16016





More information about the llvm-commits mailing list