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

2023-05-12 Thread Martin Jambor
-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_callee

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:

Re: [COMMITTED] Remove deprecated range_fold_{unary, binary}_expr uses from ipa-*.

2023-05-05 Thread Martin Jambor
Hello, On Wed, Apr 26 2023, Aldy Hernandez via Gcc-patches wrote: > gcc/ChangeLog: > > * ipa-cp.cc (ipa_vr_operation_and_type_effects): Convert to ranger API. > (ipa_value_range_from_jfunc): Same. > (propagate_vr_across_jump_function): Same. > * ipa-fnsummary.cc

Re: [PATCH] ipa/109607 - properly gimplify conversions introduced by IPA param manipulation

2023-04-27 Thread Martin Jambor
Hi, On Thu, Apr 27 2023, Richard Biener wrote: > The following addresses IPA param manipulation (through IPA SRA) > replacing > > BIT_FIELD_REF <*this_8(D), 8, 56> > > with > > BIT_FIELD_REF (ISRA.814), 8, > 56> > > which is supposed to be invalid GIMPLE (ISRA.814 is a register). > There's

[PATCH] ipa: Fix double reference-count decrements for the same edge (PR 107769, PR 109318)

2023-04-17 Thread Martin Jambor
and testing and LTO bootstrap on an x86_64. I will commit it to master after rebasing in a few moments (and then to the gcc-12 branch in a week or so). Thanks, Martin gcc/ChangeLog: 2023-04-14 Martin Jambor PR ipa/107769 PR ipa/109318 * cgraph.h (symtab_node

Re: [PATCH] ipa: Avoid constructing aggregate jump functions with huge offsets (PR 109303)

2023-03-31 Thread Martin Jambor
Hi, On Fri, Mar 31 2023, Richard Biener wrote: > On Fri, Mar 31, 2023 at 10:46 AM Martin Jambor wrote: >> >> Hi, >> >> we are in the process of changing data structures holding information >> about constants passed by reference and in aggregates to use un

[PATCH] ipa: Avoid constructing aggregate jump functions with huge offsets (PR 109303)

2023-03-31 Thread Martin Jambor
, Martin gcc/ChangeLog: 2023-03-30 Martin Jambor PR ipa/109303 * ipa-prop.cc (determine_known_aggregate_parts): Check that the offset + size will be representable in unsigned int. gcc/testsuite/ChangeLog: 2023-03-30 Jakub Jelinek Martin Jambor PR

Re: [PATCH RFC] c++: lambda mangling alias issues [PR107897]

2023-03-29 Thread Martin Jambor
Hello, On Wed, Mar 08 2023, Jason Merrill via Gcc-patches wrote: > On 3/8/23 11:15, Jason Merrill wrote: >> On 3/8/23 10:53, Jan Hubicka wrote: [...] >>> We have n->reset () for that which is used in similar situation when >>> frontends overwrites extern inline function by its different offline

Re: [wwwdocs] Document support for znver4 in gcc-13/changes.html

2023-03-23 Thread Martin Jambor
Hello, On Wed, Mar 22 2023, Richard Biener wrote: > On Tue, Mar 21, 2023 at 8:25 PM Martin Jambor wrote: >> >> Hello, >> >> is the following item documenting that gcc13 can generate code for Zen 4 >> OK for the changes.html file on the web? > >

[PATCH] ipa: Avoid another ICE when dealing with type-incompatibilities (PR 108959)

2023-03-23 Thread Martin Jambor
so removes IPA value range and bits information associated with removed parameters stored in the same structure so that the useless information is not streamed later on. Bootstrapped and LTO-bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin gcc/ChangeLog: 2023-03-22 Mar

[wwwdocs] Document support for znver4 in gcc-13/changes.html

2023-03-21 Thread Martin Jambor
Hello, is the following item documenting that gcc13 can generate code for Zen 4 OK for the changes.html file on the web? Thanks, Martin diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index 4fae1f7a..f8e9560c 100644 --- a/htdocs/gcc-13/changes.html +++

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 plac

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 cloning

[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

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

2023-02-21 Thread Martin Jambor
with the 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] ipa: Avoid IPA confusing scalar values and single-field aggregates (PR 108679)

2023-02-14 Thread Martin Jambor
for 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

Re: [PATCH] ipa: Avoid invalid gimple when IPA-CP and IPA-SRA disagree on types (108384)

2023-02-06 Thread Martin Jambor
ing as an obvious fix. Martin A fix to a typo spotted by Bernhard Reutner-Fischer. Tested by building the compiler with the fix. gcc/ChangeLog: 2023-02-06 Martin Jambor * ipa-sra.cc (adjust_parameter_descriptions): Fix a typo in a dump. --- gcc/ipa-sra.cc | 4 ++-- 1 file changed

Re: [PATCH] ipa: Avoid invalid gimple when IPA-CP and IPA-SRA disagree on types (108384)

2023-02-03 Thread Martin Jambor
On Fri, Feb 03 2023, Richard Biener wrote: > On Thu, Feb 2, 2023 at 5:20 PM Martin Jambor wrote: >> >> Hi, >> >> when the compiled program contains type mismatches between callers and >> callees when it comes to a parameter, IPA-CP can try to propagate one >&

[PATCH] ipa: Avoid invalid gimple when IPA-CP and IPA-SRA disagree on types (108384)

2023-02-02 Thread Martin Jambor
-CP and when it sees a value on the same offset but with a mismatching size, it just decides to leave that particular parameter be. Bootstrapped and tested on x86_64-linux, OK for master? Thanks, Martin gcc/ChangeLog: 2023-02-02 Martin Jambor PR ipa/108384 * ipa-sra.cc

Re: Remove support for Intel MIC offloading (was: [PATCH] Remove dead code.)

2023-02-01 Thread Martin Jambor
Hello, On Thu, Oct 20 2022, Richard Biener via Gcc-patches wrote: >> Am 20.10.2022 um 14:41 schrieb Jakub Jelinek via Gcc-patches >> : >> >> On Thu, Oct 20, 2022 at 12:33:28PM +, Michael Matz wrote: >>> Hey, >>> On Thu, 20 Oct 2022, Thomas Schwinge wrote: This had been

Re: [PATCH] ipa: silent -Wodr notes with -w

2023-02-01 Thread Martin Jambor
Hi, On Fri, Dec 02 2022, Martin Liška wrote: > If -w is used, warn_odr properly sets *warned = false and > so it should be preserved when calling warn_types_mismatch. > > Noticed that during a LTO reduction where I used -w. > > Patch can bootstrap on x86_64-linux-gnu and survives regression

Re: [PATCH] ipa: check if cache_token != NULL before hash_set::add call

2023-02-01 Thread Martin Jambor
On Tue, Jan 24 2023, Martin Liška wrote: > We should not insert an empty value to the container. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > PR ipa/108509 > > gcc/ChangeLog: > > * cgraphunit.cc

Re: [PATCH] IPA: do not release body if still needed

2023-01-19 Thread Martin Jambor
c/ChangeLog: >> >> 2023-01-18 Martin Jambor >> >> PR ipa/107944 >> * cgraph.cc (cgraph_node::remove): Check whether nodes up the >> lcone_of chain also do not need the body. >> --- >> gcc/cgraph.cc | 14 -- >> 1 fi

Re: [PATCH] IPA: do not release body if still needed

2023-01-18 Thread Martin Jambor
elease_body do nothing when called on a clone. >> I guess it makes sense to keep your approach but please add sanity check >> to release_body that clone_of == NULL with a comment. > > I do support Martin's enhanced version of the patch. > I take that as an approval, so I am abou

Re: [PATCH v2] ipa-cp: Speculatively call specialized functions

2023-01-13 Thread Martin Jambor
Hello, sorry for getting to this quite late. I have only had a quick glance at ipa-cp.cc hunks so far. On Fri, Dec 16 2022, Manolis Tsamis wrote: > The IPA CP pass offers a wide range of optimizations, where most of them > lead to specialized functions that are called from a call site. > This

Re: [PATCH] IPA: do not release body if still needed

2023-01-13 Thread Martin Jambor
Hi, sorry for getting to this so late. On Thu, Dec 01 2022, Martin Liška wrote: > Hi. > > Noticed during building of libbackend.a with the LTO partial linking. The testcase is areally nice one, too bad it's probably impossible to get it small enough to be included in the testcase. But it also

Re: [PATCH] ipa: Sort ipa_param_body_adjustments::m_replacements (PR 108110)

2023-01-06 Thread Martin Jambor
Hi, On Fri, Jan 06 2023, Martin Liška wrote: > Hi Martin > >> + key.unit_offset = unit_offset; >> + ipa_param_body_replacement *res >> += std::lower_bound (m_replacements.begin (), m_replacements.end (), key, >> +[] (const ipa_param_body_replacement , >> +

[PATCH] ipa: Sort ipa_param_body_adjustments::m_replacements (PR 108110)

2023-01-05 Thread Martin Jambor
gcc/ChangeLog: 2023-01-04 Martin Jambor * ipa-param-manipulation.h (ipa_param_body_adjustments): New members sort_replacements, lookup_first_base_replacement and m_sorted_replacements_p. * ipa-param-manipulation.cc: Define INCLUDE_ALGORITHM

[PATCH] ipa-sra: Consider the first parameter of methods safe to dereference

2022-12-14 Thread Martin Jambor
right now. OK if it passes? Thanks, Martin gcc/ChangeLog: 2022-12-14 Martin Jambor * ipa-sra.cc (create_parameter_descriptors): Consider the first parameter of a method safe to dereference. gcc/testsuite/ChangeLog: 2022-12-14 Martin Jambor * g++.dg/ipa/ipa-sra

[PATCH] ipa-sra: Fix address escape case when detecting Fortran descriptors

2022-12-14 Thread Martin Jambor
-linux right now. OK if it passes? Thanks, Martin gcc/ChangeLog: 2022-12-14 Martin Jambor * ipa-sra.cc (loaded_decls): Adjust comment. (scan_expr_access): Also detect assignments of address of local variables to a variable. Bail out early on SSA_NAMEs

Re: [PATCH (pushed)] docs: document --param=ipa-sra-ptrwrap-growth-factor

2022-12-14 Thread Martin Jambor
hould say. I'll fix that momentarily with the following patch. Thanks again, Martin Somehow I made the description of the parameter almost the opposite of what I wanted to say. Fixed by this patch. Tested by building gcc on x86_64-linux and make info and make pdf. gcc/ChangeLog: 2022-12-1

Re: [PATCH 8/9] ipa-sra: Make scan_expr_access bail out on uninteresting expressions

2022-12-14 Thread Martin Jambor
only >> > > interested in memory accesses. So bail out when the expression is >> > > something clearly uninteresting. >> > > >> > > Bootstrapped and tested individually when I originally posted it and >> > > now bootstrapped and LTO-bootstrapped and tested a

Re: [PATCH 6/9] ipa-sra: Be optimistic about Fortran descriptors

2022-12-14 Thread Martin Jambor
expressions. The new testcase is basically a copy >> of it with different options and IPA-SRA dump scans. >> >> Bootstrapped and tested individually when I originally posted it and >> now bootstrapped and LTO-bootstrapped and tested as part of the whole >> series. OK

Re: [PATCH 4/9] ipa-sra: Treat REFERENCE_TYPES as always dereferencable

2022-12-13 Thread Martin Jambor
Hi, On Mon, Dec 12 2022, Jan Hubicka wrote: >> [...] >> gcc/ChangeLog: >> >> 2022-11-11 Martin Jambor >> >> PR ipa/103585 >> * ipa-sra.c (struct gensum_param_access): New field load_count. >> (struct gensum_pa

Re: [PATCH 3/9] ipa-cp: Leave removal of unused parameters to IPA-SRA

2022-12-13 Thread Martin Jambor
ply alters the IPA-CP not to do that in the situations where IPA-SRA can (for nodes which can be made local) with additional dumping requested by Honza. gcc/ChangeLog: 2022-12-13 Martin Jambor * ipa-cp.cc (clone_for_param_removal_p): New function. (estimate_local_effects): Call it be

[PATCH 7/9] ipa-sra: Forward propagation of sizes which are safe to dereference

2022-12-12 Thread Martin Jambor
OK for master? gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-sra.cc (isra_param_desc): New fields safe_size, conditionally_dereferenceable and safe_size_set. (struct gensum_param_desc): New field conditionally_dereferenceable. (struct isra_param_flow): Updated comm

[PATCH 9/9] ipa: Avoid looking for IPA-SRA replacements where there are none

2022-12-12 Thread Martin Jambor
n I originally posted it and now bootstrapped and LTO-bootstrapped and tested as part of the whole series. OK for master? gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-param-manipulation.cc (ipa_param_body_adjustments::modify_expression): Bail out ea

[PATCH 8/9] ipa-sra: Make scan_expr_access bail out on uninteresting expressions

2022-12-12 Thread Martin Jambor
-12-14 Martin Jambor * ipa-sra.c (scan_expr_access): Bail out early if expr is something we clearly do not need to pass to get_ref_base_and_extent. --- gcc/ipa-sra.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 93fceeaf

[PATCH 6/9] ipa-sra: Be optimistic about Fortran descriptors

2022-12-12 Thread Martin Jambor
new testcase is basically a copy of it with different options and IPA-SRA dump scans. Bootstrapped and tested individually when I originally posted it and now bootstrapped and LTO-bootstrapped and tested as part of the whole series. OK for master? gcc/ChangeLog: 2022-11-11 Martin Jambor *

[PATCH 5/9] ipa-sra: Move caller->callee propagation before callee->caller one

2022-12-12 Thread Martin Jambor
ple of FOR_EACH_VEC_ELT macros with C++11 style iteration. Bootstrapped and tested individually when I originally posted it and now bootstrapped and LTO-bootstrapped and tested as part of the whole series. OK for master? gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-sra.c (ipa_sra_analysis): M

[PATCH 3/9] ipa-cp: Leave removal of unused parameters to IPA-SRA

2022-12-12 Thread Martin Jambor
-11 Martin Jambor * ipa-cp.cc (estimate_local_effects): Do not clone potentionally local nodes for all contexts just to remove unused parameters. --- gcc/ipa-cp.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index cc031ebe

[PATCH 4/9] ipa-sra: Treat REFERENCE_TYPES as always dereferencable

2022-12-12 Thread Martin Jambor
ped and tested as part of the whole series. OK for master? gcc/ChangeLog: 2022-11-11 Martin Jambor PR ipa/103585 * ipa-sra.c (struct gensum_param_access): New field load_count. (struct gensum_param_desc): New field safe_ref, adjusted comments. (by_ref_co

[PATCH 2/9] ipa: Better way of applying both IPA-CP and IPA-SRA (PR 103227)

2022-12-12 Thread Martin Jambor
ite/ChangeLog: 2022-11-11 Martin Jambor PR ipa/103227 PR ipa/107640 * gcc.dg/ipa/pr107640-2.c: New test. --- gcc/ipa-param-manipulation.cc | 155 -- gcc/ipa-param-manipulation.h | 19 ++-- gcc/ipa-prop.cc |

[PATCH 1/9] ipa-cp: Write transformation summaries of all functions

2022-12-12 Thread Martin Jambor
ing the streaming, I also simplified it a little a converted it writing to nicer C++ vector iterations. Bootstrapped and LTO-bootstrapped on x86_64-linux. OK for master? gcc/ChangeLog: 2022-11-25 Martin Jambor * ipa-prop.cc (useful_ipcp_transformation_info_p): New funct

Re: [PATCH 03/12] ipa-cp: Write transformation summaries of all functions

2022-11-28 Thread Martin Jambor
also simplified it a little a >> converted it writing to nicer C++ vector iterations. >> >> Bootstrapped and tested on x86_64-linux. OK for master? >> >> Thanks, >> >> Martin >> >> >> gcc/ChangeLog: >> >> 2022-11-11 Martin J

[PATCH] ipa-cp: Do not be too optimistic about self-recursive edges (PR 107661)

2022-11-22 Thread Martin Jambor
and tested on x86_64-linux. OK for trunk? Thanks, Martin gcc/ChangeLog: 2022-11-22 Martin Jambor PR ipa/107661 * ipa-cp.cc (push_agg_values_from_edge): New parameter optimize_self_recursion, use it to decide whether to pass interim to the helper function

Re: [PATCH 02/12] ipa-cp: Do not consider useless aggregate constants

2022-11-13 Thread Martin Jambor
On Sat, Nov 12 2022, Martin Jambor wrote: > Hi, > > When building vectors of known aggregate values, there is no point in > including those for parameters which are not used in any way > whatsoever. > > Bootstrapped and tested on x86_64-linux. OK for master? > > Thanks,

[PATCH 10/12] ipa-sra: Forward propagation of sizes which are safe to dereference

2022-11-11 Thread Martin Jambor
on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-sra.cc (isra_param_desc): New fields safe_size, conditionally_dereferenceable and safe_size_set. (struct gensum_param_desc): New field conditionally_dereferenceable

[PATCH 12/12] ipa: Avoid looking for IPA-SRA replacements where there are none

2022-11-11 Thread Martin Jambor
otherwise removed parameters that need to be removed from the statements too. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-param-manipulation.cc (ipa_param_body_adjustments::modify_expression): Bail out

[PATCH 11/12] ipa-sra: Make scan_expr_access bail out on uninteresting expressions

2022-11-11 Thread Martin Jambor
, Martin gcc/ChangeLog: 2021-12-14 Martin Jambor * ipa-sra.c (scan_expr_access): Bail out early if expr is something we clearly do not need to pass to get_ref_base_and_extent. --- gcc/ipa-sra.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ipa-sra.cc b/gcc

[PATCH 08/12] ipa-sra: Move caller->callee propagation before callee->caller one

2022-11-11 Thread Martin Jambor
this change to test ir independently and make those subsequent patches cleaner. While at it, I also replaced couple of FOR_EACH_VEC_ELT macros with C++11 style iteration. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor

[PATCH 07/12] ipa-sra: Treat REFERENCE_TYPES as always dereferencable

2022-11-11 Thread Martin Jambor
invocations. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor PR ipa/103585 * ipa-sra.c (struct gensum_param_access): New field load_count. (struct gensum_param_desc): New field safe_ref, adjusted

[PATCH 09/12] ipa-sra: Be optimistic about Fortran descriptors

2022-11-11 Thread Martin Jambor
-11 Martin Jambor * ipa-sra.c (isra_param_desc): New field not_specially_constructed. (struct isra_param_flow): New field constructed_for_calls. (isra_call_summary::dump): Dump the new flag. (loaded_decls): New variable. (dump_isra_param_descriptor): New

[PATCH 05/12] ipa-sra: Dump edge summaries also for non-candidates

2022-11-11 Thread Martin Jambor
dump them, which makes the dumops quite incomplete. This patch fixes that. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2021-12-14 Martin Jambor * ipa-sra.c (ipa_sra_dump_all_summaries): Dump edge summaries even for non-candidates

[PATCH 06/12] ipa-cp: Leave removal of unused parameters to IPA-SRA

2022-11-11 Thread Martin Jambor
gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-cp.cc (estimate_local_effects): Do not clone potentionally local nodes for all contexts just to remove unused parameters. --- gcc/ipa-cp.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ipa-cp.cc b

[PATCH 04/12] ipa: Better way of applying both IPA-CP and IPA-SRA (PR 103227)

2022-11-11 Thread Martin Jambor
parameters. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor PR ipa/103227 * ipa-param-manipulation.h (class ipa_param_adjustments): Removed member function get_updated_index_or_split. (class

[PATCH 03/12] ipa-cp: Write transformation summaries of all functions

2022-11-11 Thread Martin Jambor
: 2022-11-11 Martin Jambor * ipa-prop.cc (useful_ipcp_transformation_info_p): New function. (write_ipcp_transformation_info): Added a parameter, simplified given that is known not to be NULL. (ipcp_write_transformation_summaries): Write out all useful

[PATCH 02/12] ipa-cp: Do not consider useless aggregate constants

2022-11-11 Thread Martin Jambor
Hi, When building vectors of known aggregate values, there is no point in including those for parameters which are not used in any way whatsoever. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-cp.cc

[PATCH 01/12] ipa: IPA-SRA split detection simplification

2022-11-11 Thread Martin Jambor
for master? Thanks, Martin gcc/ChangeLog: 2022-11-10 Martin Jambor * ipa-param-manipulation.cc (ipa_param_body_adjustments::common_initialization): Do not set m_split_modifications_p. (ipa_param_body_adjustments::ipa_param_body_adjustments): Remove

Re: [PATCH] ipa-visibility: remove assert in TLS optimization [PR107353]

2022-10-26 Thread Martin Jambor
Hi, On Wed, Oct 26 2022, Alexander Monakov wrote: > When upgrading TLS access model based on optimized symbol visibility > status, we attempted to assert that recomputing the model would not > weaken it. It turns out that C, C++, and Fortran front-ends all can > (unintentionally) assign a

[PATCH] SRA: Limit replacement creation for accesses propagated from LHSs

2022-10-18 Thread Martin Jambor
already approved the patch (without the testcase) in Bugzilla, so I plan to commit it after bootstrapping and testing it on an x86_64 (on top of a more recent trunk than last week). Thanks, Martin gcc/ChangeLog: 2022-10-18 Martin Jambor PR tree-optimization/107206 * tree-sra.cc

Re: [PATCH 1/2] ipa-cp: Better representation of aggregate values we clone for

2022-10-17 Thread Martin Jambor
Hi, thanks for the review. On Fri, Oct 14 2022, Jan Hubicka wrote: >> [...] >> >> gcc/testsuite/ChangeLog: >> >> 2022-08-15 Martin Jambor >> >> * gcc.dg/ipa/ipcp-agg-11.c: Adjust dumps. >> * gcc.dg/ipa/

Re: [PATCH] Fix bogus -Wstringop-overflow warning

2022-10-14 Thread Martin Jambor
(int n, char m[1][n]); >>> >>> int foo (int n, char m[1][n]) {} >>> >>> no longer compiles with an error about different function types. >> >> Note in discussion with IPA folks we agreed that IPA cloning that modifies >> arguments either has to re

Re: [PATCH v2] ipa-visibility: Optimize TLS access [PR99619]

2022-09-05 Thread Martin Jambor
Hi, On Tue, Aug 30 2022, Alexander Monakov wrote: >> I see, thank you for explaining the issue, and sorry if I was a bit stubborn. >> >> Does the attached patch (incremental change below) look better? It no longer >> has the 'shortcut' where iterating over referrers is avoided for the common >>

[PATCH 2/2] ipa-cp: Better representation of aggregate values in call contexts

2022-08-30 Thread Martin Jambor
sted on x86_64-linux (and a slightly older version also on aarch64-linux). LTO-profiledbootstrap is currently underway. Given the size of the patch I assume there will be concerns/questions but I'm looking for an approval to commit a version of this. Thanks, Martin gcc/ChangeLog: 2022-

[PATCH 1/2] ipa-cp: Better representation of aggregate values we clone for

2022-08-30 Thread Martin Jambor
gcc/ChangeLog: 2022-08-26 Martin Jambor * ipa-prop.h (IPA_PROP_ARG_INDEX_LIMIT_BITS): New. (ipcp_transformation): Added forward declaration. (ipa_argagg_value): New type. (ipa_argagg_value_list): New type. (ipa_agg_replacement_value): Removed type.

Re: [PATCH v2] ipa-visibility: Optimize TLS access [PR99619]

2022-08-30 Thread Martin Jambor
On Fri, Aug 26 2022, Alexander Monakov wrote: > On Fri, 26 Aug 2022, Martin Jambor wrote: > >> > +/* Check if promoting general-dynamic TLS access model to local-dynamic is >> > + desirable for DECL. */ >> > + >> > +static bool >>

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-29 Thread Martin Jambor
Hello, On Sat, Aug 27 2022, Richard Biener wrote: >> Am 26.08.2022 um 23:45 schrieb Martin Jambor : >> >> Hi, >> >>> On Fri, Aug 26 2022, Richard Sandiford wrote: >>> Richard Biener writes: >>>>> Am 26.08.2022 um 18:40 schrieb Martin

Re: [PATCH 1/2] vec: Add array_slice constructors from non-const and gc vectors

2022-08-29 Thread Martin Jambor
Hi, On Mon, Aug 29 2022, Richard Biener wrote: > On Mon, 29 Aug 2022, Martin Jambor wrote: > >> Hi again, >> >> On Mon, Aug 29 2022, Richard Biener wrote: >> > On Fri, 26 Aug 2022, Martin Jambor wrote: >> > >> >> Hi, >> >> >&

Re: [PATCH 1/2] vec: Add array_slice constructors from non-const and gc vectors

2022-08-29 Thread Martin Jambor
Hi again, On Mon, Aug 29 2022, Richard Biener wrote: > On Fri, 26 Aug 2022, Martin Jambor wrote: > >> Hi, >> >> On Fri, Aug 26 2022, Richard Biener wrote: >> >> Am 26.08.2022 um 18:39 schrieb Martin Jambor : >> >> >> >>

Re: [PATCH 1/2] vec: Add array_slice constructors from non-const and gc vectors

2022-08-29 Thread Martin Jambor
Hi, On Mon, Aug 29 2022, Richard Biener wrote: > On Fri, 26 Aug 2022, Martin Jambor wrote: > >> Hi, >> >> On Fri, Aug 26 2022, Richard Biener wrote: >> >> Am 26.08.2022 um 18:39 schrieb Martin Jambor : >> >> >> >> Hi, >> >

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Martin Jambor
Hi, On Fri, Aug 26 2022, Richard Sandiford wrote: > Richard Biener writes: >>> Am 26.08.2022 um 18:40 schrieb Martin Jambor : >>> >>> Hi, >>> >>> This adds a method to binary search in a sorted array_slice. >>> >>> The impleme

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Martin Jambor
Hi, On Fri, Aug 26 2022, Richard Biener wrote: >> Am 26.08.2022 um 18:40 schrieb Martin Jambor : >> >> Hi, >> >> This adds a method to binary search in a sorted array_slice. >> >> The implementation is direct copy of vec:bsearch. Moreover, to

Re: [PATCH 1/2] vec: Add array_slice constructors from non-const and gc vectors

2022-08-26 Thread Martin Jambor
Hi, On Fri, Aug 26 2022, Richard Biener wrote: >> Am 26.08.2022 um 18:39 schrieb Martin Jambor : >> >> Hi, >> >> This patch adds constructors of array_slice that are required to >> create them from non-const (heap or auto) vectors or from GC vectors. >

[PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Martin Jambor
but I'll be happy to change that if not. Bootstrapped and tested along code that actually uses it on x86_64-linux. OK for trunk? Thanks, Martin gcc/ChangeLog: 2022-08-08 Martin Jambor * vec.h (array_slice::bsearch): New methods. --- gcc/vec.h | 94

[PATCH 1/2] vec: Add array_slice constructors from non-const and gc vectors

2022-08-26 Thread Martin Jambor
to having read-only array_slices. But I do need the constructor from the gc vector. Bootstrapped and tested along code that actually uses it on x86_64-linux. OK for trunk? Thanks, Martin gcc/ChangeLog: 2022-08-08 Martin Jambor * vec.h (array_slice): Add constructors for non-const

Re: [PATCH v2] ipa-visibility: Optimize TLS access [PR99619]

2022-08-26 Thread Martin Jambor
Hi, sorry for ignoring this for so long, I hope that Honza wold take over. I think the patch would be good if it did not have On Thu, Jul 07 2022, Alexander Monakov via Gcc-patches wrote: > From: Artem Klimov > > Fix PR99619, which asks to optimize TLS model based on visibility. > The fix

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: [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: [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 >

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

2022-07-18 Thread Martin Jambor
e, >> 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/ChangeLog: >

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 che

[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

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

2022-07-08 Thread Martin Jambor
inal 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 int

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] tree-sra: Fix union handling in build_reconstructed_reference (PR 105860)

2022-07-01 Thread Martin Jambor
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 expr

Re: Fix ipa-prop wrt volatile memory accesses

2022-06-12 Thread Martin Jambor
Hi, On Fri, Jun 10 2022, Jan Hubicka wrote: > Hi, > this patch prevents ipa-prop from propagating aggregates when load is > volatile. Martin, does this look OK? It seem to me that ipa-prop may > need some additional volatile flag checks. load_from_unmodified_param_or_agg checks for it,

Re: [PATCH] ipa: Check cst type when propagating controled uses info (PR 105639)

2022-05-27 Thread Martin Jambor
Hi, On Fri, May 27 2022, Richard Biener wrote: > On Thu, May 26, 2022 at 4:47 PM Martin Jambor wrote: >> >> Hi, >> >> PR 105639 shows that code with type-mismatches can trigger an assert >> after runnning into a branch that was inteded only for refere

[PATCH] ipa: Check cst type when propagating controled uses info (PR 105639)

2022-05-26 Thread Martin Jambor
on x86_64. OK for trunk and then gcc 12? Thanks, Martin gcc/ChangeLog: 2022-05-25 Martin Jambor PR ipa/105639 * ipa-prop.cc (propagate_controlled_uses): Check type of the constant before adding a LOAD reference. gcc/testsuite/ChangeLog: 2022-05-25 Martin Jambor

Re: [PATCH] ipa-visibility: Optimize TLS access [PR99619]

2022-05-02 Thread Martin Jambor
Hello, On Sun, Apr 17 2022, Artem Klimov via Gcc-patches wrote: > Fix issue PR99619, which asks to optimize TLS access based on > visibility. The fix is implemented as an IPA optimization, which allows > to take optimized visibility status into account (as well as avoid > modifying all language

[PATCH] ipa: Release body of clone_of when removing its last clone (PR 100413)

2022-04-28 Thread Martin Jambor
12 to branch and only backport to 12.2 after some time on GCC 13 master? Thanks, Martin gcc/ChangeLog: 2022-04-27 Martin Jambor PR ipa/100413 * cgraph.cc (cgraph_node::remove): Release body of the node this is clone_of if appropriate. gcc/testsuite/ChangeLog: 2022

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Martin Jambor
Hi, On Wed, Apr 20 2022, Jan Hubicka via Gcc-patches wrote: >> On Wed, 20 Apr 2022, Jakub Jelinek wrote: [...] >> > >> >if ((flag_openacc || flag_openmp) >> >&& lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))) >> > --- gcc/cgraphclones.cc.jj 2022-01-18

[PATCH] testsuite: Increase auto-inlining param in gcc.dg/ipa/remref-7.c (PR 105183)

2022-04-08 Thread Martin Jambor
d platform is welcomed to do so. OK for master? Thanks, Martin gcc/testsuite/ChangeLog: 2022-04-08 Martin Jambor PR testsuite/105183 * gcc.dg/ipa/remref-7.c: Add --param max-inline-insns-auto=100 to options. --- gcc/testsuite/gcc.dg/ipa/remref-7.c | 2 +- 1 file changed, 1 inser

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

2022-04-01 Thread Martin Jambor
Hi, thanks for a very quick reply. On Fri, Apr 01 2022, Richard Biener wrote: > On Fri, 1 Apr 2022, Martin Jambor wrote: > >> Hi, >> >> PRs 68930 and 92497 show that when IPA-CP figures out constants in >> aggregate parameters or when passed by reference but the

[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

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

2022-03-30 Thread Martin Jambor
the 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

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

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 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: 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

<    1   2   3   4   5   6   7   8   9   10   >