[PATCH] contrib/mklog.py: Fix issues reported by flake8

2023-10-03 Thread Martin Jambor
stead?) Thanks, Martin contrib/ChangeLog: 2023-10-03 Martin Jambor * mklog.py (skip_line_in_changelog): Compare to None using is instead of ==, add an extra newline after the function. --- contrib/mklog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/con

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-10-03 Thread Martin Jambor
er uses of SSAs does not bring them up. During tree-inline they are handled especially at the end, I assume in order to make sure that relative ordering of UIDs are the same with and without debug info. This means that during tree-inline we need to make a hash of killed SSAs, that we already hav

[committed] ipa-modref: Fix dumping

2023-10-03 Thread Martin Jambor
obvious after including it in a bootstrap and testing on an x86_64-linux. Thanks, Martin gcc/ChangeLog: 2023-09-21 Martin Jambor * ipa-modref.h (modref_summary::dump): Make const. * ipa-modref.cc (modref_summary::dump): Likewise. (dump_lto_records): Dump to out instead of

[PATCH] Revert "ipa: Self-DCE of uses of removed call LHSs (PR 108007)"

2023-10-05 Thread Martin Jambor
Hello, I am going to commit the following patch to fix PR 111688 (bootstrap on ppc64le broken) and will re-fix 108007 (issues with IPA-SRA when user explicitely turns off DCE) when I figure out what's going wrong. Sorry for the breakage, Martin [PATCH] Revert "ipa: Self-DCE of uses of removed

[PATCH 1/3] ipa-cp: Templatize filtering of m_agg_values

2023-10-05 Thread Martin Jambor
gcc.dg/ipa/pr108959.c. gcc/ChangeLog: 2023-09-13 Martin Jambor PR ipa/57 * ipa-prop.h (ipcp_transformation): New member function template remove_argaggs_if. * ipa-sra.cc (zap_useless_ipcp_results): Use remove_argaggs_if to filter aggreagate constants

[PATCH 3/3] ipa: Limit pruning of IPA-CP aggregate constants if there are loads

2023-10-05 Thread Martin Jambor
103669 (to get a clobber/kill) in a way that ipa-modref can still track things. Therefore I am not sure if we actually want this patch. gcc/ChangeLog: 2023-10-04 Martin Jambor * ipa-modref.cc (ipcp_argagg_and_access_must_overlap_p): New function

[PATCH 2/3] ipa: Prune any IPA-CP aggregate constants known by modref to be killed (111157)

