mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Implement optimization for direct function call case. This dramatically
reduces the number of function nodes created and speeds up analysis by about 10% overall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5495 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -184,7 +184,7 @@ public:
|
||||
void mergeInGraph(DSCallSite &CS, const DSGraph &Graph, unsigned CloneFlags);
|
||||
|
||||
// Methods for checking to make sure graphs are well formed...
|
||||
void AssertNodeInGraph(DSNode *N) const {
|
||||
void AssertNodeInGraph(const DSNode *N) const {
|
||||
assert((!N || find(Nodes.begin(), Nodes.end(), N) != Nodes.end()) &&
|
||||
"AssertNodeInGraph: Node is not in graph!");
|
||||
}
|
||||
@@ -194,7 +194,8 @@ public:
|
||||
}
|
||||
|
||||
void AssertCallSiteInGraph(const DSCallSite &CS) const {
|
||||
AssertNodeInGraph(CS.getCallee().getNode());
|
||||
if (CS.isIndirectCall())
|
||||
AssertNodeInGraph(CS.getCalleeNode());
|
||||
AssertNodeInGraph(CS.getRetVal().getNode());
|
||||
for (unsigned j = 0, e = CS.getNumPtrArgs(); j != e; ++j)
|
||||
AssertNodeInGraph(CS.getPtrArg(j).getNode());
|
||||
|
Reference in New Issue
Block a user