summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-02-20 23:00:15 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-02-20 23:00:15 +0000
commit75080ff25dedcd76bee1e08ef5d79609b35db5b1 (patch)
tree5428574f7fef314dd0acd4ba730108702070370d /llvm/lib/Transforms
parent0e73ec45502af2d7cf4cd459cf3cc70a8509faf3 (diff)
downloadbcm5719-llvm-75080ff25dedcd76bee1e08ef5d79609b35db5b1.tar.gz
bcm5719-llvm-75080ff25dedcd76bee1e08ef5d79609b35db5b1.zip
Make sure that value handle users see the transformation of an indirect call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink!
llvm-svn: 201822
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 9e8d1bc3bd6..fe8c1b0baf6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1212,6 +1212,8 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
if (!Caller->use_empty())
ReplaceInstUsesWith(*Caller, NV);
+ else if (Caller->hasValueHandle())
+ ValueHandleBase::ValueIsRAUWd(Caller, NV);
EraseInstFromFunction(*Caller);
return true;
OpenPOWER on IntegriCloud