tmp
authoryu.dongliang <18588496441@163.com>
Wed, 8 Nov 2023 04:43:40 +0000 (12:43 +0800)
committeryu.dongliang <18588496441@163.com>
Wed, 8 Nov 2023 04:43:40 +0000 (12:43 +0800)
ses_layout.c

index 54560323b7d946f8785fd0c23ce872817edb4475..99f73c4c0f9a97ebf62667285bf142a1f1048b7e 100644 (file)
@@ -657,11 +657,9 @@ static void __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* bas
 {
        intptr_t i;
 
-       if (path != base) {
-               __ses_layout_path2(f, path, base);
+       __ses_layout_path2(f, path, base);
 
-               base = path;
-       }
+       base = path;
 
        if (base->childs) {
                for (i = 0; i < base->childs->size; i++) {
@@ -724,17 +722,13 @@ static int __ses_layout_lines4(ScfEfunction* f)
        if (i >= paths->size)
                goto end;
 
-       for (j = 0; j < base->pins->size; j += 2) {
-               p  =        base->pins->data[j];
-
-               n  = __ses_find_eline_index(f, p->lid);
-
-               SCF_XCHG(f->elines[n], f->elines[j / 2]);
-       }
+       p = base->pins->data[0];
+       n = __ses_find_eline_index(f, p->lid);
+       SCF_XCHG(f->elines[n], f->elines[0]);
 
-       p = base->pins->data[j - 1];
+       p = base->pins->data[base->pins->size - 1];
        n = __ses_find_eline_index(f, p->lid);
-       SCF_XCHG(f->elines[n], f->elines[j / 2 + 1]);
+       SCF_XCHG(f->elines[n], f->elines[f->n_elines - 1]);
 
        __ses_layout_path(f, base, base);