mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Delete the removeCallEdgeTo callgraph method,
because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -282,16 +282,6 @@ void CallGraphNode::print(std::ostream &OS) const {
|
||||
|
||||
void CallGraphNode::dump() const { print(cerr); }
|
||||
|
||||
void CallGraphNode::removeCallEdgeTo(CallGraphNode *Callee) {
|
||||
for (unsigned i = CalledFunctions.size(); ; --i) {
|
||||
assert(i && "Cannot find callee to remove!");
|
||||
if (CalledFunctions[i-1].second == Callee) {
|
||||
CalledFunctions.erase(CalledFunctions.begin()+i-1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// removeCallEdgeFor - This method removes the edge in the node for the
|
||||
/// specified call site. Note that this method takes linear time, so it
|
||||
/// should be used sparingly.
|
||||
|
Reference in New Issue
Block a user