bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/29058] New: Quadratic(?) slowdown of m68k-as on m68k_frob_symbo


From: slyich at gmail dot com
Subject: [Bug gas/29058] New: Quadratic(?) slowdown of m68k-as on m68k_frob_symbol()
Date: Wed, 13 Apr 2022 06:54:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29058

            Bug ID: 29058
           Summary: Quadratic(?) slowdown of m68k-as on m68k_frob_symbol()
           Product: binutils
           Version: 2.38
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: slyich at gmail dot com
  Target Milestone: ---

Created attachment 14060
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14060&action=edit
sqlite3-sqlite3.o.c.xz

Initially noticed the problem when tried to cross-compile sqlite-3.38.2 to
m68k-unknown-linux-gnu.

Reproducer run:

$ m68k-unknown-linux-gnu-gcc -g -O2 -S sqlite3-sqlite3.o.c -o a.S
# takes 40 seconds, ok

$ m68k-unknown-linux-gnu-gcc -c a.S
# takes hours, bug

perf top -p $pid says all time is spent in:

  99,85%  m68k-unknown-linux-gnu-as  [.] m68k_frob_symbol

which makes sense as m68k_frob_symbol() is a linear scan over every label:

gas/write.c:
  write_object_file() {
    for (symp = symbol_rootP; symp; symp = symbol_next (symp)) {
        obj_frob_symbol (symp, punt); (or tc_frob_symbol (symp, punt);)

gas/config/tc-m68k.c:
  m68k_frob_symbol(symbolS *sym) {
    for (l = labels; l != NULL; l = l->next) {
        if (l->label == sym) { ...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]