[Mesa-dev] [PATCH] nv50/ir: remove DUMMY edge type

Karol Herbst kherbst at redhat.com
Mon Oct 14 21:10:10 UTC 2019


it was never used

Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp    | 3 ---
 src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp | 8 +-------
 src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h   | 1 -
 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp    | 2 --
 4 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
index 9f0e0733326..76fee8c791e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
@@ -536,9 +536,6 @@ Function::printCFGraph(const char *filePath)
          case Graph::Edge::BACK:
             fprintf(out, "\t%i -> %i;\n", idA, idB);
             break;
-         case Graph::Edge::DUMMY:
-            fprintf(out, "\t%i -> %i [style=dotted];\n", idA, idB);
-            break;
          default:
             assert(0);
             break;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
index b1076cf4129..e9a9981746a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
@@ -77,7 +77,6 @@ const char *Graph::Edge::typeStr() const
    case FORWARD: return "forward";
    case BACK:    return "back";
    case CROSS:   return "cross";
-   case DUMMY:   return "dummy";
    case UNKNOWN:
    default:
       return "unk";
@@ -184,7 +183,7 @@ Graph::Node::reachableBy(const Node *node, const Node *term) const
          continue;
 
       for (EdgeIterator ei = pos->outgoing(); !ei.end(); ei.next()) {
-         if (ei.getType() == Edge::BACK || ei.getType() == Edge::DUMMY)
+         if (ei.getType() == Edge::BACK)
             continue;
          if (ei.getNode()->visit(seq))
             stack.push(ei.getNode());
@@ -301,7 +300,6 @@ private:
             switch (ei.getType()) {
             case Graph::Edge::TREE:
             case Graph::Edge::FORWARD:
-            case Graph::Edge::DUMMY:
                if (++(ei.getNode()->tag) == ei.getNode()->incidentCountFwd())
                   bb.push(ei.getNode());
                break;
@@ -371,8 +369,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
 
    for (edge = curr->out; edge; edge = edge->next[0]) {
       node = edge->target;
-      if (edge->type == Edge::DUMMY)
-         continue;
 
       if (node->getSequence() == 0) {
          edge->type = Edge::TREE;
@@ -387,8 +383,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
 
    for (edge = curr->in; edge; edge = edge->next[1]) {
       node = edge->origin;
-      if (edge->type == Edge::DUMMY)
-         continue;
 
       if (node->getSequence() == 0) {
          edge->type = Edge::TREE;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
index 115f20e5e99..fc85e78a50c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
@@ -47,7 +47,6 @@ public:
          FORWARD,
          BACK,
          CROSS, // e.g. loop break
-         DUMMY
       };
 
       Edge(Node *dst, Node *src, Type kind);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index f25bce00884..6df2664da22 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -624,8 +624,6 @@ RegAlloc::BuildIntervalsPass::collectLiveValues(BasicBlock *bb)
       // trickery to save a loop of OR'ing liveSets
       // aliasing works fine with BitSet::setOr
       for (Graph::EdgeIterator ei = bb->cfg.outgoing(); !ei.end(); ei.next()) {
-         if (ei.getType() == Graph::Edge::DUMMY)
-            continue;
          if (bbA) {
             bb->liveSet.setOr(&bbA->liveSet, &bbB->liveSet);
             bbA = bb;
-- 
2.21.0



More information about the mesa-dev mailing list