Fix a crash in the assumption cache when inlining indirect function calls
authorBjorn Steinbrink <bsteinbr@gmail.com>
Thu, 12 Feb 2015 21:04:22 +0000 (21:04 +0000)
committerBjorn Steinbrink <bsteinbr@gmail.com>
Thu, 12 Feb 2015 21:04:22 +0000 (21:04 +0000)
commit6f972a13f6e55668f811e71690ad33f728caf61e
tree2851859da366d7645fa4c29cb131a27ed6a5a84e
parente8cb17f2824537e30bc536ba354f16d622d6e60b
Fix a crash in the assumption cache when inlining indirect function calls

Summary:
Instances of the AssumptionCache are per function, so we can't re-use
the same AssumptionCache instance when recursing in the CallAnalyzer to
analyze a different function. Instead we have to pass the
AssumptionCacheTracker to the CallAnalyzer so it can get the right
AssumptionCache on demand.

Reviewers: hfinkel

Subscribers: llvm-commits, hans

Differential Revision: http://reviews.llvm.org/D7533

llvm-svn: 228957
llvm/lib/Analysis/IPA/InlineCost.cpp
llvm/test/Transforms/Inline/inline-indirect.ll [new file with mode: 0644]