From 5962f1d3dc67365f61732de80cf04281a1732ff8 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Wed, 8 Nov 2023 12:43:40 +0800 Subject: [PATCH] tmp --- ses_layout.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/ses_layout.c b/ses_layout.c index 5456032..99f73c4 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -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); -- 2.25.1