Change CallGraphNode to maintain it's Function as an AssertingVH
for sanity. This didn't turn up any bugs. Change CallGraphNode to maintain its "callsite" information in the call edges list as a WeakVH instead of as an instruction*. This fixes a broad class of dangling pointer bugs, and makes CallGraph have a number of useful invariants again. This fixes the class of problem indicated by PR4029 and PR3601. llvm-svn: 80663
Showing
- llvm/include/llvm/Analysis/CallGraph.h 18 additions, 9 deletionsllvm/include/llvm/Analysis/CallGraph.h
- llvm/lib/Analysis/IPA/CallGraph.cpp 4 additions, 19 deletionsllvm/lib/Analysis/IPA/CallGraph.cpp
- llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp 30 additions, 18 deletionsllvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
- llvm/lib/Transforms/IPO/PruneEH.cpp 3 additions, 7 deletionsllvm/lib/Transforms/IPO/PruneEH.cpp
- llvm/lib/Transforms/Utils/InlineFunction.cpp 1 addition, 1 deletionllvm/lib/Transforms/Utils/InlineFunction.cpp
- llvm/test/Transforms/ArgumentPromotion/callgraph-update.ll 23 additions, 0 deletionsllvm/test/Transforms/ArgumentPromotion/callgraph-update.ll
Loading
Please register or sign in to comment