public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: "Patrick O'Neill" <patrick@rivosinc.com>
Cc: Binutils <binutils@sourceware.org>,
	gnu-toolchain@rivosinc.com,  Palmer Dabbelt <palmer@dabbelt.com>,
	Nelson Chu <nelson.chu@sifive.com>,
	 Jim Wilson <jim.wilson.gcc@gmail.com>
Subject: Re: [PATCH 0/4] RISCV: Improve linker time complexity
Date: Wed, 13 Apr 2022 08:58:38 +0800	[thread overview]
Message-ID: <CA+yXCZBz2xRnvWAvMVekahr_ut18tqSNdxPVd7oE8CJQHZEsgQ@mail.gmail.com> (raw)
In-Reply-To: <20220412162601.146507-1-patrick@rivosinc.com>

Hi Patrick:

Thanks for your amazing work! that's really good to see here is O(N)
implementation here,

And I have a suggestion here is - does it possible to let co-exist with current
implementation and having a command line option to select the linker
relaxation, of course we
could default to using the new implementation, but that gives us an
emergency fallback option to use the old implementation :)

Thanks





On Wed, Apr 13, 2022 at 12:27 AM Patrick O'Neill <patrick@rivosinc.com> wrote:
>
> The current linker has an O(n^2) time complexity when it comes to
> deleting bytes. By deferring the deletion of bytes, we can achieve O(n)
> deletion runtime.
>
> Patrick O'Neill (4):
>   RISCV: Add linker relaxation tests
>   RISCV: Arrange DELETE pass after .align pass
>   RISCV: Implement piecewise deletion
>   RISCV: Improve runtime of align directives
>
>  bfd/elfnn-riscv.c                          | 343 ++++++++++++---------
>  ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp |   6 +
>  ld/testsuite/ld-riscv-elf/relax-call-1.d   |  17 +
>  ld/testsuite/ld-riscv-elf/relax-call-1.s   |   7 +
>  ld/testsuite/ld-riscv-elf/relax-call-2.d   |  21 ++
>  ld/testsuite/ld-riscv-elf/relax-call-2.s   |  10 +
>  ld/testsuite/ld-riscv-elf/relax-call-3.d   |  25 ++
>  ld/testsuite/ld-riscv-elf/relax-call-3.s   |  13 +
>  ld/testsuite/ld-riscv-elf/relax-call-4.d   |  19 ++
>  ld/testsuite/ld-riscv-elf/relax-call-4.s   |   8 +
>  ld/testsuite/ld-riscv-elf/relax-call-5.d   |  23 ++
>  ld/testsuite/ld-riscv-elf/relax-call-5.s   |  11 +
>  ld/testsuite/ld-riscv-elf/relax-call-6.d   |  22 ++
>  ld/testsuite/ld-riscv-elf/relax-call-6.s   |  11 +
>  14 files changed, 389 insertions(+), 147 deletions(-)
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-1.d
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-1.s
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-2.d
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-2.s
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-3.d
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-3.s
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-4.d
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-4.s
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-5.d
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-5.s
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-6.d
>  create mode 100644 ld/testsuite/ld-riscv-elf/relax-call-6.s
>
> --
> 2.25.1
>

  parent reply	other threads:[~2022-04-13  0:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 16:25 Patrick O'Neill
2022-04-12 16:25 ` [PATCH 1/4] RISCV: Add linker relaxation tests Patrick O'Neill
2022-04-12 16:25 ` [PATCH 2/4] RISCV: Arrange DELETE pass after .align pass Patrick O'Neill
2022-04-12 16:26 ` [PATCH 3/4] RISCV: Implement piecewise deletion Patrick O'Neill
2022-04-12 16:26 ` [PATCH 4/4] RISCV: Improve runtime of align directives Patrick O'Neill
2022-04-13  0:58 ` Kito Cheng [this message]
2022-04-13  2:23   ` [PATCH 0/4] RISCV: Improve linker time complexity Palmer Dabbelt
2022-04-13  5:12   ` Alan Modra
2022-04-13 18:11     ` Palmer Dabbelt
2022-04-25 17:26       ` Patrick O'Neill
2022-05-02 13:50 ` [PATCH v2 0/5] " Patrick O'Neill
2022-05-02 13:50   ` [PATCH v2 1/5] RISCV: Add linker relaxation tests Patrick O'Neill
2022-05-02 13:50   ` [PATCH v2 2/5] RISCV: Arrange DELETE pass after .align pass Patrick O'Neill
2022-05-02 13:50   ` [PATCH v2 3/5] RISCV: Implement piecewise deletion Patrick O'Neill
2022-05-20 10:48     ` Nelson Chu
2022-05-20 17:36       ` Patrick O'Neill
2022-05-02 13:50   ` [PATCH v2 4/5] RISCV: Improve runtime of align directives Patrick O'Neill
2022-05-02 13:50   ` [PATCH v2 5/5] RISCV: Add --defer-deletion flag Patrick O'Neill
2022-05-27 21:20   ` [PATCH v3 0/3] RISCV: Improve linker time complexity Patrick O'Neill
2022-05-27 21:20     ` [PATCH v3 1/3] RISCV: Add linker relaxation tests Patrick O'Neill
2022-05-27 21:20     ` [PATCH v3 2/3] RISCV: Implement piecewise deletion Patrick O'Neill
2022-05-27 21:20     ` [PATCH v3 3/3] RISCV: Add --defer-deletion flag Patrick O'Neill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+yXCZBz2xRnvWAvMVekahr_ut18tqSNdxPVd7oE8CJQHZEsgQ@mail.gmail.com \
    --to=kito.cheng@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=nelson.chu@sifive.com \
    --cc=palmer@dabbelt.com \
    --cc=patrick@rivosinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).