[PATCH] D16016: [PGO] IR level instrumentation of indirect call value profiling
Rong Xu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 11:47:57 PST 2016
xur marked 2 inline comments as done.
================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:326
@@ +325,3 @@
+ CallSite CS(&I);
+ if (!CS || CS.getCalledFunction())
+ return;
----------------
vsk wrote:
> Is the `!CS` needed? If it doesn't feel too cramped, maybe the conditional could be `CS.getCalledFunction() || !CS.getCalledValue()`.
You are very right. !CS is not need as this is a call instruction. The condition should have simplified to your version too.
================
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();
}
----------------
vsk wrote:
> I don't think you need this for your test. Please use a separate commit for this.
will do.
http://reviews.llvm.org/D16016
More information about the llvm-commits
mailing list