[PATCH 0/2] rh2059646 - compilation of prusa-slicer hangs
Alan Modra
amodra@gmail.com
Wed Mar 9 05:25:04 GMT 2022
rh2059646-reduced.s is a 10M source for one function extracted from
the 386M source attached to
https://bugzilla.redhat.com/show_bug.cgi?id=2059646
Assembly even of the reduced file takes a long time, and the default
stack of 8M is not enough to handle recursion of resolve_symbol_value
starting from case rs_leb128 in gas/write.c:relax_segment. There is
one extremely long chain of expressions evaluating view numbers,
123582 deep if I calculated correctly. The source has that many .loc
directives in a row without intervening assembly instructions!
$ time ~/build/gas-virgin/all/gas/as-new -o xxx.o rh2059646-reduced.s
Segmentation fault (core dumped)
real 4m10.792s
user 4m9.810s
sys 0m0.080s
$ ulimit -s 65536
$ time ~/build/gas-virgin/all/gas/as-new -o xxx.o rh2059646-reduced.s
real 37m38.141s
user 37m37.930s
sys 0m0.052s
After applying the following patches:
$ time ~/build/gas/all/gas/as-new -o yyy.o rh2059646-reduced.s
real 0m0.350s
user 0m0.330s
sys 0m0.020s
Alan Modra (2):
Reduce duplicated symbol_clone_if_forward_ref work
Constant fold view increment expressions
gas/dwarf2dbg.c | 1 +
gas/symbols.c | 11 ++++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
More information about the Binutils
mailing list