[COMMITTED] Return TRUE only when a global value is updated.

2023-10-03 Thread Andrew MacLeod
range but turns out it was really being set in DOM2.   Instead they check for the range in the final listing... Bootstrapped on  x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From dae5de2a2353b928cc7099a78d88a40473abefd2 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 27 Sep

[COMMITTED] Remove pass counting in VRP.

2023-10-03 Thread Andrew MacLeod
ng on there) Bootstraps  on x86_64-pc-linux-gnu with no regressions.   Pushed. Andrew From 29abc475a360ad14d5f692945f2805fba1fdc679 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 28 Sep 2023 09:19:32 -0400 Subject: [PATCH 2/5] Remove pass counting in VRP. Rather than using a pass cou

Re: [COMMITTED] Return TRUE only when a global value is updated.

2023-10-03 Thread Andrew MacLeod
huh.  thanks,  I'll have a look. Andrew On 10/3/23 11:47, David Edelsohn wrote: This patch caused a bootstrap failure on AIX. during GIMPLE pass: evrp /nasfarm/edelsohn/src/src/libgcc/libgcc2.c: In function '__gcc_bcmp': /nasfarm/edelsohn/src/src/libgcc/libgcc2.c:2910:1: internal compiler

Re: [COMMITTED] Return TRUE only when a global value is updated.

2023-10-03 Thread Andrew MacLeod
Give this a try..  I'm testing it here, but x86 doesn't seem to show it anyway for some reason :-P I think i needed to handle pointers special since SSA_NAMES handle pointer ranges different. Andrew On 10/3/23 11:47, David Edelsohn wrote: This patch caused a bootstrap failure on AIX. durin

Re: [COMMITTED] Return TRUE only when a global value is updated.

2023-10-03 Thread Andrew MacLeod
perfect.  I'll check it in when my testrun is done. Thanks  .. .  and sorry :-) Andrew On 10/3/23 12:53, David Edelsohn wrote: AIX bootstrap is happier with the patch. Thanks, David On Tue, Oct 3, 2023 at 12:30 PM Andrew MacLeod wrote: Give this a try..  I'm testing it her

Re: [COMMITTED] Remove pass counting in VRP.

2023-10-03 Thread Andrew MacLeod
On 10/3/23 13:02, David Malcolm wrote: On Tue, 2023-10-03 at 10:32 -0400, Andrew MacLeod wrote: Pass counting in VRP is used to decide when to call early VRP, pass the flag to enable warnings, and when the final pass is. If you try to add additional passes, this becomes quite fragile. This

[COMMITTED] Don't use range_info_get_range for pointers.

2023-10-03 Thread Andrew MacLeod
d8808c37d29110872fa51b98e71aef9e160b4692 Author: Andrew MacLeod Date: Tue Oct 3 12:32:10 2023 -0400 Don't use range_info_get_range for pointers. Pointers only track null and nonnull, so we need to handle them specially. * tree-ssanames.cc (set_range_info): Use get_ptr_inf

[COMMITTED 2/3] Add a dom based ranger for fast VRP.

2023-10-05 Thread Andrew MacLeod
from anywhere. Pushed. Andrew From ad8cd713b4e489826e289551b8b8f8f708293a5b Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 28 Jul 2023 13:18:15 -0400 Subject: [PATCH 2/3] Add a dom based ranger for fast VRP. Provide a dominator based implementation of a range query. * gimple_ran

[COMMITTED 1/3] Add outgoing range vector calculation API.

2023-10-05 Thread Andrew MacLeod
t only looks at whether NAME has a range, and returns it if it does.  not other overhead. Pushed. From 52c1e2c805bc2fd7a30583dce3608b738f3a5ce4 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 15 Aug 2023 17:29:58 -0400 Subject: [PATCH 1/3] Add outgoing range vector calcualtion API Pr

[COMMITTED 3/3] Create a fast VRP pass

2023-10-05 Thread Andrew MacLeod
file with the extension .fvrp. pushed. From f4e2dac53fd62fbf2af95e0bf26d24e929fa1f66 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 2 Oct 2023 18:32:49 -0400 Subject: [PATCH 3/3] Create a fast VRP pass * timevar.def (TV_TREE_FAST_VRP): New. * tree-pass.h (make_pass_fast_vrp): New

[COMMITTED 0/3] Add a FAST VRP pass.

2023-10-05 Thread Andrew MacLeod
the following set of 3 patches provide the infrastructure for a fast vrp pass. The pass is currently not invoked anywhere, but I wanted to get the infrastructure bits in place now... just in case we want to use it somewhere. It clearly bootstraps with no regressions since it isn't being invo

[COMMITTED] Remove unused get_identity_relation.

2023-10-09 Thread Andrew MacLeod
VREL_EQ... as there is only one.  As it stands, always returns VREL_EQ, so simply use VREL_EQ in the 2 calling locations. Bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From 5ee51119d1345f3f13af784455a4ae466766912b Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date

[COMMITTED] PR tree-optimization/111694 - Ensure float equivalences include + and - zero.

