On Mon, 2025-04-28 at 16:10:58 +0200, Martin Jambor wrote:
> Hi,
>
> starting with GCC 15 the order is not unique for any symtab_nodes but
> m_uid is, I believe we ought to dump the latter in the ipa-clones dump,
> if only so that people can reliably match entries about new clones to
> those about
On Thu, 2025-03-27 at 15:33:44 +, Sam James wrote:
>
> One thing I wasn't quite sure on yet: is -flto-partition=cache automatic
> with -flto-incremental? Or is it just an optional flag I can pass for
> more effective incremental LTO?
>
> If it's the latter, should we mention that in the -flto
(already Ok-ed off-list, since I forgot to Cc: )
On Thu, 2025-03-27 at 14:40:57 +0100, Gerald Pfeifer wrote:
> On Thu, 27 Mar 2025, Michal Jires wrote:
> > + Introduced incremental Link-Time Optimizations to significantly
> > reduce
> > +average recompilation time wi
This patch adds mention of my new Incremental LTO
in gcc-15/changes.html General Improvements.
Ok?
---
htdocs/gcc-15/changes.html | 6 ++
1 file changed, 6 insertions(+)
diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html
index dbc82be2..8a050aed 100644
--- a/htdocs/gcc-15/
Regenerated common.opt.urls, which I missed until autobuilder noticed.
Committed as obvious.
gcc/ChangeLog:
* common.opt.urls: Regenerate.
---
gcc/common.opt.urls | 6 ++
1 file changed, 6 insertions(+)
diff --git a/gcc/common.opt.urls b/gcc/common.opt.urls
index 79c322bed2b..ac602
Incremental LTO disabled cleanup of output_files since they have to
persist in ltrans cache.
This unintetionally also kept temporary early debug "*.debug.temp.o"
files.
Bootstrapped/regtested on x86_64-linux.
Ok for trunk?
lto-plugin/ChangeLog:
* lto-plugin.c (cleanup_handler): Keep only
This adds missing documentation for LTO flags.
Ok?
gcc/ChangeLog:
* doc/invoke.texi: (Optimize Options):
Add incremental LTO flags.
---
gcc/doc/invoke.texi | 26 +++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/gcc/doc/invoke.texi b/gcc/d
symtab_node::get_dump_name uses node order to identify nodes.
Order is no longer unique because of Incremental LTO patches.
This patch moves uid from cgraph_node node to symtab_node,
so get_dump_name can use uid instead and get back unique dump names.
In inlining passes, uid is replaced with more
I used link() to create cheap copies of Incremental LTO cache contents
to prevent their deletion once linking is finished.
This is unnecessary, since output_files are deleted in our lto-plugin
and not in the linker itself.
Bootstrapped/regtested on x86_64-linux.
lto-wrapper now again builds on Min
Bootstrapped/regtested on x86_64-linux. Committed as obvious.
PR lto/118181
gcc/ChangeLog:
* lto-ltrans-cache.cc (ltrans_file_cache::create_item):
Pass checksum by reference.
* lto-ltrans-cache.h: Likewise.
---
gcc/lto-ltrans-cache.cc | 2 +-
gcc/lto-ltrans-cache
MSYS2+MinGW contains headers without defining expected contents.
This fix checks that the fcntl function is actually defined.
Bootstrapped/regtested on x86_64-linux. Committed as obvious.
gcc/ChangeLog:
* lockfile.cc (LOCKFILE_USE_FCNTL): New.
(lockfile::lock_write): Use LOCKFILE
On Thu, 2024-12-12 at 15:48:19 +, Jan Hubicka wrote:
> fgetc has kind of non-trivial overhead. For non-MMAP systems (is
> Windows such?), I think allocating some buffer, say 64K
> and doing fread/memcmp is probably better.
Ok, changed to fread/memcmp fallback.
> Isn't std::string always 0 ter
On Sun, 2024-11-17 at 19:15:04 +, Jan Hubicka wrote:
>
> I would suggest renaming produce_asm to produce_symbol_asm
> and making produce_asm wrapper which passes fn=NULL and output_order=-1,
> so we do not have odd parameters everywhere in streaming code.
>
> OK with this change.
> Honza
Ap
On Wed, 2024-11-27 at 15:18:39 +, Richard Biener wrote:
> I'm not sure it will work this way together with the output_die hunk,
> instead
> assemblers likely expect all this to happen close to the actual label
> emission, so I suggest to only split out the visibiltiy/globalizing fancy
> and emi
Changes from previous version:
1) As suggested, I replaced md5 with sha1.
Though I have not been able to measure a difference.
Checksum computation will be later moved to WPA before partitions are
streamed to disk.
2) File comparison with mmap.
Ltrans cache overhead when compiling cc1:
whole LT
On Wed, 2024-11-06 at 17:33:50 +, Jonathan Wakely wrote:
>
> If there's going to be a constructor then it should initialize the members.
>
> Otherwise, your original patch was better, because you could write
> this to get an all-zeros object:
>
> lto_encoder_entry e{};
>
> Now you can't s
This if branch checks for comdat_type_p (GTY union tag) and then uses
incorrect union variant die_id.die_symbol. There is no way to create
this combination of valid values even if we ignore the GTY.
Running testsuite with abort() in branch confirms that it is never taken.
gcc/ChangeLog:
These patches allow adding additional die symbols, so that
external references represented as 'die_symbol+offset' don't diverge
contents of LTO partitions.
Bootstrapped/regtested on x86_64-linux
This patch adds remapping of node order for each lto partition.
Resulting order conserves relative order inside partition, but
is independent of outside symbols. So if lto partition contains
identical set of symbols, their remapped order will be stable
between compilations.
gcc/ChangeLog:
During Incremental LTO, contents of LTO partitions diverge because of
external DIE references (DW_AT_abstract_origin).
External references are in form 'die_symbol+offset'.
Originally there is only single die_symbol for each compilation unit and
its offsets are in 100'000s, which easily diverge.
D
Commited with suggested changes.
-
This patch disables propagation of ipcp information into partitions
where all instances of the node are marked to be inlined.
Motivation:
Incremental LTO needs stable values between compilation
ipa_strub_set_mode_for_new_functions uses node order as unique ever
increasing identifier. This is better satisfied with uid.
Order loses uniqueness with following patches.
gcc/ChangeLog:
* ipa-strub.cc (ipa_strub_set_mode_for_new_functions): Replace
order with uid.
(pass
Die symbols are used for external references.
Typically during LTO, early debug emits 'die_symbol+offset' for each
possibly referenced DIE in future. Partitions in LTRANS phase then
use these references.
Originally die symbols are handled only in root comp_unit and
in attributes.
This patch allow
This set of patches replaces the original Incremental LTO patch for
stabilizing node order in lto partitions.
Main difference is earlier handling of node clone order, as suggested by
Honza (https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651593.html).
Previously I simply set clone's order to ze
Symbol order corresponds to the order in source code.
For clones their order is currently arbitrarily chosen as max order++
But it would be more consistent with original purpose to choose clones
order to be shared with the original node order.
This stabilizes clone order for Incremental LTO.
Order
This patch disables propagation of ipcp information into lto partitions
where all instances of the node are marked to be inlined.
Motivation:
Incremental LTO needs stable values between compilations to be
effective. This requirement fails with following example:
void heavily_used_debug_function(i
Outside of suggested changes, this version:
- uses #define INCLUDE_*
- is rebased onto current trunk - 'fprintf (mstream,' lines
- --verbose 'recompiling++' count is moved into correct if branch
___
This patch implements Incremental LTO as ltrans cache.
The cache is active when directory $GCC_LT
This version differs by using INCLUDE_STRING instead of .
(+whitespace and year)
___
This patch implements lockfile used for incremental LTO.
Bootstrapped/regtested on x86_64-pc-linux-gnu
gcc/ChangeLog:
* Makefile.in: Add lockfile.o.
* lockfile.cc: New file.
* lockfile.
Hi,
> You do not implement GCOV_LINKED_WITH_LOCKING patch, does locking work
> with mingw? Or we only build gcc with cygwin emulation layer these days?
I tried to test _locking implementation with both mingw and msys2, in both
cases fcntl was present and _locking was not. Admittedly I was unable t
This patch removes suffixes from section names during LTO linking.
These suffixes were originally added for ld -r to work (PR lto/44992).
They were added to all LTO object files, but are only useful before WPA.
After that they waste space, and if kept random, make LTO caching impossible.
Bootstra
Replaces "lto_priv.$clone_number" by
"lto_priv.$partition_hash.$partition_specific_clone_number".
To reduce divergence for incremental LTO.
Bootstrapped/regtested on x86_64-pc-linux-gnu
gcc/lto/ChangeLog:
* lto-partition.cc (set_clone_partition_name_checksum): New.
(CHECKSUM_STRI
This patch squashes order of symbols in individual partitions, so that
their relative order is conserved, but is not influenced by symbols in
other partitions.
Order of cloned symbols is set to 0. This should be fine because order
specifies order of symbols in input files, which cloned symbols are
This patch implements new cache partitioning. It tries to keep symbols
from single source file together to minimize propagation of divergence.
It starts with symbols already grouped by source files. If reasonably
possible it only either combines several files into one final partition,
or, if a fil
This patch implements lockfile used for incremental LTO.
Bootstrapped/regtested on x86_64-pc-linux-gnu
gcc/ChangeLog:
* Makefile.in: Add lockfile.o.
* lockfile.cc: New file.
* lockfile.h: New file.
---
gcc/Makefile.in | 5 +-
gcc/lockfile.cc | 136 +
This patch implements Incremental LTO as ltrans cache.
The cache is active when directory $GCC_LTRANS_CACHE is specified and exists.
Stored are pairs of ltrans input/output files and input file hash.
File locking is used to allow multiple GCC instances to use to same cache.
Bootstrapped/regtested
Bootstrapped/regtested on x86_64-pc-linux-gnu
gcc/ChangeLog:
* lto-streamer.cc (lto_get_section_name): Remove random_seed in WPA.
---
gcc/lto-streamer.cc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gcc/lto-streamer.cc b/gcc/lto-streamer.cc
index 4968fd13413
Bootstrapped/regtested on x86_64-pc-linux-gnu
gcc/ChangeLog:
* lto-opts.cc (lto_write_options): Skip OPT_fltrans_output_list_.
---
gcc/lto-opts.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/lto-opts.cc b/gcc/lto-opts.cc
index c9bee9d4197..0451e290c75 100644
--- a/gcc/lto-opt
Hi,
these patches implement Incremental LTO, specifically by caching results of
ltrans phase. Secondarily these patches contain changes to reduce divergence of
ltrans partitions so that they can be cached.
The aim is to reduce compile times for quick edit-compile cycles while using
LTO. Even with
Jangala
Haochen Jiang
Qian Jianhua
+Michal Jires
Janis Johnson
Teresa Johnson
Kean Johnston
39 matches
Mail list logo