__ses_layout_path2()
authoryu.dongliang <18588496441@163.com>
Wed, 8 Nov 2023 06:29:33 +0000 (14:29 +0800)
committeryu.dongliang <18588496441@163.com>
Wed, 8 Nov 2023 06:29:33 +0000 (14:29 +0800)
ses_layout.c

index 10907bbefefbf8436f309398a16b505c20d5ba40..708ba980d05410609d3ceafa679490d73d61c14c 100644 (file)
@@ -432,98 +432,6 @@ int ses_lines_diff_components(ScfEfunction* f, ses_graph_t* graph)
        return 0;
 }
 
-static int __ses_layout_lines3(ScfEfunction* f)
-{
-       ScfEline*      el;
-       ses_vertex_t*  v;
-
-       scf_vector_t*  graph  = scf_vector_alloc();
-       scf_vector_t*  colors = scf_vector_alloc();
-
-       intptr_t N = 2;
-       intptr_t i;
-       intptr_t j;
-       intptr_t k;
-
-       ses_lines_diff_components(f, graph);
-
-       if (0  < graph->size) {
-               v  = graph->data[0];
-
-               N  = v->edges->size;
-       }
-
-       for (j = N; j >= 1; j--) {
-
-               for (i = 1; i <= j; i++)
-                       scf_vector_add(colors, (void*)i);
-
-               int ret = ses_graph_kcolor(graph, j, colors);
-               if (ret < 0) {
-                       scf_loge("**********\n");
-               }
-
-               for (i = 0; i < graph->size; i++) {
-                       v         = graph->data[i];
-
-                       if (v->color < 0) {
-                               el = v->data;
-                               scf_loge("j: %ld, i: %ld, l%ld->color: %ld\n", j, i, el->id, v->color);
-                               break;
-                       }
-               }
-
-               if (i < graph->size)
-                       break;
-
-               for (i = 0; i < graph->size; i++) {
-                       v         = graph->data[i];
-
-                       el        = v->data;
-                       el->color = v->color;
-                       v->color  = 0;
-               }
-
-               scf_vector_clear(colors, NULL);
-               printf("\n");
-       }
-
-       k = 0;
-       for (++j; j >= 1; j--) {
-
-               for (i = 0; i < graph->size; i++) {
-                       v         = graph->data[i];
-
-                       el = v->data;
-
-                       if (j == el->color) {
-                               scf_logi("j: %ld, l%ld->color: %ld\n", j, el->id, el->color);
-
-                               if (el == f->elines[k]) {
-                                       k++;
-                                       continue;
-                               }
-
-                               N = __ses_find_eline_index(f, el->id);
-
-                               SCF_XCHG(f->elines[k], f->elines[N]);
-                               k++;
-                       }
-               }
-               printf("\n");
-       }
-
-       for (i = 0; i < f->n_elines; i++) {
-               el        = f->elines[i];
-
-               scf_logd("el: %ld, n_conns: %ld, n_pins: %ld, flags: %#lx\n", el->id, el->n_conns, el->n_pins, el->flags);
-       }
-
-       scf_vector_clear(graph, ( void (*)(void*) )ses_vertex_free);
-       scf_vector_free(graph);
-       scf_vector_free(colors);
-}
-
 int epath_cmp_pins(const void* v0, const void* v1)
 {
        const ses_path_t* p0 = *(const ses_path_t**)v0;
@@ -594,12 +502,12 @@ static void __ses_layout_path2(ScfEfunction* f, ses_path_t* path, ses_path_t* ba
        bp  = base->pins->data[base->pins->size - 1];
        __n = __ses_find_eline_index(f, bp->lid);
 
-       scf_logw("path: %d, __n: %ld, l%ld\n", path->index, __n, f->elines[__n]->id);
+       scf_logd("path: %d, __n: %ld, l%ld\n", path->index, __n, f->elines[__n]->id);
 
        for (j = path->pins->size - 1; j >= 0; j--) {
                p  = path->pins->data[j];
 
-               scf_logi("path: %d, c%ldp%ld, __n: %ld, l%ld\n", path->index, p->cid, p->id, __n, f->elines[__n]->id);
+               scf_logd("path: %d, c%ldp%ld, __n: %ld, l%ld\n", path->index, p->cid, p->id, __n, f->elines[__n]->id);
 
                for (k = base->pins->size - 1; k >= 0; k--) {
                        bp = base->pins->data[k];
@@ -607,7 +515,7 @@ static void __ses_layout_path2(ScfEfunction* f, ses_path_t* path, ses_path_t* ba
                        if (p->lid == bp->lid) {
                                __n = __ses_find_eline_index(f, bp->lid);
 
-                               scf_logw("__n: %ld, l%ld\n\n", __n, f->elines[__n]->id);
+                               scf_logd("__n: %ld, l%ld\n\n", __n, f->elines[__n]->id);
                                break;
                        }
                }
@@ -639,7 +547,7 @@ static void __ses_layout_path2(ScfEfunction* f, ses_path_t* path, ses_path_t* ba
                }
 #endif
        }
-       printf("\n");
+//     printf("\n");
 }
 
 static void __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* base)
@@ -666,7 +574,7 @@ static void __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* bas
                }
        }
 
-       scf_logi("path: %d, ------------------------\n\n", base->index);
+       scf_logd("path: %d, ------------------------\n\n", base->index);
 }
 
 static int __ses_layout_lines4(ScfEfunction* f)