mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Fix logical error in TD pass: we should clear Mod/Ref bits of each caller
before inlining their graphs into a function. To support this, added flags to CloneFlags to strip/keep Mod/Ref bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -344,8 +344,9 @@ DSGraph &BUDataStructures::calculateGraph(Function &F) {
|
||||
#endif
|
||||
|
||||
// Handle self recursion by resolving the arguments and return value
|
||||
Graph.mergeInGraph(CS, GI, DSGraph::StripAllocaBit |
|
||||
DSGraph::DontCloneCallNodes);
|
||||
Graph.mergeInGraph(CS, GI,
|
||||
DSGraph::KeepModRefBits |
|
||||
DSGraph::StripAllocaBit | DSGraph::DontCloneCallNodes);
|
||||
|
||||
#if 0
|
||||
Graph.writeGraphToFile(std::cerr, "bu_" + F.getName() + "_after_" +
|
||||
@@ -424,7 +425,8 @@ DSGraph &BUDataStructures::inlineNonSCCGraphs(Function &F,
|
||||
<< GI.getAuxFunctionCalls().size() << "]\n");
|
||||
|
||||
// Handle self recursion by resolving the arguments and return value
|
||||
Graph.mergeInGraph(CS, GI, DSGraph::StripAllocaBit |
|
||||
Graph.mergeInGraph(CS, GI,
|
||||
DSGraph::KeepModRefBits | DSGraph::StripAllocaBit |
|
||||
DSGraph::DontCloneCallNodes);
|
||||
}
|
||||
}
|
||||
@@ -508,7 +510,8 @@ DSGraph &BUDataStructures::calculateSCCGraph(Function &F,
|
||||
<< GI.getAuxFunctionCalls().size() << "]\n");
|
||||
|
||||
// Handle self recursion by resolving the arguments and return value
|
||||
Graph.mergeInGraph(CS, GI, DSGraph::StripAllocaBit |
|
||||
Graph.mergeInGraph(CS, GI,
|
||||
DSGraph::KeepModRefBits | DSGraph::StripAllocaBit |
|
||||
DSGraph::DontCloneCallNodes);
|
||||
|
||||
if (SCCFunctions.count(Callee))
|
||||
|
||||
Reference in New Issue
Block a user