[PATCH] M68K: avoid quadratic slowdlow in label alignment check
Alan Modra
amodra@gmail.com
Thu Apr 14 10:00:20 GMT 2022
On Thu, Apr 14, 2022 at 09:01:58AM +0100, Sergei Trofimovich via Binutils wrote:
> From: Sergei Trofimovich <siarheit@google.com>
>
> Before the change tc-m68k maintained a list of seen labels.
> Alignment check traversed label list to resolve symbol to label.
> This caused quadratic slowdown as each symbol was checked against
> each label. Worst affected files are the ones built with debugging
> enabled as DWARF generates many labels.
>
> The change embeds auxiliary label information right into symbol using
> TC_SYMFIELD_TYPE.
>
> Before the change test from PR 29058 did not finish in 10 minutes. After
> the change it finishes in 2 seconds.
>
> gas/ChangeLog:
>
> PR 29058
> * config/tc-m68k.h (TC_SYMFIELD_TYPE): define as m68k_tc_sy.
> * config/tc-m68k.c (m68k_frob_label): Use TC_SYMFIELD_TYPE to
> store label information.
Looks good to commit, thanks!
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list