projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5719062
)
[PM] Invalidate CallGraphAnalysis because it holds AssertingVH
author
Sean Silva
<chisophugis@gmail.com>
Mon, 8 Aug 2016 05:38:01 +0000
(
05:38
+0000)
committer
Sean Silva
<chisophugis@gmail.com>
Mon, 8 Aug 2016 05:38:01 +0000
(
05:38
+0000)
This is essentially PR28400. The fix here is similar to that implemented
in r274656.
llvm-svn: 277980
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index
a68e8d8
..
e4b86e9
100644
(file)
--- a/
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@
-1271,6
+1271,11
@@
ReversePostOrderFunctionAttrsPass::run(Module &M, AnalysisManager<Module> &AM) {
auto &CG = AM.getResult<CallGraphAnalysis>(M);
bool Changed = deduceFunctionAttributeInRPO(M, CG);
+
+ // CallGraphAnalysis holds AssertingVH and must be invalidated eagerly so
+ // that other passes don't delete stuff from under it.
+ AM.invalidate<CallGraphAnalysis>(M);
+
if (!Changed)
return PreservedAnalyses::all();
PreservedAnalyses PA;