2023-10-09 Thread Andrew MacLeod
. Bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From b0892b1fc637fadf14d7016858983bc5776a1e69 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 9 Oct 2023 10:15:07 -0400 Subject: [PATCH 2/2] Ensure float equivalences include + and - zero. A floating point equivalence may not

[COMMITTED][GCC13] PR tree-optimization/111694 - Ensure float equivalences include + and - zero.

2023-10-11 Thread Andrew MacLeod
Similar patch which was checked into trunk last week.   slight tweak needed as dconstm0 was not exported in gcc 13, otherwise functionally the same Bootstrapped on x86_64-pc-linux-gnu.  pushed. Andrew commit f0efc4b25cba1bd35b08b7dfbab0f8fc81b55c66 Author: Andrew MacLeod Date: Mon Oct 9 13

[COMMITTED] PR tree-optimization/111622 - Do not add partial equivalences with no uses.

2023-10-13 Thread Andrew MacLeod
Technically PR 111622 exposes a bug in GCC 13, but its been papered over on trunk by this: commit 9ea74d235c7e7816b996a17c61288f02ef767985 Author: Richard Biener Date: Thu Sep 14 09:31:23 2023 +0200 tree-optimization/111294 - better DCE after forwprop This removes a lot of dead sta

[COMMITTED] [GCC13] PR tree-optimization/111622 - Do not add partial equivalences with no uses.

2023-10-13 Thread Andrew MacLeod
425964b77ab5b9631e914965a7397303215c77a1 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 12 Oct 2023 17:06:36 -0400 Subject: [PATCH] Do not add partial equivalences with no uses. PR tree-optimization/111622 * value-relation.cc (equiv_oracle::add_partial_equiv): Do not register a partial

Re: [COMMITTED] PR tree-optimization/111622 - Do not add partial equivalences with no uses.

2023-10-13 Thread Andrew MacLeod
of course the patch would be handy... On 10/13/23 09:23, Andrew MacLeod wrote: Technically PR 111622 exposes a bug in GCC 13, but its been papered over on trunk by this: commit 9ea74d235c7e7816b996a17c61288f02ef767985 Author: Richard Biener Date:   Thu Sep 14 09:31:23 2023 +0200

[COMMITTED] Faster irange union for appending ranges.

2023-10-25 Thread Andrew MacLeod
.  The result is a 2.1% speedup in VRP and a 0.8% speedup in threading, with a overall compile time improvement of 0.14% across the GCC build. Bootstrapped on  x86_64-pc-linux-gnu with no regressions. Pushed. Andrew commit f7dbf6230453c76a19921607601eff968bb70169 Author: Andrew MacLeod Date

[COMMITTED 1/2] Remove simple ranges from trailing zero bitmasks.

2023-11-03 Thread Andrew MacLeod
those bits with those bits from the value field. Bootstraps on build-x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From b20f1dce46fb8bb1b142e9087530e546a40edec8 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 31 Oct 2023 11:51:34 -0400 Subject: [PATCH 1/2] Remove simple range

[COMMITTED 2/2] PR tree-optimization/111766 - Adjust operators equal and not_equal to check bitmasks against constants

2023-11-03 Thread Andrew MacLeod
] [2, +INF] MASK 0xfffe VALUE 0x1  will indicate that any even constants will be false. Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew From eb899fee35b8326b2105c04f58fd58bbdeca9d3b Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 25 Oct 2023 09:46:50 -0400 Sub

[PATCH][GCC13] PR tree-optimization/105834 - Choose better initial values for ranger.

2023-11-06 Thread Andrew MacLeod
As requested porting this patch from trunk resolves this PR in GCC 13. Bootstraps on x86_64-pc-linux-gnu with no regressions.  OK for the gcc 13 branch? Andrew From 0182a25607fa353274c27ec57ca497c00f1d1b76 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 6 Nov 2023 11:33:32 -0500

Re: always handle pointers in vrp_val*{min,max}

2019-11-04 Thread Andrew MacLeod
On 11/4/19 3:03 PM, Aldy Hernandez wrote: When I added the range-ops code, I had to teach vrp_val_is*{min,max} about pointers, since it would just ignore them and return NULL. I was overly cautious about changing existing behavior and decided to add a handle_pointers argument, with a default va

Re: do not special case pointers while canonicalizing ranges

2019-11-04 Thread Andrew MacLeod
On 11/4/19 5:17 PM, Aldy Hernandez wrote: And now with patch! On 11/4/19 11:15 PM, Aldy Hernandez wrote: There's no need to special case pointers when converting suitable VR_ANTI_RANGE's into VR_RANGE's now that vrp_val*{min, max} handle pointers by default. OK? this seems fine, and skirts

Re: handle symbolics when comparing ranges

2019-11-04 Thread Andrew MacLeod
On 11/4/19 5:23 PM, Aldy Hernandez wrote: value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but symbolics do exist in mainline. Although this isn't causing a problem yet, as soon as someone tries to compare non numeric ranges, we

Re: handle symbolics when comparing ranges

