]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid quadratic behaviour of LTO symbol promotion
authorJan Hubicka <jh@suse.cz>
Wed, 4 Jan 2023 17:03:53 +0000 (18:03 +0100)
committerJan Hubicka <jh@suse.cz>
Wed, 4 Jan 2023 17:04:42 +0000 (18:04 +0100)
commitedc038863d88ef0fe7c3ffb3703a9d2b3a17f0a9
treedd2080e936fcac967916ad6f446ac005aaefcfa6
parent96cba8ebe512887025a9e8b74833074d8aa844c8
Avoid quadratic behaviour of LTO symbol promotion

LTO partitioning does renaming of symbols that ends up in same partition
and clash with assembler name.  This is done for "ordinary" symbols (such
as static functions) but also for symbols that are kept only as master
clones holding bodies of functions to be specialized later.
This is done only becuase we stream bodies to named section and clash
in names would mean that ltrans will load wrong body and crash.

Martin recently added bit to stream body for clones that are needed
since this makes it easier to bookeep what summaries are output.  THis
however triggers mass renaming of inline clones that is very slow
and unnecesary since their bodies are never streamed.

Bootstrapped/regtested x86_64-linux, comitted.

gcc/lto/ChangeLog:

2023-01-04  Jan Hubicka  <hubicka@ucw.cz>

* lto-partition.cc (may_need_named_section_p): Clones with no body
need no remaning.
gcc/lto/lto-partition.cc