[PGO] Avoid instrumenting direct callee's at value sites.
authorBetul Buyukkurt <betulb@codeaurora.org>
Mon, 4 Apr 2016 18:56:36 +0000 (18:56 +0000)
committerBetul Buyukkurt <betulb@codeaurora.org>
Mon, 4 Apr 2016 18:56:36 +0000 (18:56 +0000)
commit18131c4216960f1bf83c59a32ad7ba735a1b6d23
tree31cfaba084c9efc5c5eb55f49cdb74cbee87409b
parent870c34f0cfe0678dedcec33770fe4304b60c2e0c
[PGO] Avoid instrumenting direct callee's at value sites.

Direct callees' that are cast to other function prototypes,
show up in the Call/Invoke instructions as ConstantExpr's.
Currently llvm::CallSite's getCalledFunction() fails
to return the callees in such expressions as direct calls.
Value profiling should avoid instrumenting such cases. Mostly NFC.

llvm-svn: 265330
llvm/lib/Transforms/Instrumentation/IndirectCallSiteVisitor.h
llvm/test/Transforms/PGOProfile/do-not-instrument.ll