Re: [PATCH] Fix IPA-SRA issue with reverse SSO on specific pattern

2025-05-27 Thread Martin Jambor
Hi, On Wed, May 21 2025, Eric Botcazou wrote: > Hi, > > IPA-SRA generally works fine in the presence of reverse Scalar_Storage_Order > by propagating the relevant flag onto the newly generated MEM_REFs. However > we have been recently faced with a specific Ada pattern that it doesn't > handle

[PATCH] ipa: When inlining, don't combine PT JFs changing signedness (PR120295)

2025-05-20 Thread Martin Jambor
situation with adding an extra conversion instead. Bootstrapped and LTO-bootstrapped on x86_64-linux. OK for master and gcc-15 branch? Thanks, Martin gcc/ChangeLog: 2025-05-19 Martin Jambor PR ipa/120295 * ipa-prop.cc (update_jump_functions_after_inlining): Do not combine

[PATCH] ipa: Fix whitespace when dumping VR in jump_functions

2025-05-20 Thread Martin Jambor
Hi, lack of white space breakes the tree-visualisation structure and makes the dump unnecessarily difficult to read. I have bootstrapped and tested the patch on x86_64-linux. I plan to commit it soon as obvious. Thanks, Martin gcc/ChangeLog: 2025-05-19 Martin Jambor * ipa

Re: [PATCH 3/5] ipa: Dump cgraph_node UID instead of order into ipa-clones dump file

2025-05-19 Thread Martin Jambor
t new clones to >> those about removed nodes (if any). >> >> gcc/ChangeLog: >> >> 2025-04-23 Martin Jambor >> >> * cgraph.h (symtab_node): Make member function get_uid const. >> * cgraphclones.cc (dump_callgraph_transformation): Du

[PATCH] tree-sra: Do not create stores into const aggregates

2025-05-13 Thread Martin Jambor
convoluted. Anyway, it passes bootstrap and testing on x86_64-linux, bootstrap on Aarch64, testsuite is still running there. OK for master and all active release branches if it passes? Thanks, Martin gcc/ChangeLog: 2025-05-13 Martin Jambor PR tree-optimization/111873

Re: [PATCH 3/5] ipa: Dump cgraph_node UID instead of order into ipa-clones dump file

2025-04-30 Thread Martin Jambor
Hi, On Wed, Apr 30 2025, Michal Jires wrote: > 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, &g

[PATCH 5/5] ipa: Drop the default value of suffix parameter of create_clone (PR119852)

2025-04-28 Thread Martin Jambor
/ChangeLog: 2025-04-25 Martin Jambor PR ipa/119852 * cgraph.h (cgraph_node::create_clone): Remove the default value of argument suffix. Update function comment. * cgraphclones.cc (cgraph_node::create_clone): Update function comment. * ipa-inline-transform.cc

[PATCH 4/5] ipa: Fix create_version_clone_with_body declaration and comment