2019-11-04 Thread Andrew MacLeod
On 11/4/19 6:05 PM, Aldy Hernandez wrote: On 11/4/19 11:45 PM, Andrew MacLeod wrote: On 11/4/19 5:23 PM, Aldy Hernandez wrote: value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but symbolics do exist in mainline. Alt

Re: make range_int_cst_p work with any numeric range (VR_ANTI_RANGE, etc)

2019-11-05 Thread Andrew MacLeod
On 11/5/19 9:27 AM, Richard Biener wrote: On Tue, Nov 5, 2019 at 2:15 PM Aldy Hernandez wrote: The function range_int_cst_p only works with VR_RANGE's at the moment. This is silly because VR_ANTI_RANGE and even VR_VARYING can contain numeric bounds. I have fixed this oversight and have made th

Re: make value_range the base class and value_range_equiv the derived class

2019-11-05 Thread Andrew MacLeod
On 11/5/19 8:21 AM, Aldy Hernandez wrote: The base class for ranges is currently value_range_base, which is rather long and cumbersome.  It also occurs more often than the derived class of value_range.  To avoid confusion, and save typing, this patch does a global rename from value_range to val

[COMMITTED] Change fold_range() and wi_fold() to return the result via reference parameter.

2019-11-08 Thread Andrew MacLeod
e by a reference parameter instead of by value. 2019-11-08 Andrew MacLeod * range-op.h (range_operator::fold_range): Return result in a reference parameter instead of by value. (range_operator::wi_fold): Same. * range-op.cc (range_operator::wi_fold): Return result in a reference paramet

Re: extract independent value_range bits to value-range.cc

2019-11-13 Thread Andrew MacLeod
On 11/13/19 12:12 PM, Aldy Hernandez wrote: tree-vrp.* is large and difficult to follow, in part because it has a hodgepodge of different interdependent things (value ranges bits, equivalences stuff, actual value range propagation things, etc etc). This patch pulls out the value_range function

[COMMITTED] Use range_compatible_p in check_operands_p.

2023-12-01 Thread Andrew MacLeod
th no new regressions. Andrew From c6bb413eeb9d13412e8101e3029099d7fd746708 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 1 Dec 2023 11:15:33 -0500 Subject: [PATCH] Use range_compatible_p in check_operands_p. Instead of directly checking type precision, check_operands_p should i

Re: [PATCH] tree-optimization/112843 - update_stmt doing wrong things

2023-12-05 Thread Andrew MacLeod
On 12/5/23 03:27, Richard Biener wrote: The following removes range_query::update_stmt and its single invocation from update_stmt_operands. That function is not supposed to look beyond the raw stmt contents of the passed stmt since there's no guarantee about the rest of the IL. I've successfull

Re: [Patch] OpenMP: Minor '!$omp allocators' cleanup - and still: Re: [patch] OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables

2023-12-11 Thread Andrew MacLeod
On 12/11/23 17:12, Thomas Schwinge wrote: Hi! This issue would've been prevented if we'd actually use a distinct C++ data type for GCC types, checkable at compile time -- I'm thus CCing Andrew MacLeod for amusement or crying, "one more for the list!". ;-\ Perhaps

Re: PING^1 [PATCH] range: Workaround different type precision issue between _Float128 and long double [PR112788]

2023-12-12 Thread Andrew MacLeod
I leave this for the release managers, but I am not opposed to it for this release... It would be nice to remove it for the next release Andrew On 12/12/23 01:07, Kewen.Lin wrote: Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639140.html BR, Kewen on 2023/

[COMMITTED] PR tree-optimization/112509 - Use case label type to create case range.

2023-11-14 Thread Andrew MacLeod
4553a0496458a712dfd2f04b9803b611fdc777cc Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 13 Nov 2023 09:58:10 -0500 Subject: [PATCH] Use case label type to create case range. Create a range from the label type, and cast it to the required type. PR tree-optimization/112509 gcc/ * tree-vrp.cc

Re: Propagate value ranges of return values

2023-11-20 Thread Andrew MacLeod
On 11/18/23 20:21, Jan Hubicka wrote: Hi, this patch implements very basic propaation of return value ranges from VRP pass. This helps std::vector's push_back since we work out value range of allocated block. This propagates only within single translation unit. I hoped we will also do the pr

[PATCH] PR tree-optimization/111922 - Ensure wi_fold arguments match precisions.

2023-11-24 Thread Andrew MacLeod
anyway... From f9cddb4cf931826f09197ed0fc2d6d64e6ccc3c3 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 22 Nov 2023 17:24:42 -0500 Subject: [PATCH] Ensure wi_fold arguments match precisions. Return VARYING if any of the required operands or types to wi_fold do not match expected precisions.

[COMMITTED 1/2] Add operand_check_p to range-ops.

2023-11-29 Thread Andrew MacLeod
x-gnu with no regressions. committed. Andrew From 9f1149ef823b64ead6115f79f99ddf8eead1c2f4 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 28 Nov 2023 09:39:30 -0500 Subject: [PATCH 1/2] Add operand_check_p to range-ops. Add an optional method to verify operands are compatible,

[COMMITTED 2/2] PR tree-optimization/111922 - Check operands before invoking fold_range.

