diff options
| author | Betul Buyukkurt <betulb@codeaurora.org> | 2016-04-04 18:56:36 +0000 |
|---|---|---|
| committer | Betul Buyukkurt <betulb@codeaurora.org> | 2016-04-04 18:56:36 +0000 |
| commit | 18131c4216960f1bf83c59a32ad7ba735a1b6d23 (patch) | |
| tree | 31cfaba084c9efc5c5eb55f49cdb74cbee87409b /llvm/test/Transforms | |
| parent | 870c34f0cfe0678dedcec33770fe4304b60c2e0c (diff) | |
| download | bcm5719-llvm-18131c4216960f1bf83c59a32ad7ba735a1b6d23.tar.gz bcm5719-llvm-18131c4216960f1bf83c59a32ad7ba735a1b6d23.zip | |
[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
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/PGOProfile/do-not-instrument.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/PGOProfile/do-not-instrument.ll b/llvm/test/Transforms/PGOProfile/do-not-instrument.ll index 98a3eec5d53..a42969ccc5b 100644 --- a/llvm/test/Transforms/PGOProfile/do-not-instrument.ll +++ b/llvm/test/Transforms/PGOProfile/do-not-instrument.ll @@ -14,4 +14,14 @@ entry: ret i32 0 } +define i32 @f2() { +entry: +; CHECK: call void @llvm.instrprof.increment +; CHECK-NOT: call void @llvm.instrprof.value.profile + call void (i32, ...) bitcast (void (...)* @foo to void (i32, ...)*)(i32 21) + ret i32 0 +} + +declare void @foo(...) #0 + attributes #0 = { nounwind } |

