Improve RefreshCallGraph to remove invalid call graph edge.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 14 Apr 2015 15:52:57 +0000 (15:52 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 14 Apr 2015 15:52:57 +0000 (15:52 +0000)
commit2fbccf6972c1468e3d252d2d3125403c4065ffff
tree5619a8abe3382a6883f3d76534fccd780ca0c36c
parent6f422b364dd7e249c3b02b214998483d569339b0
Improve RefreshCallGraph to remove invalid call graph edge.

With commit r219944, InstCombine can now turn a sqrtl into a llvm.fabs.f64.
The call graph edge originally representing the call to sqrtl becomes invalid.
This patch modifies CGPassManager::RefreshCallGraph() to remove the invalid
call graph edge, which can triggers an assert in
CallGraphNode::addCalledFunction().

Phabricator Review: http://reviews.llvm.org/D7705
Patch by Lawrence Hu <lawrence@codeaurora.org>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234902 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/CallGraphSCCPass.cpp