mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
don't generate temporary scalarmaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20749 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -127,27 +127,15 @@ bool Steens::runOnModule(Module &M) {
|
|||||||
// Loop over the rest of the module, merging graphs for non-external functions
|
// Loop over the rest of the module, merging graphs for non-external functions
|
||||||
// into this graph.
|
// into this graph.
|
||||||
//
|
//
|
||||||
unsigned Count = 0;
|
|
||||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||||
if (!I->isExternal()) {
|
if (!I->isExternal()) {
|
||||||
DSGraph::ScalarMapTy ValMap(GlobalECs);
|
DSGraph::NodeMapTy NodeMap;
|
||||||
{ // Scope to free NodeMap memory ASAP
|
ResultGraph->cloneInto(LDS.getDSGraph(*I), ResultGraph->getScalarMap(),
|
||||||
DSGraph::NodeMapTy NodeMap;
|
RetValMap, NodeMap, 0);
|
||||||
const DSGraph &FDSG = LDS.getDSGraph(*I);
|
|
||||||
ResultGraph->cloneInto(FDSG, ValMap, RetValMap, NodeMap, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Incorporate the inlined Function's ScalarMap into the global
|
|
||||||
// ScalarMap...
|
|
||||||
DSGraph::ScalarMapTy &GVM = ResultGraph->getScalarMap();
|
|
||||||
for (DSGraph::ScalarMapTy::iterator I = ValMap.begin(),
|
|
||||||
E = ValMap.end(); I != E; ++I)
|
|
||||||
GVM[I->first].mergeWith(I->second);
|
|
||||||
|
|
||||||
if ((++Count & 1) == 0) // Prune nodes out every other time...
|
|
||||||
ResultGraph->removeTriviallyDeadNodes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResultGraph->removeTriviallyDeadNodes();
|
||||||
|
|
||||||
// FIXME: Must recalculate and use the Incomplete markers!!
|
// FIXME: Must recalculate and use the Incomplete markers!!
|
||||||
|
|
||||||
// Now that we have all of the graphs inlined, we can go about eliminating
|
// Now that we have all of the graphs inlined, we can go about eliminating
|
||||||
|
Reference in New Issue
Block a user