2023-11-29 Thread Andrew MacLeod
From 5f0c0f02702eba568374a7d82ec9463edd1a905c Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 28 Nov 2023 13:02:35 -0500 Subject: [PATCH 2/2] Check operands before invoking fold_range. Call check_operands_p before fold_range to make sure it is a valid operation. PR tree-optimization/111922 gcc/ * ipa-

Re: [PATCH] [RFC] New early __builtin_unreachable processing.

2023-09-19 Thread Andrew MacLeod
On 9/19/23 08:56, Richard Biener wrote: On Mon, Sep 18, 2023 at 3:48 PM Andrew MacLeod wrote: OK. I dont see anything in the early VRP processing now that would allow a later pass to remove the unreachable unless it does its own analysis like DOM might do. Isn't it as simple as

[COMMITTED] Tweak ssa_cache::merge_range API.

2023-09-20 Thread Andrew MacLeod
actually from a global table. Bootstraps on 86_64-pc-linux-gnu with no regressions.   Pushed. Andrew commit 0885e96272f1335c324f99fd2d1e9b0b3da9090c Author: Andrew MacLeod Date: Wed Sep 20 12:53:04 2023 -0400 Tweak merge_range API. merge_range use to return TRUE if ter was already a

Re: [PATCH] Add missing return in gori_compute::logical_combine

2023-09-25 Thread Andrew MacLeod
OK for trunk at least.   Thanks.  I presume it'll be fine for the other releases. Andrew On 9/25/23 11:51, Eric Botcazou wrote: Hi, the varying case currently falls through to the 1/true case. Tested on x86_64-suse-linux, OK for mainline, 13 and 12 branches? 2023-09-25 Eric Botcazou

[COMMITTED][GCC13] PR tree-optimization/110315 - Reduce the initial size of int_range_max.

2023-09-26 Thread Andrew MacLeod
70639014a69cf50fe11dc1adbfe1db4c7760ce69 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 26 Sep 2023 09:44:39 -0400 Subject: [PATCH] Reduce the initial size of int_range_max. This patch adds the ability to resize ranges as needed, defaulting to no resizing. int_range_max now defaults to 3 sub

[COMMITTED] PR tree-optimization/111599 - Ensure ssa_name is still valid.

2023-09-26 Thread Andrew MacLeod
17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 26 Sep 2023 09:27:52 -0400 Subject: [PATCH] Ensure ssa_name is still valid. When the IL changes, an equivalence set may contain ssa_names that no longer exist. Ensure names are still valid and not in the free list. PR tree-optimization/111599

[COMMITTED] ssa_lazy_cache takes an optional bitmap_obstack pointer.

2024-06-28 Thread Andrew MacLeod
little more flexibility. bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From 5612541834c063dd4126fb059e59c5dc8d5f2f8e Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 26 Jun 2024 14:53:54 -0400 Subject: [PATCH] ssa_lazy_cache takes an optional bitmap_obstack