2025-04-28 Thread Martin Jambor
(suffix) which is also used in related functions. The patch also updates the function comment in both places because it clearly became out of date. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2025-04-25 Martin Jambor * cgraph.h (cgraph_node

[PATCH 3/5] ipa: Dump cgraph_node UID instead of order into ipa-clones dump file

2025-04-28 Thread Martin Jambor
for master and gcc 15? Thanks, Martin gcc/ChangeLog: 2025-04-23 Martin Jambor * cgraph.h (symtab_node): Make member function get_uid const. * cgraphclones.cc (dump_callgraph_transformation): Dump m_uid of the call graph nodes instead of order. * cgraph.cc

[PATCH 2/5] ipa: Do not emit info about temporary clones to ipa-clones dump (PR119852)

2025-04-28 Thread Martin Jambor
put either. Bootstrapped and tested on x86_64-linux. OK for master and gcc 15, 14 and 13? Thanks, Martin gcc/ChangeLog: 2025-04-23 Martin Jambor PR ipa/119852 * cgraphclones.cc (dump_callgraph_transformation): Document the function. Do not dump if suffix is NULL. gcc

[PATCH 1/5] Document option -fdump-ipa-clones

2025-04-28 Thread Martin Jambor
make html and manually inspecting the output. Is it perhaps OK for master and the branches or what would better be changed? Thanks, Martin gcc/ChangeLog: 2025-04-23 Martin Jambor * doc/invoke.texi (Developer Options): Document -fdump-ipa-clones. --- gcc/doc/invoke

Re: [PATCH 2/2] icf: Remove unused constructors of sem_function and sem_variable

2025-04-22 Thread Martin Jambor
Hi, On Thu, Apr 17 2025, Andrew Pinski wrote: > The constructors for sem_function and sem_variable that just > passes the bitmap obstack and NOT the cgraph node was unused > so let's remove it. > > gcc/ChangeLog: > > * ipa-icf.cc (sem_function::sem_function): Remove > the obstack argum

Re: [PATCH 1/2] icf: Remove nop code from sem_function::init.

2025-04-22 Thread Martin Jambor
Hi, On Thu, Apr 17 2025, Andrew Pinski wrote: > Here we had: > node = node; > Which does nothing so let's remove it. > > gcc/ChangeLog: > > * ipa-icf.cc (sem_function::init): Remove assignment of node from > itself. I'm not sure if you meant to push this as obvious or whether you were lo

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Martin Jambor
Hi, On Tue, Apr 15 2025, Jakub Jelinek wrote: > On Tue, Apr 15, 2025 at 02:17:46PM +0200, Martin Jambor wrote: >> Hi, >> >> On Tue, Apr 15 2025, Jakub Jelinek wrote: >> > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: >> >> This patch j

[PATCH] ipa-bit-cp: Fix adjusting value according to mask (PR119803)

2025-04-15 Thread Martin Jambor
. Thanks, Martin gcc/ChangeLog: 2025-04-15 Martin Jambor PR ipa/119803 * ipa-cp.cc (ipcp_bits_lattice::meet_with_1): Move m_value adjustmed according to m_mask below the adjustment of the latter according to cap_mask. Optimize the calculation of cap_mask a bit

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Martin Jambor
Hi, On Tue, Apr 15 2025, Jakub Jelinek wrote: > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: >> This patch just introduces a form of dumping of widest ints that only >> have zeros in the lowest 128 bits so that instead of printing >> thousands of f&#x

Re: [PATCH 2/7] ipa-cp: Make propagation of bits in IPA-CP aware of type conversions (PR119318)

2025-04-11 Thread Martin Jambor
Hello, On Wed, Apr 09 2025, Martin Jambor wrote: > Hi, > > On Tue, Apr 08 2025, Jan Hubicka wrote: >>> After the propagation of constants and value ranges, it turns out >>> that the propagation of known bits also needs to be made aware of any >>> interm

Re: [PATCH 1/7] ipa: Record and stream result types of arithemetic jump functions

2025-04-11 Thread Martin Jambor
>> >> Thanks, >> >> Martin >> >> >> gcc/ChangeLog: >> >> 2025-03-20 Martin Jambor >> >> PR ipa/118097 >> PR ipa/118785 >> PR ipa/119318 >> * ipa-prop.h (ipa_pass_through_data): New fiel

Re: [PATCH 1/7] ipa: Record and stream result types of arithemetic jump functions

2025-04-08 Thread Martin Jambor
>> >> Thanks, >> >> Martin >> >> >> gcc/ChangeLog: >> >> 2025-03-20 Martin Jambor >> >> PR ipa/118097 >> PR ipa/118785 >> PR ipa/119318 >> * ipa-prop.h (ipa_pass_through_data): New fiel

Re: [PATCH 2/7] ipa-cp: Make propagation of bits in IPA-CP aware of type conversions (PR119318)

2025-04-08 Thread Martin Jambor
s precision there. This implements just that, using the >> newly collected and streamed types of the operations involved. >> >> Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for >> master? >> >> Thanks, >> >> Martin >> >

Re: [PATCH] sra: Avoid creating TBAA hazards (PR118924)

2025-04-07 Thread Martin Jambor
Hi, On Tue, Apr 01 2025, Richard Biener wrote: > On Mon, 31 Mar 2025, Martin Jambor wrote: > >> Hi, >> >> the testcase in PR 118924, when compiled on Aarch64, contains an >> gimple aggregate assignment statement in between different types which >> are types

[PATCH] sra: Avoid creating TBAA hazards (PR118924)

2025-04-05 Thread Martin Jambor
ll active release branches? Thanks, Martin gcc/ChangeLog: 2025-03-24 Martin Jambor PR tree-optimization/118924 * tree-ssa-alias-compare.h (types_equal_for_same_type_for_tbaa_p): Declare. * tree-ssa-alias.cc (types_equal_for_same_type_for_tbaa_p): Make pub

[RFC PATCH 6/7] ipa: Remove type checks in arithmetic pass-through jfunc construction

2025-03-31 Thread Martin Jambor
-21 Martin Jambor * ipa-prop.cc (compute_complex_assign_jump_func): Remove test for comparison operation or type compatibility of LHS and RHS1. (analyze_agg_content_value): Likewise. --- gcc/ipa-prop.cc | 11 +-- 1 file changed, 1 insertion(+), 10 deletions

[PATCH 4/7] ipa-cp: Use the stored and streamed pass-through types in ipa-vr (PR118785)

2025-03-31 Thread Martin Jambor
This patch revisits the fix for PR 118785 and intead of deducing the necessary operation type it just uses the value collected and streamed by an earlier patch. gcc/ChangeLog: Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for master? Thanks, Martin 2025-03-20 Martin

[PATCH 1/7] ipa: Record and stream result types of arithemetic jump functions

2025-03-31 Thread Martin Jambor
signedness. This patch does the recorsing and streaming, the following one adds the use of the date. Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2025-03-20 Martin Jambor PR ipa/118097 PR ipa/118785 PR ipa

[PATCH 2/7] ipa-cp: Make propagation of bits in IPA-CP aware of type conversions (PR119318)

2025-03-31 Thread Martin Jambor
streamed types of the operations involved. Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2025-03-20 Martin Jambor PR ipa/119318 * ipa-cp.cc (ipcp_bits_lattice::meet_with_1): Set all mask bits not covered by

[PATCH 5/7] ipa-cp: Use the collected pass-through types to propagate constants (PR118097)

2025-03-31 Thread Martin Jambor
: 2025-03-20 Martin Jambor PR ipa/118097 * ipa-cp.cc (ipa_get_jf_arith_result): Require res_operand for anything except NOP_EXPR or ADDR_EXPR, document it and remove the code trying to deduce it. (ipa_value_from_jfunc): Use the stored and streamed type of

[RFC PATCH 7/7] ipa: Allow a type conversion in construction of aggregate jump functions

2025-03-31 Thread Martin Jambor
case. Bootstrapped and tested and LTO bootstrapped on x86_64-linux but my plan is to propose this only in the next stage 1. Thanks, Martin gcc/ChangeLog: 2025-03-24 Martin Jambor * ipa-prop.cc (is_a_safe_conversion_stmt_p): New function. (skip_a_safe_conversion_op): Moved up

[PATCH 3/7] ipa-cp: Make dumping of widest_ints even more sane

2025-03-31 Thread Martin Jambor
e the function not only to print bits but also to print masks where values like these can also occur. Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2025-03-21 Martin Jambor * ipa-cp.cc (ipcp_print_widest_int): Also

[PATCH 0/7] Fix PRs 118097, 118785 and 119318 by storing and streaming operation type

2025-03-31 Thread Martin Jambor
type rather than relying on expr_type_first_operand_type_p. The last two patches in the series are only meant as an RFC and I'd like to commit them only in the next stage 1 as they then take the approach one step further and allow for more propagation. Martin Martin Jambor (7): ipa: Recor

[PATCH] sra: Clear grp_same_access_path of acesses created by total scalarization (PR118924)

2025-03-31 Thread Martin Jambor
. Bootstrapped on x86_64-linux and Aarch64-linux. OK for master and then for all active release branches? Thanks, Martin gcc/ChangeLog: 2025-03-26 Martin Jambor PR tree-optimization/118924 * tree-sra.cc (create_total_scalarization_access): Set grp_same_access_path flag to zero

Re: [PATCH] testsuite: add testcase for recent alias fix

2025-03-25 Thread Martin Jambor
Hi, On Tue, Mar 25 2025, Sam James wrote: > r15-7961-gdc47161c1f32c3 fixes a typo in ao_compare::compare_ao_refs > but there wasn't a testcase available at the time. Now there is. > > Thanks to Andrew for the testcase. > > gcc/testsuite/ChangeLog: > PR testsuite/119382 > > * gcc.dg/ipa

[PATCH] ipa: Do not modify cgraph edges from thunk clones during inlining (PR116572)

2025-03-14 Thread Martin Jambor
on x86_64. It has been approved by Honza in person so I will commit it a few moments. I also plan to backport it to gcc-14 in a few weeks. Thanks, Martin gcc/ChangeLog: 2025-03-13 Martin Jambor PR ipa/116572 * cgraph.cc (cgraph_update_edges_for_call_stmt): Do not update

Re: [PATCH] Fix a pasto in ao_compare::compare_ao_refs

2025-03-14 Thread Martin Jambor
On Thu, Mar 13 2025, Richard Biener wrote: > On Mon, Mar 10, 2025 at 11:59 PM Martin Jambor wrote: >> >> Hi, >> >> when reading the function ao_compare::compare_ao_refs I came accross >> what I believe to ba a copy-and-paste error which this patch fixes. >>

[PATCH] Fix a pasto in ao_compare::compare_ao_refs

2025-03-10 Thread Martin Jambor
Hi, when reading the function ao_compare::compare_ao_refs I came accross what I believe to ba a copy-and-paste error which this patch fixes. Bootstrapped, LTO-bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2025-03-10 Martin Jambor * tree

Re: [PATCH] ipa-cp: Avoid ICE when redistributing nodes among edges to recursive clones (PR 118318)

2025-03-07 Thread Martin Jambor
Hello, On Mon, Mar 03 2025, Martin Jambor wrote: > Hi, > > PR 118318 reported an ICE during PGO build of Firefox when IPA-CP, in > the final stages of update_counts_for_self_gen_clones where it > attempts to guess how to distribute profile count among clones created > for recur

[PATCH] ipa-cp: Avoid ICE when redistributing nodes among edges to recursive clones (PR 118318)

2025-03-03 Thread Martin Jambor
does. Bootstrapped and LTO-profile-bootstrapped and tested on x86_64. OK for master? (Should I then backport this to active release branches? I guess it would make sense.) Thanks, Martin gcc/ChangeLog: 2025-02-28 Martin Jambor PR ipa/118318 * ipa-cp.cc

Re: [PATCH] ipa-vr: Handle non-conversion unary ops separately from conversions (PR 118756)

2025-02-26 Thread Martin Jambor
Hello, On Tue, Feb 25 2025, Jakub Jelinek wrote: > On Tue, Feb 25, 2025 at 04:48:37PM +0100, Martin Jambor wrote: >> --- /dev/null >> +++ b/gcc/testsuite/g++.dg/lto/pr118785_0.C >> @@ -0,0 +1,14 @@ >> +// { dg-lto-do link } >> +// { dg-require-effective-target fpi

[PATCH] ipa-vr: Handle non-conversion unary ops separately from conversions (PR 118756)

2025-02-25 Thread Martin Jambor
/ChangeLog: 2025-02-24 Martin Jambor PR ipa/118785 * ipa-cp.cc (ipa_vr_intersect_with_arith_jfunc): Handle non-conversion unary operations separately before doing any conversions. Check expr_type_first_operand_type_p for non-unary operations too. Fix type

Re: [PATCH] ipa-sra: Avoid clashes with ipa-cp when pulling accesses across calls (PR 118243)

2025-02-24 Thread Martin Jambor
Hello, and ping please. Thanks, Martin On Mon, Feb 10 2025, Martin Jambor wrote: > Hello, > > among other things, IPA-SRA checks whether splitting out a bit of an > aggregate or something passed by reference would lead into a clash > with an already known IPA-CP constant a

Re: rs6000: Add -msplit-patch-nops (PR112980)

2025-02-12 Thread Martin Jambor
Hello, On Fri, Jan 10 2025, Martin Jambor wrote: > Hello, > > On Wed, Dec 11 2024, Martin Jambor wrote: >> Hello, >> >> even though it is not my work, I would like to ping this patch. Having >> it upstream would really help us a lot. >> > > Please, p

[PATCH] lto: Add an entry for cold attribute to lto_gnu_attributes

2025-02-10 Thread Martin Jambor
g assert to the redirect_to_unreachable function to make sure it has the intended effect. LTO-bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2025-02-03 Martin Jambor PR lto/118125 * ipa-fnsummary.cc (redirect_to_unreachable): Add checking asse

[PATCH] ipa-sra: Avoid clashes with ipa-cp when pulling accesses across calls (PR 118243)

2025-02-10 Thread Martin Jambor
master and (assuming it applies cleanly and passes the checks there too) to all active release branches? Thanks, Martin gcc/ChangeLog: 2025-02-10 Martin Jambor PR ipa/118243 * ipa-sra.cc (pull_accesses_from_callee): New parameters caller_ipcp_ts and param_idx. Check

Re: [PATCH] ipa-cp: Perform operations in the appropriate types (PR 118097)

2025-02-07 Thread Martin Jambor
Hello, and a gentle ping, please. Martin On Fri, Jan 24 2025, Martin Jambor wrote: > Hi, > > the following version of the patch has one of the testcase adjusted to > use long long and so pass also on 32bit i386 (and hopefully 32bit Arm > too), otherwise it has not changed from w

Re: [PATCH v2 1/7] Add tunables for input buffer

2025-02-04 Thread Martin Jambor
Hello Andi, On Sat, Jan 25 2025, Andi Kleen wrote: > From: Andi Kleen > > The input machinery to read the source code independent of the lexer > has a range of hard coded maximum array sizes that can impact performance. > Make them tunable. > > input.cc is part of libcommon so it cannot direct ac

Re: [PATCH] tree-ssa-dce: Avoid creating invalid BBs with no outgoing edge (PR117892)

2025-01-28 Thread Martin Jambor
Hi, On Tue, Jan 28 2025, Richard Biener wrote: > On Mon, 27 Jan 2025, Martin Jambor wrote: > >> Hi, >> >> Zhendong Su and Michal Jireš found out that our gimple DSE pass can, >> under fairly specific conditions, remove a noreturn call which then >> leaves be

[PATCH] tree-ssa-dce: Avoid creating invalid BBs with no outgoing edge (PR117892)

2025-01-27 Thread Martin Jambor
alone even when they otherwise appear to be dead. Interestingly, our CFG verifier does not report this. I'll put on my todo list to add a test for it in the next stage 1. Bootstrapped and tested on x86_64-linux, OK for master? Thanks, Martin gcc/ChangeLog: 2025-01-27 Martin Jambor

Re: [PATCH] ipa-cp: Perform operations in the appropriate types (PR 118097)

2025-01-24 Thread Martin Jambor
and allow conversions like for scalars. gcc/ChangeLog: 2025-01-20 Martin Jambor PR ipa/118097 * ipa-cp.cc (ipa_get_jf_arith_result): Adjust comment. (ipa_get_jf_pass_through_result): Removed. (ipa_value_from_jfunc): Use directly ipa_get_jf_arith_result,

[PATCH] ipa-cp: Perform operations in the appropriate types (PR 118097)

2025-01-22 Thread Martin Jambor
GCC 16, we could relax this and allow conversions like for scalars. Bootstrapped, LTO-bootstrapped and tested on x86_64-linux. OK for master? Thanks, Honza gcc/ChangeLog: 2025-01-20 Martin Jambor PR ipa/118097 * ipa-cp.cc (ipa_get_jf_arith_result): Adjust comment

[PATCH] MAINTAINERS: Make contrib/check-MAINTAINERS.py happy

2025-01-13 Thread Martin Jambor
This commit makes the contrib/check-MAINTAINERS.py script happy about our MAINTAINERS file. I hope that it knows best how things ought to be and so am committing this as obvious. ChangeLog: 2025-01-13 Martin Jambor * MAINTAINERS: Fix the name order of the Write After Approval

Re: rs6000: Add -msplit-patch-nops (PR112980)

2025-01-10 Thread Martin Jambor
Hello, On Wed, Dec 11 2024, Martin Jambor wrote: > Hello, > > even though it is not my work, I would like to ping this patch. Having > it upstream would really help us a lot. > Please, pretty please, consider reviewing this in time for GCC 15, having it upstream would really he

[PATCH] ipa-cp: Fold-convert values when necessary (PR 118138)

2025-01-04 Thread Martin Jambor
? Thanks, Martin gcc/ChangeLog: 2025-01-03 Martin Jambor PR ipa/118138 * ipa-cp.cc (ipacp_value_safe_for_type): Return the appropriate type instead of a bool, accept NULL_TREE VALUEs. (propagate_vals_across_arith_jfunc): Use the new returned value of

Subject: [PATCH] ipa-cp: Make dumping of bit masks representing -1 nicer

2025-01-04 Thread Martin Jambor
er now? Thanks, Martin gcc/ChangeLog: 2025-01-03 Martin Jambor * ipa-cp.cc (ipcp_print_widest_int): New function. (ipcp_store_vr_results): Use it. (ipcp_bits_lattice::print): Likewise. Fix formatting. --- gcc/ipa-cp.cc | 20 +--- 1 file changed, 17 i

Re: [PATCH 4/8] ipa: Better value ranges for zero pointer constants

2024-12-17 Thread Martin Jambor
On Fri, Nov 15 2024, Martin Jambor wrote: > Hi, > > On Thu, Nov 07 2024, Aldy Hernandez wrote: >> Jan Hubicka writes: >> >>>> > 2024-11-01 Martin Jambor >>>> > >>>> > * ipa-prop.cc (ipa_compute_jump_functions_for_edge

Re: [PATCH 8/8] ipa: Improve how we derive value ranges from IPA invariants

2024-12-17 Thread Martin Jambor
n progress. OK for master is that passes too? >> >> Thanks, >> >> Martin >> >> >> gcc/ChangeLog: >> >> 2024-11-04 Martin Jambor >> >> * ipa-prop.h (ipa_get_range_from_ip_invariant): Declare. >> (ipa_ran

Re: [PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-12-17 Thread Martin Jambor
Hi, On Tue, Dec 03 2024, Richard Biener wrote: > On Tue, Dec 3, 2024 at 12:09 PM Martin Jambor wrote: >> On Fri, Nov 15 2024, Richard Biener wrote: >> > On Fri, Nov 15, 2024 at 1:45 PM Jan Hubicka wrote: >> >> > >> >> > The patch only ever skip

Re: rs6000: Add -msplit-patch-nops (PR112980)

2024-12-11 Thread Martin Jambor
Hello, even though it is not my work, I would like to ping this patch. Having it upstream would really help us a lot. Thank you very much in advance, Martin On Wed, Nov 13 2024, Michael Matz wrote: > Hello, > > this is essentially > > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/6510

Re: [PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-12-03 Thread Martin Jambor
Hi, sorry for re-posting this but my mail client broke threading when saving the email as Draft somehow and I really hope to still get this testcase working for GCC 15: On Fri, Nov 15 2024, Richard Biener wrote: > On Fri, Nov 15, 2024 at 1:45 PM Jan Hubicka wrote: >> > >> > The patch only ever s

Re: [PATCH 4/8] ipa: Better value ranges for zero pointer constants

2024-11-28 Thread Martin Jambor
Hi, On Fri, Nov 15 2024, Martin Jambor wrote: > Hi, > > On Thu, Nov 07 2024, Aldy Hernandez wrote: >> Jan Hubicka writes: >> >>>> > 2024-11-01 Martin Jambor >>>> > >>>> > * ipa-prop.cc (ipa_compute_jump_function

Re: [PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-11-27 Thread Martin Jambor
Hi, On Fri, Nov 15 2024, Richard Biener wrote: > On Fri, Nov 15, 2024 at 1:45 PM Jan Hubicka wrote: >> >> > >> > The patch only ever skips just one conversion, never a chain of them and >> > deliberately so, for the reasons shown in the example. >> > >> > However, I have just realized that combin

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-27 Thread Martin Jambor
Hello, I believe all questions regarding the patch below have been answered and so I would like to ping it. Thanks, Martin On Tue, Nov 05 2024, Martin Jambor wrote: > Hi, > > when inlining (during the analysis phase) a call graph edge, we update > all pass-through jump functions c

Re: [COMMITED] [lto] ipcp don't propagate where not needed

2024-11-27 Thread Martin Jambor
On Wed, Nov 06 2024, Michal Jires wrote: > 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: >>

Re: [PATCH 7/8] ipa: Verify that const jump functions have corresponding value range

2024-11-18 Thread Martin Jambor
Hi, On Thu, Nov 07 2024, Aldy Hernandez wrote: > Aldy Hernandez writes: > >> Martin Jambor writes: >> >>> Hi, >>> >>> Because the simplified way of extracting value ranges from functions >>> does not look at scalar constants (as one of the v

Re: [PATCH 4/8] ipa: Better value ranges for zero pointer constants

2024-11-15 Thread Martin Jambor
Hi, On Thu, Nov 07 2024, Aldy Hernandez wrote: > Jan Hubicka writes: > >>> > 2024-11-01 Martin Jambor >>> > >>> > * ipa-prop.cc (ipa_compute_jump_functions_for_edge): When creating >>> > value-range jump functions from po

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Martin Jambor
Hi, On Fri, Nov 15 2024, Jan Hubicka wrote: >> >> On 11/15/24 10:19, Jan Hubicka wrote: >> > > I have seen this happen when the result of the intersection is an empty >> > > set (one of the few comments in value-range.h actually describes an >> > > undefined range as an "empty range"). I have on

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Martin Jambor
ally passed LTO and profiled-LTO bootstrap on the same platform >> and a bootstrap and testsuite on ppc64-linux. Aarch64-linux bootstrap >> and testing is in progress. OK for master is that passes too? >> >> Thanks, >> >> Martin >> >> >&

Re: [PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-11-14 Thread Martin Jambor
Hi, On Tue, Nov 05 2024, Jan Hubicka wrote: >> gcc/ChangeLog: >> >> 2024-11-01 Martin Jambor >> >> * ipa-prop.cc (skip_a_conversion_op): New function. >> (ipa_compute_jump_functions_for_edge): Use it. >> >> gcc/tests

Re: [PATCH] tree-sra: Avoid SRAing arguments to a function returning_twice (PR 117142)

2024-11-14 Thread Martin Jambor
-linux when applied on top of the gcc-13 release branch and I plan to commit it there tomorrow. After some two more weeks I plan to do the same on top of gcc-12. Martin gcc/ChangeLog: 2024-11-14 Martin Jambor PR tree-optimization/117142 * tree-sra.cc (scan_function): Disqualify

Re: [PATCH 1/8] ipa: Fix jump function copying

2024-11-14 Thread Martin Jambor
Hello Josef, On Tue, Nov 05 2024, Josef Melcr wrote: > Hi! > > On 11/5/24 12:06, Martin Jambor wrote: >> +/* Copy information from SRC_JF to DST_JF which correstpond to call graph >> edges >> + SRC and DST. */ >> + >> +static void >> +ipa_duplicate

[PATCH] ipa-cp: Fix constant dumping

2024-11-14 Thread Martin Jambor
d overloaded variant though it uses the printing function added in the aforementioned commit instead of printing it itself. gcc/ChangeLog: 2024-11-13 Martin Jambor * ipa-prop.h (ipa_print_constant_value): Declare. * ipa-prop.cc (ipa_print_constant_value): Make public.

Re: [PATCH 7/8] ipa: Verify that const jump functions have corresponding value range

2024-11-05 Thread Martin Jambor
On Tue, Nov 05 2024, Jan Hubicka wrote: >> 2024-11-04 Martin Jambor >> >> * ipa-cp.cc (ipa_check_const_jf_vr): New function. >> (ipa_value_range_from_jfunc): Call it when checking and when >> dealing with a constant jump function. >>

[PATCH 8/8] ipa: Improve how we derive value ranges from IPA invariants

2024-11-05 Thread Martin Jambor
bootstrap on the same platform and a bootstrap and testsuite on ppc64-linux. Aarch64-linux bootstrap and testing is in progress. OK for master is that passes too? Thanks, Martin gcc/ChangeLog: 2024-11-04 Martin Jambor * ipa-prop.h (ipa_get_range_from_ip_invariant): Declare

[PATCH 7/8] ipa: Verify that const jump functions have corresponding value range

2024-11-05 Thread Martin Jambor
passed LTO and profiled-LTO bootstrap on the same platform and a bootstrap and testsuite on ppc64-linux. Aarch64-linux bootstrap and testing is in progress. OK for master is that passes too? Thanks, Martin gcc/ChangeLog: 2024-11-04 Martin Jambor * ipa-cp.cc (ipa_check_const_jf_vr): New

[PATCH 6/8] ipa: Introduce a one jump function dumping function

2024-11-05 Thread Martin Jambor
? Thanks, Martin gcc/ChangeLog: 2024-11-01 Martin Jambor * ipa-prop.h (ipa_dump_jump_function): Declare. * ipa-prop.cc (ipa_dump_jump_function): New function. (ipa_print_node_jump_functions_for_edge): Move printing of individual jump functions to the new function

[PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-05 Thread Martin Jambor
passes too? Thanks, Martin gcc/ChangeLog: 2024-11-01 Martin Jambor * ipa-cp.h: Forward declare class ipa_vr. (ipa_vr_operation_and_type_effects) Declare. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Make public. * ipa-prop.cc

[PATCH 4/8] ipa: Better value ranges for zero pointer constants

2024-11-05 Thread Martin Jambor
ed on x86_64-linux, the whole patch series has additionally passed LTO and profiled-LTO bootstrap on the same platform and a bootstrap and testsuite on ppc64-linux. Aarch64-linux bootstrap and testing is in progress. OK for master is that passes too? Thanks, Martin gcc/ChangeLog: 2024-11-01 M

[PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-11-05 Thread Martin Jambor
, the whole patch series has additionally passed LTO and profiled-LTO bootstrap on the same platform and a bootstrap and testsuite on ppc64-linux. Aarch64-linux bootstrap and testing is in progress. OK for master is that passes too? Thanks, Martin gcc/ChangeLog: 2024-11-01 Martin Jambor

[PATCH 2/8] ipa: Rationalize IPA-VR computations across pass-through jump functions

2024-11-05 Thread Martin Jambor
, the whole patch series has additionally passed LTO and profiled-LTO bootstrap on the same platform and a bootstrap and testsuite on ppc64-linux. Aarch64-linux bootstrap and testing is in progress. OK for master is that passes too? Thanks, Martin gcc/ChangeLog: 2024-11-01 Martin Jambor

[PATCH 1/8] ipa: Fix jump function copying

2024-11-05 Thread Martin Jambor
. Thanks, Martin gcc/ChangeLog: 2024-11-01 Martin Jambor * ipa-prop.cc (ipa_duplicate_jump_function): New function. (ipa_edge_args_sum_t::duplicate): Move individual jump function copying to ipa_duplicate_jump_function. --- gcc/ipa-prop.cc | 187

[PATCH] tree-sra: Avoid SRAing arguments to a function returning_twice (PR 117142)

2024-10-22 Thread Martin Jambor
. OK for master and all active release branches (though for gcc 13 and 12 the condition will probable be elsewhere, IIRC)? Thanks, Martin gcc/ChangeLog: 2024-10-21 Martin Jambor PR tree-optimization/117142 * tree-sra.cc (build_access_from_call_arg): Disqualify any

Re: [PATCH] testsuite: Add necessary dejagnu directives to pr115815_0.c

2024-10-18 Thread Martin Jambor
Hi, On Mon, Oct 14 2024, Martin Jambor wrote: > Hi, > > I have received an email from the Linaro infrastructure that the test > gcc.dg/lto/pr115815_0.c which I added is failing on arm-eabi and I > realized that not only it is missing dg-require-effective-target > global_constr

[PATCH] testsuite: Add necessary dejagnu directives to pr115815_0.c

2024-10-14 Thread Martin Jambor
: make -k check-gcc RUNTESTFLAGS="lto.exp=*pr115815*" OK for master (and than to be part of the backports which I still need to do)? Thanks, Martin gcc/testsuite/ChangeLog: 2024-10-14 Martin Jambor * gcc.dg/lto/pr115815_0.c: Add dejagu directives. --- gcc/testsuite/

[PATCH 2/2] ipa-cp: One more use of ipa_vr_supported_type_p

2024-09-11 Thread Martin Jambor
Hi, Since we have the predicate, this patch converts one more check for essentially the same thing into its use. It has passed a bootstrap and testsuite on x86_64. I believe it is obvious enough that I can commit it myself and so will do so later today. Thanks, Martin 2024-09-11 Martin

[PATCH 1/2] ipa: Rename ipa_supports_p to ipa_vr_supported_type_p

2024-09-11 Thread Martin Jambor
, Martin gcc/ChangeLog: 2024-09-06 Martin Jambor * ipa-cp.h (ipa_supports_p): Rename to ipa_vr_supported_type_p. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Adjust called function name. (propagate_vr_across_jump_function): Likewise. * ipa-prop.cc

Re: PING^5 [PATCH] rs6000: Adjust -fpatchable-function-entry* support for dual entry [PR112980]

2024-08-27 Thread Martin Jambor
Hi, On Fri, Aug 09 2024, Kewen.Lin wrote: > Hi, > > Gentle ping this patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651025.html I'd like to second this ping, please. Thank you, Martin > > BR, > Kewen > >>> on 2024/7/12 00:15, Martin J

Re: [PATCH 2/2] ipa: Move pass_ipa_cdtor_merge before pass_ipa_cp and pass_ipa_sra

2024-08-27 Thread Martin Jambor
Hello, and ping please. Martin On Fri, Aug 09 2024, Martin Jambor wrote: > Hello, > > and ping please. > > Martin > > On Fri, Jul 26 2024, Martin Jambor wrote: >> Hi, >> >> when looking at PR 115815 we realized that it would make sense to make >>

Re: [PATCH 1/2] ipa: Treat static constructors and destructors as non-local (PR 115815)

2024-08-27 Thread Martin Jambor
Hello, and ping please. Martin On Fri, Aug 09 2024, Martin Jambor wrote: > Hello, > > and ping please. > > Martin > > On Fri, Jul 26 2024, Martin Jambor wrote: >> Hi, >> >> in PR 115815, IPA-SRA thought it had control over all invocations of a >>

[PATCH] sra: Avoid risking x87 magling binary representation of a replacement (PR 58416)

2024-08-19 Thread Martin Jambor
, unfortunately. Thanks, Martin gcc/ChangeLog: 2024-08-19 Martin Jambor PR target/58416 * tree-sra.cc (types_risk_mangled_binary_repr_p): New function. (sort_and_splice_var_accesses): Use it. (propagate_subaccesses_from_rhs): Likewise. gcc/testsuite/ChangeLog

Re: [PATCH 2/2] ipa: Move pass_ipa_cdtor_merge before pass_ipa_cp and pass_ipa_sra

2024-08-09 Thread Martin Jambor
Hello, and ping please. Martin On Fri, Jul 26 2024, Martin Jambor wrote: > Hi, > > when looking at PR 115815 we realized that it would make sense to make > calls to functions originally declared static constructors and > destructors created by pass_ipa_cdtor_merge visible to

Re: [PATCH 1/2] ipa: Treat static constructors and destructors as non-local (PR 115815)

2024-08-09 Thread Martin Jambor
Hello, and ping please. Martin On Fri, Jul 26 2024, Martin Jambor wrote: > Hi, > > in PR 115815, IPA-SRA thought it had control over all invocations of a > (recursive) static destructor but it did not see the implied > invocation which led to the original being left behind and

[PATCH 2/2] ipa: Move pass_ipa_cdtor_merge before pass_ipa_cp and pass_ipa_sra

2024-07-26 Thread Martin Jambor
, Martin gcc/ChangeLog: 2024-07-25 Martin Jambor * passes.def: Move pass_ipa_cdtor_merge before pass_ipa_cp and pass_ipa_sra. --- gcc/passes.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/passes.def b/gcc/passes.def index b06d6d45f63..33b2c10c9c9 100644

[PATCH 1/2] ipa: Treat static constructors and destructors as non-local (PR 115815)

2024-07-26 Thread Martin Jambor
: 2024-07-25 Martin Jambor PR ipa/115815 * cgraph.cc (cgraph_node_cannot_be_local_p_1): Also check DECL_STATIC_CONSTRUCTOR and DECL_STATIC_DESTRUCTOR. * ipa-visibility.cc (non_local_p): Likewise. (cgraph_node::local_p): Delete extraneous line of tabs

Re: [PATCH] rs6000: Adjust -fpatchable-function-entry* support for dual entry [PR112980]

2024-07-11 Thread Martin Jambor
Hi, can I add myself to the bunch of people who are pinging this? Having this in will make our life easier. Thanks a lot, Martin On Wed, May 08 2024, Kewen.Lin wrote: > Hi, > > As the discussion in PR112980, although the current > implementation for -fpatchable-function-entry* conforms > with

[commited, gcc13] ipa: Compare jump functions in ICF (PR 113907)

2024-05-14 Thread Martin Jambor
-13 branch. Martin gcc/ChangeLog: 2024-05-14 Martin Jambor PR ipa/113907 * ipa-prop.h (ipa_jump_functions_equivalent_p): Declare. (values_equal_for_ipcp_p): Likewise. * ipa-prop.cc (ipa_agg_pass_through_jf_equivalent_p): New function

[PATCH] sra: Do not leave work for DSE (that it can sometimes not perform)

2024-05-03 Thread Martin Jambor
benefit, could it possibly be backported to gcc-14 branch even if it is not a regression (at least not in the last decade) in a few weeks? Thanks, Martin gcc/ChangeLog: 2024-04-18 Martin Jambor * tree-sra.cc (sra_modify_assign): Remove the original statement also when dealing

Re: [wwwdocs] Add znver5 to GCC 14 changes

2024-05-03 Thread Martin Jambor
Hi Gerald, On Fri, May 03 2024, Gerald Pfeifer wrote: > Hi Martin, > > On Thu, 2 May 2024, Martin Jambor wrote: >> + GCC now supports AMD CPUs based on the znver5 core via >> +-march=znver5. Based on ISA extensions enabled on >> +a znver4 core, the switch

[wwwdocs] Add znver5 to GCC 14 changes

2024-05-02 Thread Martin Jambor
Hello, based on input from AMD, I'd like to commit the following to the wwwdocs repo to point out new support for Zen 5 based AMD CPUs in GCC 14? Is it OK? Any suggestions, comments or questions? Thanks, Martin diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 8dfbf

Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior

2024-05-02 Thread Martin Jambor
Hi, On Wed, May 01 2024, Gerald Pfeifer wrote: > On Tue, 30 Apr 2024, Martin Jambor wrote: >> +Pragma GCC Target now affects preprocessor >> symbols > > Note the id: should be "gcc-target-pragma", though I even suggest to > simplify and say "target-pr

Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior

2024-04-30 Thread Martin Jambor
Hi, On Thu, Apr 25 2024, Jakub Jelinek wrote: > On Thu, Apr 25, 2024 at 02:34:22PM +0200, Martin Jambor wrote: >> when looking at a package build issue with GCC 14, Michal Jireš noted a >> different behavior of pragma GCC Target. This snippet tries to describe >> the gist of

[wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior

2024-04-25 Thread Martin Jambor
Hello, when looking at a package build issue with GCC 14, Michal Jireš noted a different behavior of pragma GCC Target. This snippet tries to describe the gist of the problem. I have left it in the C section even though it is not really C specific, but could not think of a good name for a new se

  1   2   3   4   5   6   7   8   9   10   >