summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-12 18:29:36 +0000
committerChris Lattner <sabre@nondot.org>2006-07-12 18:29:36 +0000
commit5de3b8b26264ccd11a4141d41061ea2040fa69ca (patch)
treebb3db50f3bd6e2fb0d8cd818fffbf08cd75950e3 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp
parentc7012cc9e92071b268e8557e3a886dd26135a5d3 (diff)
downloadbcm5719-llvm-5de3b8b26264ccd11a4141d41061ea2040fa69ca.tar.gz
bcm5719-llvm-5de3b8b26264ccd11a4141d41061ea2040fa69ca.zip
Change the callgraph representation to store the callsite along with the
target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll llvm-svn: 29120
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index 5b3c953bcdf..4765b096b38 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -263,7 +263,7 @@ void GlobalsModRef::AnalyzeSCC(std::vector<CallGraphNode *> &SCC) {
for (unsigned i = 0, e = SCC.size(); i != e && !CallsExternal; ++i)
for (CallGraphNode::iterator CI = SCC[i]->begin(), E = SCC[i]->end();
CI != E; ++CI)
- if (Function *Callee = (*CI)->getFunction()) {
+ if (Function *Callee = CI->second->getFunction()) {
if (FunctionRecord *CalleeFR = getFunctionInfo(Callee)) {
// Propagate function effect up.
FunctionEffect |= CalleeFR->FunctionEffect;
OpenPOWER on IntegriCloud