mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-08 15:24:21 +00:00
Fixed node deletion bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -112,11 +112,12 @@ void MSchedGraph::addNode(const MachineInstr *MI,
|
|||||||
void MSchedGraph::deleteNode(MSchedGraphNode *node) {
|
void MSchedGraph::deleteNode(MSchedGraphNode *node) {
|
||||||
|
|
||||||
//Delete the edge to this node from all predecessors
|
//Delete the edge to this node from all predecessors
|
||||||
for(MSchedGraphNode::pred_iterator P = node->pred_begin(), PE = node->pred_end();
|
while(node->pred_size() > 0) {
|
||||||
P != PE; ++P) {
|
//DEBUG(std::cerr << "Delete edge from: " << **P << " to " << *node << "\n");
|
||||||
(*P)->deleteSuccessor(node);
|
MSchedGraphNode *pred = *(node->pred_begin());
|
||||||
|
pred->deleteSuccessor(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remove this node from the graph
|
//Remove this node from the graph
|
||||||
GraphMap.erase(node->getInst());
|
GraphMap.erase(node->getInst());
|
||||||
|
|
||||||
|
@ -77,6 +77,8 @@ namespace llvm {
|
|||||||
Statistic<> MSLoops("modulosched-schedLoops", "Number of loops successfully modulo-scheduled");
|
Statistic<> MSLoops("modulosched-schedLoops", "Number of loops successfully modulo-scheduled");
|
||||||
Statistic<> IncreasedII("modulosched-increasedII", "Number of times we had to increase II");
|
Statistic<> IncreasedII("modulosched-increasedII", "Number of times we had to increase II");
|
||||||
Statistic<> SingleBBLoops("modulosched-singeBBLoops", "Number of single basic block loops");
|
Statistic<> SingleBBLoops("modulosched-singeBBLoops", "Number of single basic block loops");
|
||||||
|
Statistic<> NoSched("modulosched-noSched", "No schedule");
|
||||||
|
Statistic<> SameStage("modulosched-sameStage", "Max stage is 0");
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct DOTGraphTraits<MSchedGraph*> : public DefaultDOTGraphTraits {
|
struct DOTGraphTraits<MSchedGraph*> : public DefaultDOTGraphTraits {
|
||||||
@ -252,9 +254,13 @@ bool ModuloSchedulingPass::runOnFunction(Function &F) {
|
|||||||
++MSLoops;
|
++MSLoops;
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
if(!haveSched)
|
||||||
|
++NoSched;
|
||||||
|
else
|
||||||
|
++SameStage;
|
||||||
DEBUG(std::cerr << "Max stage is 0, so no change in loop or reached cap\n");
|
DEBUG(std::cerr << "Max stage is 0, so no change in loop or reached cap\n");
|
||||||
|
}
|
||||||
//Clear out our maps for the next basic block that is processed
|
//Clear out our maps for the next basic block that is processed
|
||||||
nodeToAttributesMap.clear();
|
nodeToAttributesMap.clear();
|
||||||
partialOrder.clear();
|
partialOrder.clear();
|
||||||
|
Reference in New Issue
Block a user