summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-03-11 18:57:48 +0000
committerVedant Kumar <vsk@apple.com>2016-03-11 18:57:48 +0000
commite5a9a275d36b20f68bc6e015f83914126004ccf8 (patch)
treea68dae62497e003ac713784ad7201e3009b62173 /llvm/lib/Transforms
parent6b074f5c9f873f1880fbbd00109253e530587073 (diff)
downloadbcm5719-llvm-e5a9a275d36b20f68bc6e015f83914126004ccf8.tar.gz
bcm5719-llvm-e5a9a275d36b20f68bc6e015f83914126004ccf8.zip
[PGO] Skip value profile instrumentation of inline asm
Value profile instrumentation treats inline asm calls like they are indirect calls. This causes problems when the 'Callee' is passed to a ptrtoint cast -- the verifier rightly claims that this is bogus and crashes opt. llvm-svn: 263278
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
index 4884a499019..787f098869f 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -334,7 +334,7 @@ struct PGOIndirectCallSiteVisitor
void visitCallInst(CallInst &I) {
CallSite CS(&I);
- if (CS.getCalledFunction() || !CS.getCalledValue())
+ if (CS.getCalledFunction() || !CS.getCalledValue() || I.isInlineAsm())
return;
IndirectCallInsts.push_back(&I);
}
OpenPOWER on IntegriCloud