2023-10-05 Thread Martin Jambor
tch It does not try to look up anything in the load lists, this will be done as a follow-up in order to ease review. gcc/ChangeLog: 2023-09-19 Martin Jambor PR ipa/57 * ipa-prop.h (struct ipa_argagg_value): Newf flag killed. * ipa-modref.cc (ipcp_argagg_and_kill_over

[PR 86371] Remove spurious $HOME include from BRIG FE Makefile

2018-07-04 Thread Martin Jambor
Hi, a spurious include directory from $HOME slipped into a BRIG FE Makefile. I've bootstrapped and tested the following fix, which I am going to commit in a few moments. Martin 2018-07-04 Martin Jambor PR hsa/86371 * Make-lang.in (BRIGINCLUDES): Remove erroneous in

Re: [PATCH] Avoid out of scope access in hsa-dump.c

2018-07-23 Thread Martin Jambor
Hi, On Sun, Jul 22 2018, Bernd Edlinger wrote: > Hi, > > this fixes an use of a buffer after the block scope > in hsa-dump.c: "buf" is assigned to "name" and used after > the scope ends in a fprintf. > > I have not done any real checks, except boot-strapping with > all languages. > Is it OK for tr

[PR 80689] Copy small aggregates element-wise

2018-07-24 Thread Martin Jambor
be grateful for any comments, eventually I'd like to get approval to commit it to trunk. Thanks, Martin 2018-07-10 Martin Jambor PR target/80689 * tree-sra.h: New file. * ipa-prop.h: Moved declaration of build_ref_for_offset to tree-sra.h. * expr.c:

Re: [PATCH] Convert ipcp_vr_lattice to type agnostic framework.

2023-05-26 Thread Martin Jambor
Hello, On Mon, May 22 2023, Aldy Hernandez wrote: > I've adjusted the patch with some minor cleanups that came up when I > implemented the rest of the IPA revamp. > > Rested. OK? > > On Wed, May 17, 2023 at 4:31 PM Aldy Hernandez wrote: >> >> This converts the lattice to store ranges in Value_Ra

[COMMITTED] MAINTAINERS file: Replace spaces with tabs

2023-05-29 Thread Martin Jambor
Hi, This change, separating Benjamin's name and email address with tabs rather than spaces, makes contrib/check-MAINTAINERS.py script happy about our MAINTAINERS file again, so I tool the liberty of committing this as obvious. Thanks, Martin ChangeLog: 2023-05-29 Martin J

Re: [PATCH] Implement ipa_vr hashing.

2023-05-29 Thread Martin Jambor
Hi, On Mon, May 22 2023, Aldy Hernandez via Gcc-patches wrote: > Implement hashing for ipa_vr. When all is said and done, all these > patches incurr a 7.64% slowdown for ipa-cp, with is entirely covered by > the similar 7% increase in this area last week. So we get type agnostic > ranges with "i

[PATCH 1/2] ipa-cp: Avoid long linear searches through DECL_ARGUMENTS

2023-05-29 Thread Martin Jambor
excercised. OK for master? Thanks, Martin gcc/ChangeLog: 2023-05-26 Martin Jambor * ipa-prop.h (struct ipcp_transformation): Rearrange members according to C++ class coding convention, add m_tree_to_idx, get_param_index and maybe_create_parm_idx_map. * ipa-cp.cc

[PATCH 2/2] ipa-cp: Feed results of IPA-CP into value numbering

2023-05-29 Thread Martin Jambor
. Bootstrapped, LTO-bootstrapped and LTO-profiledbootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin gcc/ChangeLog: 2023-05-26 Martin Jambor PR ipa/68930 PR ipa/92497 * ipa-prop.h (ipcp_get_aggregate_const): Declare. * ipa-prop.cc

Re: [PATCH 1/2] ipa-cp: Avoid long linear searches through DECL_ARGUMENTS

2023-05-31 Thread Martin Jambor
Hello, On Wed, May 31 2023, Richard Biener wrote: > On Tue, May 30, 2023 at 4:21 PM Jan Hubicka wrote: >> >> > On Mon, May 29, 2023 at 6:20 PM Martin Jambor wrote: >> > > >> > > Hi, >> > > >> > > there have been concerns

Re: [RFC] light expander sra for parameters and returns

2023-06-01 Thread Martin Jambor
Hi, On Tue, May 30 2023, Richard Biener wrote: > On Mon, 29 May 2023, Jiufu Guo wrote: > >> Hi, >> >> Previously, I was investigating some struct parameters and returns related >> PRs 69143/65421/108073. >> >> Investigating the issues case by case, and drafting patches for each of >> them one by

Re: [PATCH 2/2] ipa-cp: Feed results of IPA-CP into value numbering

2023-06-09 Thread Martin Jambor
Hi, thanks for looking at this. On Fri, Jun 02 2023, Richard Biener wrote: > On Mon, 29 May 2023, Martin Jambor wrote: > [...] >> diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc >> index 27c84e78fcf..33215b5fc82 100644 >> --- a/gcc/tree-ssa-sccvn.cc >&g

Re: [PATCH] Convert ipcp_vr_lattice to type agnostic framework.

2023-06-10 Thread Martin Jambor
Hi, thanks for dealing with my requests. On Wed, Jun 07 2023, Aldy Hernandez wrote: > On 5/26/23 18:17, Martin Jambor wrote: >> Hello, >> >> On Mon, May 22 2023, Aldy Hernandez wrote: >>> I've adjusted the patch with some minor cleanups that came up when I

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-06-13 Thread Martin Jambor
Ping. Thanks, Martin On Fri, May 12 2023, Martin Jambor wrote: > Hi, > > PR 108007 is another manifestation where we rely on DCE to clean-up > after IPA-SRA and if the user explicitely switches DCE off, IPA-SRA > can leave behind statements which are fed uninitialized values a

Re: [PATCH] Export value/mask known bits from IPA.

2023-07-17 Thread Martin Jambor
Hi Aldy, On Mon, Jul 17 2023, Aldy Hernandez wrote: > Currently IPA throws away the known 1 bits because VRP and irange have > traditionally only had a way of tracking known 0s (set_nonzero_bits). > With the ability to keep all the known bits in the irange, we can now > save this between passes. >

[committed] Restore bootstrap by removing unused variable in tree-ssa-loop-ivcanon.cc

2023-07-17 Thread Martin Jambor
/ChangeLog: 2023-07-17 Martin Jambor * tree-ssa-loop-ivcanon.cc (try_peel_loop): Remove unused variable entry_count. --- gcc/tree-ssa-loop-ivcanon.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc index bdb738af7a8

[committed] Document new analyzer parameters

2023-07-20 Thread Martin Jambor
Hi, This patch documents the analyzer parameters introduced in r14-2029-g0e466e978c7286 also in gcc/doc/invoke.texi. Committed as obvious after testing with make pdf and make info and eyeballing the result. Thanks, Martin 2023-07-20 Martin Jambor * doc/invoke.texi (analyzer-text

Re: [PATCH] mklog: Add --append option to auto add generate ChangeLog to patch file

2023-07-21 Thread Martin Jambor
Hello Lehua, On Wed, Jul 12 2023, Lehua Ding wrote: > Hi, > > This tiny patch add --append option to mklog.py that support add generated > ChangeLog to the corresponding patch file. With this option there is no need > to manually copy the generated ChangeLog to the patch file. e.g.: > > Run `mklog

Re: [PATCH] mklog: Add --append option to auto add generate ChangeLog to patch file

2023-07-21 Thread Martin Jambor
Hello Lehua, On Fri, Jul 21 2023, Lehua Ding wrote: > Hi Martin, > > > > this patch caused flake8 to complain about contrib/mklog.py: > >  > > $ flake8 contrib/mklog.py > > contrib/mklog.py:377:80: E501 line too long (85 > 79 characters) > > contrib/mklog.py:388:26: E127 continuation line over-ind

Re: [PATCH] mklog: Add --append option to auto add generate ChangeLog to patch file

2023-07-21 Thread Martin Jambor
Hello Lehua, On Fri, Jul 21 2023, Lehua Ding wrote: > Hi Martin, > > > By the way, is there a standard format required for these Python files? Generally, our Python coding conventions are at https://gcc.gnu.org/codingconventions.html#python > I see that other Python files have similar format err

Re: [PATCH] Read global value/mask in IPA.

2023-07-31 Thread Martin Jambor
Hello, On Tue, Jul 18 2023, Aldy Hernandez wrote: > On 7/17/23 15:14, Aldy Hernandez wrote: >> Instead of reading the known zero bits in IPA, read the value/mask >> pair which is available. >> >> There is a slight change of behavior here. I have removed the check >> for SSA_NAME, as the ranger c

[PATCH] ipa-sra: Don't consider CLOBBERS as writes preventing splitting

2023-07-31 Thread Martin Jambor
testcases in the PR need surprisingly more effort but the simple one can be fixed now easily by this patch and I'll work on the others incrementally. Bootstrapped and currently undergoing testsuite run on x86_64-linux. OK if it passes too? Thanks, Martin gcc/ChangeLog: 2023-07-31 Martin J

[PATCH] tree-sra: Fix union handling in build_reconstructed_reference (PR 105860)

2022-07-01 Thread Martin Jambor
patch does (and the extra testcase verifies). Bootstrapped and tested on x86_64-linux. OK for trunk and then for release branches? Thanks, Martin gcc/ChangeLog: 2022-07-01 Martin Jambor PR tree-optimization/105860 * tree-sra.cc (build_reconstructed_reference): Start

Re: [PATCH] tree-sra: Fix union handling in build_reconstructed_reference (PR 105860)

2022-07-04 Thread Martin Jambor
Hi, On Mon, Jul 04 2022, Richard Biener wrote: > On Fri, 1 Jul 2022, Martin Jambor wrote: > >> Hi, >> >> As the testcase in PR 105860 shows, the code that tries to re-use the >> handled_component chains in SRA can be horribly confused by unions, >> where

[PATCH] testsuite: Fix tree-ssa/alias-access-path-13.c on 32bit platforms (PR 106216)

2022-07-08 Thread Martin Jambor
e original intent. I hope the fix is obvious enough (and it is only a testsuite change) that I can commit it myself. Thanks, Martin gcc/testsuite/ChangeLog: 2022-07-08 Martin Jambor PR testsuite/106216 * gcc.dg/tree-ssa/alias-access-path-13.c (union foo): Replace a long

[PATCH] ipa-cp: Fix assert triggering with -fno-toplevel-reorder (PR 106260)

2022-07-13 Thread Martin Jambor
for master and then all active release branches? Thanks, Martin gcc/ChangeLog: 2022-07-13 Martin Jambor PR ipa/106260 * ipa-cp.cc (initialize_node_lattices): Replace assert that there are callers with handling that situation when -fno-toplevel_reorder. gcc

Re: [PATCH] ipa-cp: Fix assert triggering with -fno-toplevel-reorder (PR 106260)

2022-07-14 Thread Martin Jambor
Hi, On Thu, Jul 14 2022, Richard Biener wrote: > On Wed, Jul 13, 2022 at 11:06 PM Martin Jambor wrote: >> >> Hi, >> >> with -fno-toplevel-reorder (and -fwhole-program), there apparently can >> be local functions without any callers. > > Did you check w

Re: [PATCH] ipa-cp: Fix assert triggering with -fno-toplevel-reorder (PR 106260)

2022-07-18 Thread Martin Jambor
as variable, >> thus avoiding both the assert trigger and the verification failure. >> >> Bootstrapped and tested on x86_64-linux. OK for master and then all >> active release branches? >> >> Thanks, >> >> Martin >> >> >> gcc/Chan

Re: [PATCH] Fix ICE when multiple speculative targets are expanded in different ltrans unit [PR93318]

2022-08-02 Thread Martin Jambor
Hi, On Thu, Jun 23 2022, Xionghu Luo via Gcc-patches wrote: > There is a corner case for speculative multiple targets, that if speculative > edges are streamed to different ltrans units, and then edges are expanded > in one ltrans unit but the speculative property is not cleared by > resolve_specu

Re: [09/23] Add a cut-down version of std::span (array_slice)

2022-08-03 Thread Martin Jambor
Hi Richard, On Fri, Nov 13 2020, Richard Sandiford via Gcc-patches wrote: > A later patch wants to be able to pass around subarray views of an > existing array. The standard class to do that is std::span, but it's > a C++20 thing. This patch just adds a cut-down version of it. thanks a lot for

Re: [09/23] Add a cut-down version of std::span (array_slice)

2022-08-10 Thread Martin Jambor
Hello, I have one more question/comment about array_slice. Ever since I started to use it... On Fri, Nov 13 2020, Richard Sandiford via Gcc-patches wrote: > A later patch wants to be able to pass around subarray views of an > existing array. The standard class to do that is std::span, but it's

Re: [PATCH] ipa-sra: Don't consider CLOBBERS as writes preventing splitting

2023-08-04 Thread Martin Jambor
Hello, On Wed, Aug 02 2023, Richard Biener wrote: > On Mon, Jul 31, 2023 at 7:05 PM Martin Jambor wrote: >> >> Hi, >> >> when IPA-SRA detects whether a parameter passed by reference is >> written to, it does not special case CLOBBERs which means it often >&

Re: [PATCH] ipa-sra: Don't consider CLOBBERS as writes preventing splitting

2023-08-11 Thread Martin Jambor
Hello, On Fri, Aug 11 2023, Christophe Lyon wrote: > Hi Martin, > > > On Fri, 4 Aug 2023 at 18:26, Martin Jambor wrote: > >> Hello, >> >> On Wed, Aug 02 2023, Richard Biener wrote: >> > On Mon, Jul 31, 2023 at 7:05 PM Martin Jambor wrote: >> >&

Re: [PATCH 2/2] ipa-cp: Feed results of IPA-CP into value numbering

2023-08-13 Thread Martin Jambor
Hello Richi, it took me quite time to get back to this but it might have actually helped because it forced me to re-read the code around and in turn simplify the patch. On Mon, Jun 12 2023, Richard Biener wrote: > On Fri, 9 Jun 2023, Martin Jambor wrote: > [...] >> @@ -23

[PATCH] Fortran: Avoid accessing gfc_charlen when not looking at BT_CHARACTER (PR 110677)

2023-08-14 Thread Martin Jambor
because comp->ts.type in those cases is BT_CLASS and not BT_CHARACTER. This patch simply adds a check to make sure it is only accessed in those cases. I have verified that the UPBSAN failure goes away with this patch, it also passes bootstrap and testing on x86_64-linux. OK for master? T

Re: [PATCH] Fortran: Avoid accessing gfc_charlen when not looking at BT_CHARACTER (PR 110677)

2023-08-15 Thread Martin Jambor
Hello, On Mon, Aug 14 2023, Harald Anlauf via Gcc-patches wrote: > Hi Martin, > > Am 14.08.23 um 19:39 schrieb Martin Jambor: >> Hello, >> >> this patch addresses an issue uncovered by the undefined behavior >> sanitizer. In function resolve_structure_cons

[PATCH] ipa-sra: Allow IPA-SRA in presence of returns which will be removed

2023-08-18 Thread Martin Jambor
such cases. Bootstrapped, LTO-bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2023-08-18 Martin Jambor PR ipa/110378 * ipa-param-manipulation.cc (ipa_param_body_adjustments::mark_dead_statements): Verify that any return

Re: [PATCH v3] configure: Implement --enable-host-pie

2023-06-16 Thread Martin Jambor
Hello, On Thu, Jun 15 2023, Marek Polacek via Gcc-patches wrote: > On Mon, Jun 05, 2023 at 09:06:43PM -0600, Jeff Law wrote: >> >> >> On 6/5/23 10:18, Marek Polacek via Gcc-patches wrote: >> > Ping. Anyone have any further comments? >> Given this was approved before, but got reverted due to iss

[PATCH] Regenerate some autotools generated files (Was: Re: [PATCH v3] configure: Implement --enable-host-pie)

2023-06-16 Thread Martin Jambor
On Fri, Jun 16 2023, Marek Polacek wrote: > On Fri, Jun 16, 2023 at 12:26:23PM +0200, Martin Jambor wrote: >> Hello, >> >> On Thu, Jun 15 2023, Marek Polacek via Gcc-patches wrote: >> > On Mon, Jun 05, 2023 at 09:06:43PM -0600, Jeff Law wrote: >> >> &

[PATCH] ipa-sra: Disable candidates with no known callers (PR 110276)

2023-06-16 Thread Martin Jambor
caller into the early checks and makes the node a non-candidate for any transformation if it does not. Bootstrapped and tested on x86_64-linux, LTO bootstrap is still underway. OK if it passes too? Thanks, Martin gcc/ChangeLog: 2023-06-16 Martin Jambor PR ipa/110276 * ipa

Re: [PATCH] Convert ipa_jump_func to use ipa_vr instead of a value_range.

2023-06-26 Thread Martin Jambor
Hi, On Mon, May 22 2023, Aldy Hernandez via Gcc-patches wrote: > This patch converts the ipa_jump_func code to use the type agnostic > ipa_vr suitable for GC instead of value_range which is integer specific. > > I've disabled the range cacheing to simplify the patch for review, but > it is handled

Re: [PATCH] Implement ipa_vr hashing.

2023-06-26 Thread Martin Jambor
Hi, On Mon, May 22 2023, Aldy Hernandez via Gcc-patches wrote: > Implement hashing for ipa_vr. When all is said and done, all these > patches incurr a 7.64% slowdown for ipa-cp, with is entirely covered by > the similar 7% increase in this area last week. So we get type agnostic > ranges with "i

Re: [PATCH] Convert remaining uses of value_range in ipa-*.cc to Value_Range.

2023-06-26 Thread Martin Jambor
Hi, On Mon, May 22 2023, Aldy Hernandez via Gcc-patches wrote: > Minor cleanups to get rid of value_range in IPA. There's only one left, > but it's in the switch code which is integer specific. > > OK? With the same request that... > > gcc/ChangeLog: > > * ipa-cp.cc (decide_whether_versio

Re: [PATCH] configure: Implement --enable-host-bind-now

2023-06-27 Thread Martin Jambor
Hello, On Tue, May 16 2023, Marek Polacek via Gcc-patches wrote: > As promised in the --enable-host-pie patch, this patch adds another > configure option, --enable-host-bind-now, which adds -z now when linking > the compiler executables in order to extend hardening. BIND_NOW with RELRO > allows t

Re: Enable ranger for ipa-prop

2023-06-27 Thread Martin Jambor
On Tue, Jun 27 2023, Jan Hubicka wrote: > Hi, > as shown in the testcase (which would eventually be useful for > optimizing std::vector's push_back), ipa-prop can use context dependent ranger > queries for better value range info. > > Bootstrapped/regtested x86_64-linux, OK? > > Honza > > gcc/Chang

Re: [PATCH] configure: Implement --enable-host-bind-now

2023-06-29 Thread Martin Jambor
Hi, On Tue, Jun 27 2023, Marek Polacek wrote: > On Tue, Jun 27, 2023 at 01:39:16PM +0200, Martin Jambor wrote: >> Hello, >> >> On Tue, May 16 2023, Marek Polacek via Gcc-patches wrote: >> > As promised in the --enable-host-pie patch, this patch adds another >&g

[committed] Regenrate lto-plugin/Makefile.in

2023-06-30 Thread Martin Jambor
Hi, On Thu, Jun 29 2023, Marek Polacek wrote: > On Thu, Jun 29, 2023 at 05:58:22PM +0200, Martin Jambor wrote: [...] >> >> Unfortunately I won't have time to actually look at this in the next 2-3 >> weeks, so I am inclined to just trust the verification script

Re: [PATCH 3/3] analyzer: add text-art visualizations of out-of-bounds accesses [PR106626]

2023-06-30 Thread Martin Jambor
Hi David, On Wed, May 31 2023, David Malcolm via Gcc-patches wrote: > This patch extends -Wanalyzer-out-of-bounds so that, where possible, it > will emit a text art diagram visualizing the spatial relationship between [...] > > gcc/ChangeLog: > PR analyzer/106626 > * Makefile.in (AN

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-10-30 Thread Martin Jambor
Hello Iain, On Tue, Aug 15 2023, FX Coudert via Gcc-patches wrote: > [...] > From e1cf04cadb9fa065fb3f7d6bccf9ed6f1e9e3fc1 Mon Sep 17 00:00:00 2001 > From: Iain Sandoe > Date: Sun, 28 Mar 2021 14:48:17 +0100 > Subject: [PATCH 2/4] Darwin: Allow for configuring Darwin to use embedded > runpath.

Re: [PATCH 2/3] ipa: Prune any IPA-CP aggregate constants known by modref to be killed (111157)

2023-10-30 Thread Martin Jambor
Hello, On Thu, Oct 05 2023, Jan Hubicka wrote: >> gcc/ChangeLog: >> >> 2023-09-19 Martin Jambor >> >> PR ipa/57 >> * ipa-prop.h (struct ipa_argagg_value): Newf flag killed. >> * ipa-modref.cc (ipcp_argagg_and_kill_overlap_p): New

[PATCH] Fortran: Fix generate_error library function fnspec

2023-11-03 Thread Martin Jambor
apped and tested on x86_64-linux. OK for master? 2023-11-02 Martin Jambor * trans-decl.cc (gfc_build_builtin_function_decls): Fix fnspec of generate_error. --- gcc/fortran/trans-decl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/trans-decl

[PATCH] Fix configure script comments(!?!) (Was: Re: [PATCH] genemit: Split insn-emit.cc into ten files)

2023-11-06 Thread Martin Jambor
Hello, On Thu, Oct 12 2023, Robin Dapp wrote: > [...] > gcc/ChangeLog: > > PR bootstrap/84402 > PR target/111600 > > * Makefile.in: Handle split insn-emit.cc. > * configure: Regenerate. > * configure.ac: Add --with-insnemit-partitions. > * genemit.cc (output_pee

[PATCH] ipa: Avoid IPA confusing scalar values and single-field aggregates (PR 108679)

2023-02-14 Thread Martin Jambor
master? Thanks, Martin gcc/ChangeLog: 2023-02-13 Martin Jambor PR ipa/108679 * ipa-sra.cc (push_param_adjustments_for_index): Do not omit creation of non-scalar replacements even if IPA-CP knows their contents. gcc/testsuite/ChangeLog: 2023-02-13 Martin

[PATCH 1/2] ipa-cp: Fix various issues in update_specialized_profile (PR 107925)

2023-02-21 Thread Martin Jambor
subsequent patch on an x86_64-linux. OK for master and the 12 branch - assuming it is also affected? Thanks, Martin gcc/ChangeLog: 2023-02-17 Martin Jambor PR ipa/107925 * ipa-cp.cc (update_specialized_profile): Drop orig_node_count to ipa count, remove assert

[PATCH 2/2] ipa-cp: Improve updating behavior when profile counts have gone bad

2023-02-21 Thread Martin Jambor
once stage1 opens up? Or perhaps even now? Thanks, Martin gcc/ChangeLog: 2023-02-20 Martin Jambor PR ipa/107925 * ipa-cp.cc (update_profiling_info): Drop counts of orig_node to global0 instead of zeroing when it does not have as many counts as it should

Re: [PATCH 1/2] ipa-cp: Fix various issues in update_specialized_profile (PR 107925)

2023-03-08 Thread Martin Jambor
Hello, I'd like to ping the patch below. Martin On Tue, Feb 21 2023, Martin Jambor wrote: > Hi, > > the patch below fixes various issues in function > update_specialized_profile. The main is removal of the assert which > is bogus in the case of recursive cloni

Re: [PATCH 2/2] ipa-cp: Improve updating behavior when profile counts have gone bad

2023-03-08 Thread Martin Jambor
Hello, I'd like to ping the patch below. Martin On Tue, Feb 21 2023, Martin Jambor wrote: > Hi, > > Looking into the behavior of profile count updating in PR 107925, I > noticed that an option not considered possible was actually happening, > and - with the guesswork in

Re: [PATCH] Fixes and workarounds for warnings during autoprofiledbootstrap build

2023-05-10 Thread Martin Jambor
Hello, On Wed, May 10 2023, Eugene Rozenfeld via Gcc-patches wrote: > autoprofiledbootstrap build produces new warnings since inlining decisions > are different from other builds. This patch contains fixes and workarounds > for those warnings. > > Tested on x86_64-pc-linux-gnu. > > gcc/ChangeLog:

[PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-05-12 Thread Martin Jambor
2023-05-11 Martin Jambor PR ipa/108007 * cgraph.h (cgraph_edge): Add a parameter to redirect_call_stmt_to_callee. * ipa-param-manipulation.h (ipa_param_adjustments): Added a parameter to modify_call. * cgraph.cc (cgraph_edge::redirect_call_stmt_to_c

Re: [PATCH 1/2] c++: potentiality of templated memfn call [PR109480]

2023-05-12 Thread Martin Jambor
Hello Patrick, On Wed, May 03 2023, Patrick Palka via Gcc-patches wrote: > [...] > > Subject: [PATCH] c++: potentiality of templated memfn call [PR109480] > > Here we're incorrectly deeming the templated call a.g() inside b's > initializer as potentially constant, despite g being non-constexpr, >

Re: [committed] libstdc++: Disable cacheline alignment for DJGPP [PR109741]

2023-05-17 Thread Martin Jambor
Hello, On Tue, May 16 2023, Jonathan Wakely via Gcc-patches wrote: > Tested powerpc64le-linux. Builds OK on djgpp too. > > Pushed to trunk. > > -- >8 -- > > DJGPP (and maybe other targets) uses MAX_OFILE_ALIGNMENT=16 which means > that globals (and static objects) can't have alignment greater than

Re: [PATCH] Provide an API for ipa_vr.

2023-05-24 Thread Martin Jambor
Hello, On Wed, May 17 2023, Aldy Hernandez wrote: > This patch encapsulates the ipa_vr internals into an API. It also > makes it type agnostic, in preparation for upcoming changes to IPA. > > Interestingly, there's a 0.44% improvement to IPA-cp, which I'm sure > we'll soak up with future changes

[PATCH] Deprecate the BRIG/HSAIL front-end (Was: Re: [committed] doc: Remove HSAIL from Language Standards)

2021-01-26 Thread Martin Jambor
Hi, On Wed, Jan 06 2021, Gerald Pfeifer wrote: > On Mon, 4 Jan 2021, Martin Jambor wrote: >> Given that nobody bothered to update the FE to HSAIL 1.2 (which is 2.5 >> years old) and it is unlikely to have many users, maybe it is time to >> deprecate the FE in GCC 11 (I gues

Re: [PATCH][X86] Enable X86_TUNE_AVX256_UNALIGNED_{LOAD, STORE}_OPTIMAL for generic tune [PR target/98172]

2021-02-04 Thread Martin Jambor
Hi, On Thu, Jan 28 2021, Richard Biener wrote: > On Thu, Jan 28, 2021 at 7:32 AM Hongtao Liu via Gcc-patches > wrote: >> >> Hi: >>GCC11 will be the system GCC 2 years from now, and for the >> processors then, they shouldn't even need to split a 256-bit vector >> into 2 128-bits vectors. >>

Re: [PATCH] ipa: Fix resolving speculations through cgraph_edge::set_call_stmt (PR 98078)

2021-02-18 Thread Martin Jambor
Hi, ping, please. Martin On Thu, Jan 21 2021, Martin Jambor wrote: > Hi, > > in the PR 98078 testcase, speculative call-graph edges which were > created by IPA-CP are confirmed during inlining but > cgraph_edge::set_call_stmt does not take it very well. > > Th

Re: [RFC][patch for gcc12][version 1] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-02-19 Thread Martin Jambor
On Thu, Feb 18 2021, Qing Zhao via Gcc-patches wrote: > (CC’ing Kees Cook on this topic) > > Hi, > > This is the first version of the complete patch for the new security feature > for GCC: > > Initialize automatic variables with new first class option > -ftrivial-auto-var-init=[uninitialized|pa

[PATCH] ipa: Check that scalar types that IPA-CP comes up with are sane (PR99122)

2021-03-05 Thread Martin Jambor
propagations. I have looked at the effect of the patch on WPA of Firefox and did not have any. I have bootstrapped and LTO bootstrapped and tested the patch on x86_64-linux. OK for trunk? And perhaps later for GCC 10 too? Thanks gcc/ChangeLog: 2021-02-26 Martin Jambor PR ipa/99122

[PATCH] ipa: Fix testsuite/gcc.dg/ipa/remref-6.c

2021-08-09 Thread Martin Jambor
RUNTESTFLAGS="ipa.exp" make -k check-g++ RUNTESTFLAGS="dg.exp=ipa/*.C" I will shortly push it to master as obvious. Thanks and sorry for the stupid mistake, Martin gcc/ChangeLog: 2021-08-09 Martin Jambor PR testsuite/101654 * ipa-prop.c (propagate_contr

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-21 Thread Martin Jambor
Hi, On Fri, Aug 20 2021, Martin Liška wrote: > Hello. > > As showed in the PR, returning (EAF_NOCLOBBER | EAF_NOESCAPE) for an argument > that is a function pointer is problematic. Doing such a function call is a > clobber. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests

[PATCH 0/4] IPA-CP profile feedback handling fixes

2021-08-24 Thread Martin Jambor
soon. Thanks, Martin Martin Jambor (4): cgraph: Do not warn about caller count mismatches of removed functions ipa-cp: Propagation boost for recursion generated values ipa-cp: Fix updating of profile counts and self-gen value evaluation ipa-cp: Select saner profile count to base heuristics on

[PATCH 1/4] cgraph: Do not warn about caller count mismatches of removed functions

2021-08-24 Thread Martin Jambor
is patches avoids checking such cgraph_nodes. gcc/ChangeLog: 2021-08-20 Martin Jambor * cgraph.c (cgraph_node::dump): Do not check caller count sums if the body has been removed. Remove trailing whitespace. --- gcc/cgraph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[PATCH 4/4] ipa-cp: Select saner profile count to base heuristics on

2021-08-24 Thread Martin Jambor
ted method should be used anyway, I am willing to be persuaded. But this patch is a clear improvement over the current situation. gcc/ChangeLog: 2021-08-23 Martin Jambor * params.opt (param_ipa_cp_profile_count_base): New parameter. * ipa-cp.c (max_count): Replace with

[PATCH 3/4] ipa-cp: Fix updating of profile counts and self-gen value evaluation

2021-08-24 Thread Martin Jambor
for the above and a missing check not to count dead incoming edges was also added. gcc/ChangeLog: 2021-08-23 Martin Jambor * ipa-cp.c (struct caller_statistics): New fields rec_count_sum, n_nonrec_calls and itself, document all fields. (init_caller_stats): Initialize

[PATCH 2/4] ipa-cp: Propagation boost for recursion generated values

2021-08-24 Thread Martin Jambor
en we fail to optimize 548.exchange with PGO. In the benchmark one recursive edge count overwhelmingly dominates all other counts in the program and so we fail to perform the first cloning (for the nonrecursive entry call) because it looks totally insignificant. gcc/ChangeLog: 2021-07-16 Mar

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Jambor
Hi, On Wed, Sep 23 2020, Jan Hubicka wrote: >> There's patch that does that. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> Ready to be installed? >> Thanks, >> Martin > >> From ff5f78110684ed9aedde15d19e856b3acf649971 Mon Sep 17 00:00:00 2001 >> From: Martin

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Jambor
Hi, On Wed, Sep 23 2020, Martin Liška wrote: > There's patch that does that. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > From ff5f78110684ed9aedde15d19e856b3acf649971 Mon Sep 17 00:00:00 2001 > From: Martin Liska > Dat

[PATCH 6/6] ipa-cp: Separate and increase the large-unit parameter

2020-09-29 Thread Martin Jambor
se the IPA-CP limit further. I plan to experiment with IPA-CP tuning on a larger set of programs. Meanwhile, mainly to address the 548.exchange2_r regression, I'm suggesting this simple change. gcc/ChangeLog: 2020-09-07 Martin Jambor * params.opt (ipa-cp-large-unit-insns)

[PATCH 0/6] IPA cleanups and IPA-CP improvements for 548.exchange2_r

2020-09-29 Thread Martin Jambor
? Thanks, Martin Martin Jambor (6): ipa: Bundle vectors describing argument values ipa: Introduce ipa_cached_call_context ipa: Bundle estimates of ipa_call_context::estimate_size_and_time ipa: Multiple predicates for loop properties, with frequencies ipa-cp: Add dumping of overall_size

[PATCH 3/6] ipa: Bundle estimates of ipa_call_context::estimate_size_and_time

2020-09-29 Thread Martin Jambor
into one output structure. gcc/ChangeLog: 2020-09-02 Martin Jambor * ipa-inline-analysis.c (do_estimate_edge_time): Adjusted to use ipa_call_estimates. (do_estimate_edge_size): Likewise. (do_estimate_edge_hints): Likewise. * ipa-fnsummary.h (struct

[PATCH 4/6] ipa: Multiple predicates for loop properties, with frequencies

2020-09-29 Thread Martin Jambor
cumulative frequency of loops with the property. This second property is then used by IPA-CP to much more aggressively boost its heuristic score for cloning opportunities which make iteration counts or strides of frequent loops compile time constant. gcc/ChangeLog: 2020-09-03 Martin Jambor

[PATCH 2/6] ipa: Introduce ipa_cached_call_context

2020-09-29 Thread Martin Jambor
set and can be dropped if deemed superfluous. gcc/ChangeLog: 2020-09-02 Martin Jambor * ipa-fnsummary.h (ipa_cached_call_context): New forward declaration and class. (class ipa_call_context): Make friend ipa_cached_call_context. Moved methods duplicate_from

[PATCH 1/6] ipa: Bundle vectors describing argument values

2020-09-29 Thread Martin Jambor
stack ones. Unfortunately, I don't think the structure embedded in ipa_call_context can be made constant because we need to manipulate and deallocate it when in cache. gcc/ChangeLog: 2020-09-01 Martin Jambor * ipa-prop.h (ipa_auto_call_arg_values): New type. (

[PATCH 5/6] ipa-cp: Add dumping of overall_size after cloning

2020-09-29 Thread Martin Jambor
When experimenting with IPA-CP parameters, especially when looking into exchange2_r, it has been very useful to know what the value of overall_size is at different stages of the decision process. This patch therefore adds it to the generated dumps. gcc/ChangeLog: 2020-09-07 Martin Jambor

Re: [PATCH 6/6] ipa-cp: Separate and increase the large-unit parameter

2020-09-30 Thread Martin Jambor
Hi, On Wed, Sep 30 2020, Richard Biener wrote: > On Tue, Sep 29, 2020 at 9:31 PM Jan Hubicka wrote: >> >> > >> > gcc/ChangeLog: >> > >> > 2020-09-07 Martin Jambor >> > >> > * params.opt (ipa-cp-large-unit-insns): New param

[PATCH] ipa-prop: Fix multiple-target speculation resolution

2020-10-01 Thread Martin Jambor
for trunk? Thanks, Martin gcc/ChangeLog: 2020-09-30 Martin Jambor PR ipa/96394 * ipa-prop.c (update_indirect_edges_after_inlining): Do not add resolved speculation edges to vector of new direct edges even in presence of multiple speculative direct edges for a

Re: [PATCH 4/6] ipa: Multiple predicates for loop properties, with frequencies

2020-10-02 Thread Martin Jambor
make >> iteration counts or strides of frequent loops compile time constant. >> >> gcc/ChangeLog: >> >> 2020-09-03 Martin Jambor >> >> * ipa-fnsummary.h (ipa_freqcounting_predicate): New type. >> (ipa_fn_summary)

[PATCH] params: Remove repeated word "that" in parameter description

2022-03-08 Thread Martin Jambor
2022-03-07 Martin Jambor PR translation/104552 * params.opt (ipa-cp-recursive-freq-factor): Remove repeated word "that" in the description. --- gcc/params.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/params.opt b/gcc/params.o

[PATCH] ipa-cp: Avoid adjusting references through self-recursion (PR 104813)

2022-03-08 Thread Martin Jambor
do it because of thunk expansion issues, and so this patch does exactly that. Bootstrapped and LTO-bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-03-07 Martin Jambor PR ipa/104813 * ipa-cp.cc (create_specialized_node): Move

Re: RFA: crc builtin functions & optimizations

2022-03-15 Thread Martin Jambor
Hello, just one question On Tue, Mar 15 2022, Joern Rennecke wrote: > Most microprocessors have efficient ways to perform CRC operations, be > that with lookup tables, rotates, or even special instructions. > However, because we lack a representation for CRC in the compiler, we > can't do pro

Re: [PATCH PING] ipa-cp: Do not create clones for values outside known value range (PR 102513)

2022-03-23 Thread Martin Jambor
Hello, I would like to ping this patch, please. Thanks, Martin On Mon, Feb 14 2022, Martin Jambor wrote: > Hi, > > PR 102513 shows we emit bogus array access warnings when IPA-CP > creates clones specialized for values which it deduces from arithmetic > jump functions

Re: [PATCH PING] ipa: Careful processing ANCESTOR jump functions and NULL pointers (PR 103083)

2022-03-23 Thread Martin Jambor
Hello, I would like to ping this patch, please. Thanks, Martin On Mon, Feb 14 2022, Martin Jambor wrote: > Hello Honza, > > On Mon, Dec 13 2021, Jan Hubicka wrote: >>> >>> + || (only_for_nonzero && >>>

Re: [PATCH] ipa: Create LOAD references when necessary during inlining (PR 103171)

2022-03-23 Thread Martin Jambor
Hello, I would like to ping this patch, please. Thanks, Martin On Fri, Jan 28 2022, Martin Jambor wrote: > Hi, > > in r12-2523-g13586172d0b70c ipa-prop tracking of jump functions during > inlining got the ability to remove ADDR references when inlining > discovered that they wer

[GCC 9 backport] cplxlower: Avoid a transform when looking at a default definition

2022-03-30 Thread Martin Jambor
transform when the SSA_NAME to be replaced is a default definition. gcc/ChangeLog: 2020-10-19 Martin Jambor PR tree-optimization/97456 PR middle-end/105071 * tree-complex.c (set_component_ssa_name): Do not replace ignored decl default definitions with new component

[RFC] ipa-cp: Feed results of IPA-CP into SCCVN

2022-04-01 Thread Martin Jambor
after IPA but before FRE - which are not many but there is a ccp and fwprop pass among others. For simple testcases like gcc/testsuite/gcc.dg/ipa/ipcp-agg-*.c, it makes not assembly difference at all. What do you think? Martin gcc/ChangeLog: 2022-03-30 Martin Jambor PR ipa/68930

  1   2   3   4   5   6   7   8   9   10   >