Re: [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-07-11 Thread Andrew MacLeod
I have no issues with any of the range-op work in this patch series,  but I am unequipped to review the floating point aspects of any of the patches. We just need someone to signoff that this properly reflects those builtins. Andrew On 7/11/24 03:32, HAO CHEN GUI wrote: Hi, The builtin i

[COMMITTED] PR tree-optimization/115951 - range-ops should return the requested boolean type.

2024-07-16 Thread Andrew MacLeod
vs the GCC default of precision 1. This patch addresses this oversight by returning a boolean range of the type requested. Bootstrapped on  x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From 8565cb2e22fd116e26aeb9d95030ee0e48d6e6c7 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date:

[COMMITTED] PR tree-optimzation/116003 - Check for SSA_NAME not in the IL yet.

2024-07-19 Thread Andrew MacLeod
2001 From: Andrew MacLeod Date: Fri, 19 Jul 2024 17:39:40 -0400 Subject: [PATCH] Check for SSA_NAME not in the IL yet. Check for an SSA_NAME not in the CFG before trying to create an equivalence record in the defintion block. PR tree-optimization/116003 gcc/ * value-relation.cc (equiv_oracle

[COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
mplemented: '_BitInt(128)' is not supported on this target I think it needs dg-do compile { target bitint }. Indeed, thanks.  Pushed. Andrew commit 320c0d49dd5d7d96443b8ee2fde3cce533eaa761 Author: Andrew MacLeod Date: Sat Jul 20 11:45:16 2024 -0400 Add bitint to options for tes

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 12:00, Jakub Jelinek wrote: On Sat, Jul 20, 2024 at 11:48:36AM -0400, Andrew MacLeod wrote: On 7/20/24 01:58, Sam James wrote: FAIL: gcc.dg/pr116003.c (test for excess errors) Excess errors: /home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 12:54, Jakub Jelinek wrote: This isn't enough. The bitint effective target just means that the target supports at least some _BitInt precisions (the standard in that case mandates support for at least bits in long long, so 64), but this testcase uses _BitInt(129), for that one needs

Re: [PATCHv2] Value range: Add range op for __builtin_isfinite

2024-05-14 Thread Andrew MacLeod
On 5/13/24 22:16, HAO CHEN GUI wrote: Hi Aldy, Thanks for your review comments. 在 2024/5/13 19:18, Aldy Hernandez 写道: +//Implement range operator for CFN_BUILT_IN_ISFINITE +class cfn_isfinite : public range_operator +{ +public: + using range_operator::fold_range; + using range_operator::

Re: [PATCHv2] Value range: Add range op for __builtin_isfinite

2024-05-14 Thread Andrew MacLeod
On 5/9/24 04:47, HAO CHEN GUI wrote: Hi Mikael, Thanks for your comments. 在 2024/5/9 16:03, Mikael Morin 写道: I think the canonical API behaviour sets R to varying and returns true instead  of just returning false if nothing is known about the range. I'm not sure whether it makes any diff

[COMMITTED 01/12] - Move all relation queries into relation_oracle.

2024-05-23 Thread Andrew MacLeod
/Relations Moving the queries into the oracle removes the need to check for a NULL pointer on every query, and results in speeding up VRP by about 0.7% Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From b0cbffd5655b9fc108691c6b15e8eaed4ab9746a Mon Sep 17 00:00:00 2001 From: Andrew

[COMMITTED 00/12] Cleanup some ranger components and make them available via range_query.

2024-05-23 Thread Andrew MacLeod
This set of 12 patches overhauls some structural component layouts in ranger and makes them available via a simple range_query API. There are 3 main groups of patches.  The first group overhauls the relation oracle a bit and makes it accessing it via range_query more transparent.  The second

[COMMITTED 02/12] - Move to an always available relation oracle.

2024-05-23 Thread Andrew MacLeod
ading.. It also unifies the register and query names to nor specify what is already apparent in the parameters. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From 2f80eb1feb3f92c7e9e57d4726ec52ca7d27ce92 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 30 Apr 2024

[COMMITTED 08/12] - Gori_compute no longer inherits from gori_map.

2024-05-23 Thread Andrew MacLeod
From 9b42fafa0ec385bbc86be1d9f1a86c140e1045c3 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 9 May 2024 14:14:31 -0400 Subject: [PATCH 08/12] Gori_compute no longer inherits from gori_map. This patch moves the gori_compute object away from inheriting a gori_map object and instead it as a local member. Export it vi

[COMMITTED 07/12] - Default gimple_outgoing_range to not process switches.

2024-05-23 Thread Andrew MacLeod
GORI object now. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From 1ec8e2027a99a5ddca933a37b3cf5ef322208c5a Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 6 May 2024 12:04:24 -0400 Subject: [PATCH 07/12] Default gimple_outgoing_range to not process switches

[COMMITTED 04/12] - Allow components to be shared among range-queries.

2024-05-23 Thread Andrew MacLeod
owing what all components are involved. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From ef99d19569a1c5fafa5784c2c2f7855b6e62ffd8 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 17 May 2024 10:44:27 -0400 Subject: [PATCH 04/12] Allow components to be shared among

[COMMITTED 03/12] - Rename relation oracle and API.

2024-05-23 Thread Andrew MacLeod
ndant rext. relation->register_relation and relation->query_relation seem a bit texty.  they are now  relation.record () and relation.query () Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From 3a5b702c4082950d614fe12a066609da23363246 Mon Sep 17 00:00:00 2001 From: Andr

[COMMITTED 10/12] - Make GORI a range_query component.

2024-05-23 Thread Andrew MacLeod
59a3a0ad763bc03ad5ab630a62fbc78ae50b486f Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 17 May 2024 14:27:12 -0400 Subject: [PATCH 10/12] Make GORI a range_query component. This patch moves the GORI component into the range_query object, and makes it generally available. This makes it much easier to share

[COMMITTED 12/12] - Move condexpr_adjust into gimple-range-fold

2024-05-23 Thread Andrew MacLeod
belongs. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From eb66da78b896ad5e7f6a315413ed68273c83662f Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 21 May 2024 12:41:49 -0400 Subject: [PATCH 12/12] Move condexpr_adjust into gimple-range-fold Certain components of GORI

[COMMITTED 05/12] - Move infer_manager to a range_query oracle.

2024-05-23 Thread Andrew MacLeod
e (we only knew what block it came from). Future functionality will make use of the more specific information. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From 837ce8a2d75231b68f13da00d9be8d2fd404804e Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 17 May 2024 10:

[COMMITTED 09/12] - Gori_compute inherits from gimple_outgoing_range.

2024-05-23 Thread Andrew MacLeod
/AndrewMacLeod/GimpleOutgoingRange The more advanced GORI ssa-name processing engine has not been written yet.  its on the to-do list :-) Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From 8feb69600dd696fb8a6e3b88b7d159ced5cb0eb9 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date

[COMMITTED 06/12] tree-optimization/113879 - Add inferred ranges for range-ops based statements.

2024-05-23 Thread Andrew MacLeod
From 985581b05f32b62df15b60833a8a57544dbbd739 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 2 May 2024 12:23:18 -0400 Subject: [PATCH 06/12] Add inferred ranges for range-ops based statements. Gimple_range_fold contains some shorthand fold_range routines for easy user consumption of that

[COMMITTED 11/12] - Make gori_map a shared component.

2024-05-23 Thread Andrew MacLeod
others. Documentation is coming :-P, Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. From e81eafd81d76cf4e8b03089a94857b4b52a66bc7 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 21 May 2024 14:20:52 -0400 Subject: [PATCH 11/12] Make gori_map a shared component. Move

[COMMITTED] tree-optimization/115208 - Delete gori_map during destruction of GORI.

2024-05-25 Thread Andrew MacLeod
From e98cf19c2be1ffaf65d625e1d8b927a42e77b009 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Sat, 25 May 2024 12:28:52 -0400 Subject: [PATCH 4/4] Delete gori_map during destruction of a GORI.. Forgot to free the gori_mpa object when a gori object is freed. PR tree-optimization/115208 * value-query.cc (range_

[PATCH] Strlen pass should set current range query.

2024-05-27 Thread Andrew MacLeod
ger pointer aorund. But that a much bigger issue.  one thing at a time. From 308d5a6b9937c36300e22fcab1ecb67af55dce9e Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 27 May 2024 13:20:13 -0400 Subject: [PATCH 1/2] Strlen pass should set current range query. The strlen pass current

[COMMITTED] Strlen pass should set current range query.

2024-05-28 Thread Andrew MacLeod
Thanks. Committed with the change to the testcase. Bootstraps on x86_64-pc-linux-gnu with no regressions. Andrew On 5/28/24 02:49, Richard Biener wrote: On Tue, May 28, 2024 at 1:24 AM Andrew MacLeod wrote: The strlen pass currently has a local ranger instance, but when it invokes SCEV

[COMMITTED] tree-optimization/115221 - Do not invoke SCEV if it will use a different range query.

2024-05-28 Thread Andrew MacLeod
EV if the range_query being used is not the same as the one SCEV is going to use. Bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From b814e390e7c87c14ce8d9cdea6c6cd127a4e6261 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 27 May 2024 11:00:57 -0400 Subject: [

[COMMITTED] More tweaks from gimple_outgoing_range changes.

2024-05-28 Thread Andrew MacLeod
th no regressions.  Pushed. Andrew From 05ff069ba937dc3970f2a757e426935fcf4c15fb Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 22 May 2024 19:27:01 -0400 Subject: [PATCH 3/5] More tweaks from gimple_outgoing_range changes. the dom_ranger used for fast vrp no longer needs a

[COMMITTED] Gori_on_edge tweaks.

2024-05-28 Thread Andrew MacLeod
needed. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew commit a19f588d0b71a4cbc48b064177de87d3ca46b39f Author: Andrew MacLeod Date: Wed May 22 19:51:16 2024 -0400 Gori_on_edge tweaks. FAST_VRP uses a non-ranger gori_on_edge routine which allows an optional

Re: [COMMITTED] tree-optimization/115221 - Do not invoke SCEV if it will use a different range query.

2024-05-29 Thread Andrew MacLeod
On 5/29/24 03:19, Richard Biener wrote: On Tue, May 28, 2024 at 8:57 PM Andrew MacLeod wrote: The original patch causing the PR made ranger's cache re-entrant to enable SCEV to use the current range_query when called from within ranger.. SCEV uses the currently active range query

Re: [PATCH] ranger: Improve CLZ fold_range [PR115337]

2024-06-04 Thread Andrew MacLeod
OK by me... Andrew On 6/4/24 09:42, Jakub Jelinek wrote: Hi! cfn_ctz::fold_range includes special cases for the case where .CTZ has two arguments and so is well defined at zero, and the second argument is equal to prec or -1, but cfn_clz::fold_range does that only for the prec case. -1 is

[COMMITTED 1/2] PR tree-optimization/114855 - Limit equivalency processing in rangers cache.

2024-08-09 Thread Andrew MacLeod
nds in DOM. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew From 5ce3874b3c2fdd76f506005cb1171a732af7c807 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 8 Aug 2024 16:34:15 -0400 Subject: [PATCH 1/2] Limit equivalency processing in rangers cache. When the numbe

[COMMITTED 2/2] PR tree-optimization/114855 - Adjust rangers recomputation depth based on the number of BBs.

2024-08-09 Thread Andrew MacLeod
.  Pushed. Andrew From 9e4da946c4263a4c89d5fc365b3c97ae244c5018 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 8 Aug 2024 16:37:28 -0400 Subject: [PATCH 2/2] Adjust rangers recomputation depth based on the number of BBs. As the number of block increase, recomputations can become more expensive

Re: [PATCH] tree-optimization/116166 - forward jump-threading going wild

2024-08-09 Thread Andrew MacLeod
On 8/7/24 03:13, Richard Biener wrote: On Tue, 6 Aug 2024, Andrew MacLeod wrote: On 8/6/24 09:12, Richard Biener wrote: Currently the forward threader isn't limited as to the search space it explores and with it now using path-ranger for simplifying conditions it runs into it became p

[PATCH] Move array_bounds warnings into it's own pass.

2024-06-10 Thread Andrew MacLeod
any issues with any of this? Bootstraps on x86_64-pc-linux-gnu with no regressions. Andrew From aa0259784b0c0884956a627b78c0f5025d76c931 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 5 Jun 2024 15:12:27 -0400 Subject: [PATCH 2/2] Move array_bounds warnings into it's own pass. Array

Re: [PATCH] Move array_bounds warnings into it's own pass.

2024-06-10 Thread Andrew MacLeod
On 6/10/24 16:12, Jeff Law wrote: Does anyone have any issues with any of this? No, in fact, quite the opposite.  I think we very much want the warning out of VRP into its own little pass that we can put wherever it makes sense in the pipeline rather than having it be tied to VRP. I'd p

Re: [PATCH] Move array_bounds warnings into it's own pass.

2024-06-10 Thread Andrew MacLeod
pushed as 74ee12ff68243bb177fb8653474dff80c3792139 fyi, the 2 testcases depending on the VRP flag were: c-c++-common/Warray-bounds-2.c   (-warray-bounds  -fno-tree-vrp :-P) and g++.dg/warn/string1.C   (-O1 -Wall) Andrew On 6/10/24 16:12, Jeff Law wrote: On 6/10/24 1:24 PM, Andrew MacLeod

Re: [COMMITTED] tree-optimization/115221 - Do not invoke SCEV if it will use a different range query.

2024-06-11 Thread Andrew MacLeod
On 5/29/24 03:19, Richard Biener wrote: On Tue, May 28, 2024 at 8:57 PM Andrew MacLeod wrote: The original patch causing the PR made ranger's cache re-entrant to enable SCEV to use the current range_query when called from within ranger.. SCEV uses the currently active range query

[COMMITTED] Do not assume LHS of call is an ssa-name.

2024-06-14 Thread Andrew MacLeod
.   Pushed. Andrew From cef90b0558032b64b021054370ad5b96f8a5c5d8 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 12 Jun 2024 09:20:20 -0400 Subject: [PATCH 1/7] Do not assume LHS of call is an ssa-name. gimple_range_fold makes an assumption that the LHS of a call is an ssa_name, which

[COMMITTED] Add merge facility to ssa_lazy_cache.

2024-06-14 Thread Andrew MacLeod
is used in a few places by ranger. Bootstraps on   x86_64-pc-linux-gnu with no regressions.  There shouldn't be, there are no callers yet :-)   Pushed. Andrew From e2679227829ffe2ff4fb974994aacd639219f855 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 13 Jun 2024 15:35:55

[COMMITTED] Dont add varying values to gori_on_edge mass, calculations.

2024-06-14 Thread Andrew MacLeod
processing the dependency chain. Bootstraps on  x86_64-pc-linux-gnu with no regressions.   Pushed. Andrew From 2f90cb8b36affbb28dba643dd38068fc88c76e12 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 14 Jun 2024 11:01:08 -0400 Subject: [PATCH 3/7] Dont add varying values to gori_on

Re: [PATCH] middle-end/114604 - ranger allocates bitmap without initialized obstack

2024-06-20 Thread Andrew MacLeod
On 6/20/24 05:31, Richard Biener wrote: On Thu, 20 Jun 2024, Aldy Hernandez wrote: Hi. I came around to this, and whipped up the proposed patch. However, it does seem a bit verbose, and I'm wondering if it's cleaner to just leave things as they are. The attached patch passes tests and ther

[COMMITTED] Add builtin_unreachable processing for fast_vrp.

2024-06-21 Thread Andrew MacLeod
is the final pass. Bootstraps on  x86_64-pc-linux-gnu with no regressions.   Pushed. Andrew From 82c704c69fab610afcf4a1947577ed97dd72c429 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 17 Jun 2024 11:23:12 -0400 Subject: [PATCH 1/5] Add builtin_unreachable processing for fast_vrp. Add

[COMMITTED] Print "Global Exported" to dump_file from set_range_info.

2024-06-21 Thread Andrew MacLeod
but this will make it easy to find with a grep of the listings.    It does not seem to interfere with any testcases I found. Bootstrapped on  x86_64-pc-linux-gnu with no regressions.   Pushed. Andrew From b7cff112b4a3ee950b22abaa2218485140e945bd Mon Sep 17 00:00:00 2001 From: Andrew MacLe

[COMMITTED] Change fast VRP algorithm.

2024-06-21 Thread Andrew MacLeod
ite. Bootstraps on  x86_64-pc-linux-gnu with no regressions.  (Of course, it isn't actually called anywhere yet).    Pushed. Andrew From 6bfd8f1b0ac116fb2cb1edb4a9dff7069257adb7 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 17 Jun 2024 11:32:51 -0400 Subject: [PATCH 2/5] Change f

[PATCH] Add param for bb limit to invoke fast_vrp.

2024-06-21 Thread Andrew MacLeod
at PR :-( From 3bb9bd3ca8038676e45b0bddcda91cbed7e51662 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 17 Jun 2024 11:38:46 -0400 Subject: [PATCH 4/5] Add param for bb limit to invoke fast_vrp. If the basic block count is too high, simply use fast_vrp for all VRP passes. gcc/doc/ * invoke.texi (

[COMMITTED] Make transitive relations an oracle option

2024-06-24 Thread Andrew MacLeod
-pc-linux-gnu with no regressions.   Pushed. Andrew From d3088bf565afcad410ce4fd3ebf6c993f63703b6 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 24 Jun 2024 10:29:06 -0400 Subject: [PATCH 1/2] Make transitive relations an oracle option This patch makes processing of transitive relations

Re: [PATCH] Add param for bb limit to invoke fast_vrp.

2024-06-24 Thread Andrew MacLeod
On 6/22/24 09:15, Richard Biener wrote: On Fri, Jun 21, 2024 at 3:02 PM Andrew MacLeod wrote: This patch adds --param=vrp-block-limit=N When the basic block counter for a function exceeded 'N' , VRP is invoked with the new fast_vrp algorithm instead. This algorithm uses

Re: [PATCH] Add param for bb limit to invoke fast_vrp.

2024-06-25 Thread Andrew MacLeod
On 6/24/24 22:35, Andrew Pinski wrote: On Mon, Jun 24, 2024 at 7:20 PM Andrew MacLeod wrote: // Fill ssa-cache R with any outgoing ranges on edge E, using QUERY. bool gori_on_edge (class ssa_cache &r, edge e, range_query *query = NULL); This is what the fast_vrp routines uses.

Re: [PATCH] GORI cleanups

2024-06-25 Thread Andrew MacLeod
On 6/25/24 09:44, Richard Biener wrote: The following replaces conditional is_export_p calls as is_export_p handles a NULL bb itself. Bootstrap running on x86_64-unknown-linux-gnu, OK? Absolutely. Thanks Andrew Thanks, Richard. * gimple-range-gori.cc (gori_compute::may_recompute

[COMMITTED] Add param for bb limit to invoke fast_vrp.

2024-06-25 Thread Andrew MacLeod
...@gmail.com/ since those are the ones which are detected right now. Thanks, Andrew Thanks.  Final version checked in: Andrew From 1ea95cc5e099d554764b82df8e972129e9d20885 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 17 Jun 2024 11:38:46 -0400 Subject: [PATCH] Add param for bb lim

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 14:54, Jakub Jelinek wrote: On Sat, Jul 20, 2024 at 12:57:39PM -0400, Andrew MacLeod wrote: perhaps easier to just do That works as well, sure. Committed. Andrew commit 15571d2d54c705f22aced5e972cb463d0593aa3c Author: Andrew MacLeod Date: Sat Jul 20 12:49:39 2024 -0400

Re: [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-07-23 Thread Andrew MacLeod
On 7/23/24 15:18, Jeff Law wrote: On 7/11/24 9:17 PM, HAO CHEN GUI wrote: So why the test for real_isinf on the upper/lower bound?  If op1 is known to be a NaN, then why test the bounds at all?  If a bounds test is needed, why only test the upper bound? IMHO, logical is if the op1 is a N

Re: [PATCH] tree-optimization/116166 - forward jump-threading going wild

2024-08-06 Thread Andrew MacLeod
On 8/6/24 09:12, Richard Biener wrote: Currently the forward threader isn't limited as to the search space it explores and with it now using path-ranger for simplifying conditions it runs into it became pretty slow for degenerate cases like compiling insn-emit.cc for RISC-V esp. when compiling

Re: [PATCH 0/5] some small ranger op table cleanup

2024-08-06 Thread Andrew MacLeod
On 8/6/24 17:27, Andrew Pinski wrote: This is a set of 5 small cleanups for the ranger op table. I noticed it after was pointed out an uninitialized warning sometimes happens for it. We should use final classes a lot more, even if it just used for documentation that you can't use it as a base c

[COMMITTED 1/5] Remove wrapper around gimple_range_global.

2024-04-30 Thread Andrew MacLeod
with less condition checking on every access to a global. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  pushed. Andrew From f3571462b581e1b57d563268483207bc929de952 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 20 Feb 2024 12:27:51 -0500 Subject: [PATCH 1/9] Remove wrap

[COMMITTED 3/5] Invoke range_of_stmt on ssa_names with no context.

2024-04-30 Thread Andrew MacLeod
cca3c4f2e7075fe613ac1cd67a3e1743faf33505 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 13 Mar 2024 14:13:28 -0400 Subject: [PATCH 3/9] Invoke range_of_stmt on ssa_names with no context. Evalaute ssa-names when range_of_expr is called with no context statement by calling range_of_stmt to get an initial value. * gimple

[COMMITTED 4/5] - Add range_on_entry/exit to value_query API.

2024-04-30 Thread Andrew MacLeod
API. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  pushed. Andrew From 4b955ac10f3d978a9be491d9c528da005895 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 13 Mar 2024 14:18:48 -0400 Subject: [PATCH 4/9] Add range_on_entry/exit to value_query API. Add range_on_entry and

  1   2   3   4   5   6   7   8   9   10   >