Jakub Jelinek writes:
> Hi!
>
> The following testcase is miscompiled during evrp.
> Before vrp, we have (from ccp):
> # RANGE [irange] long long unsigned int [0, +INF] MASK 0xc000
> VALUE 0x2d
> _3 = _2 + 18446744073708503085;
> ...
> # RANGE [irange] long long unsigned int [0
Jan Hubicka writes:
>> > 2024-11-01 Martin Jambor
>> >
>> > * ipa-prop.cc (ipa_compute_jump_functions_for_edge): When creating
>> > value-range jump functions from pointer type constant zero, do so
>> > as if it was not a pointer.
>> > ---
>> > gcc/ipa-prop.cc | 3 ++-
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 versions had been
>> doing before) but instead rely on the value range
Andrew Carlotti writes:
> This test started failing on aarch64 after 0cfc9c95 in 2023 ("Phi
> analyzer - Initialize with range instead of a tree.").
>
> The only change visible in the pass dumps prior to thread2 is the upper
> bounds of some ranges are reduced from +INF to 7, consistent with the
Martin Jambor writes:
> Hi,
>
> Because the simplified way of extracting value ranges from functions
> does not look at scalar constants (as one of the versions had been
> doing before) but instead rely on the value range within the jump
> function already capturing the constant, I have added a v
Martin Jambor writes:
> Hi,
>
> currently ipa_value_range_from_jfunc and
> propagate_vr_across_jump_function contain similar but not same code
> for dealing with pass-through jump functions. This patch puts these
> common bits into one function which can also handle comparison
> operations.
>
>
Martin Jambor writes:
> +/* If T is an SSA_NAME that is a result of a simple type conversion
> statement,
I think "the result" sounds better than "a result", assuming there is
just one result.
> + return the operand of that conversion, otherwise treturn T. */
s/treturn/return/
Aldy
rguenther at suse dot de via Gcc-bugs writes:
>> Have you tried the patch in comment 22? That should reduce the time in
>> DOM by 23%.
>
> I thought that was already applied ...?
No. I wanted to investigate the 3 missing threads, but I think the
patch can go in as is. I'll be away for a few
"rguenth at gcc dot gnu.org via Gcc-bugs" writes:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114855
>
> --- Comment #50 from Richard Biener ---
> (In reply to Richard Biener from comment #4)
>> Trunk at -O1:
>>
>> dominator optimization : 495.14 ( 82%) 0.20 ( 5%) 495.44 (
>>
Richard Biener writes:
> The following reduces the number of wide_ints built which show up
> in the profile for PR114855 as the largest remaining bit at -O1.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
Thanks.
Pushed attached patch.
Thanks.
Aldy
On Tue, Sep 24, 2024 at 10:09 AM Filip Kastl wrote:
> On Mon 2024-09-23 09:43:28, Aldy Hernandez wrote:
> > From: Aldy Hernandez
> >
> > ChangeLog:
> >
> > * MAINTAINERS: Update email and add myself to
Pushed attached patch.
Thanks.
Aldy
On Tue, Sep 24, 2024 at 10:09 AM Filip Kastl wrote:
> On Mon 2024-09-23 09:43:28, Aldy Hernandez wrote:
> > From: Aldy Hernandez
> >
> > ChangeLog:
> >
> > * MAINTAINERS: Update email and add myself to
https://gcc.gnu.org/g:34366176046351250e1beb578664d926fbdd50c9
commit r15-3823-g34366176046351250e1beb578664d926fbdd50c9
Author: Aldy Hernandez
Date: Tue Sep 24 11:40:52 2024 +0200
Alphabetize my entry in MAINTAINER's DCO list.
ChangeLog:
* MAINTAINERS: Mo
From: Aldy Hernandez
ChangeLog:
* MAINTAINERS: Update email and add myself to DCO.
---
MAINTAINERS | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index cfd96c9f33e..e9fafaf45a7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -116,7
From: Aldy Hernandez
ChangeLog:
* MAINTAINERS: Update email and add myself to DCO.
---
MAINTAINERS | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index cfd96c9f33e..e9fafaf45a7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -116,7
https://gcc.gnu.org/g:52783489bce169f71cf7cf47ee435ebc6636675a
commit r15-3785-g52783489bce169f71cf7cf47ee435ebc6636675a
Author: Aldy Hernandez
Date: Mon Sep 23 09:36:49 2024 +0200
Update email in MAINTAINERS file.
ChangeLog:
* MAINTAINERS: Update email and add
Ok
On Thu, Sep 5, 2024, 09:30 Jakub Jelinek wrote:
> Hi!
>
> I've noticed non-standard wording of this diagnostics when looking at
> a miscompilation with --param=vrp-block-limit=0.
>
> Diagnostics generally shouldn't start with uppercase letter (unless
> the upper case would appear also in the
[I'm slowly coming up to speed here after my absence, so please bear with me...]
I suspect there's a few things going on here, both in the forward and
the backwards threader. For the forward threader, you mention some
very good points in the PR. First, there's unnecessary recursion in
simplify_c
https://gcc.gnu.org/g:e9aa97940c60cbd43f28d8b1292126e118ead1d9
commit r15-1707-ge9aa97940c60cbd43f28d8b1292126e118ead1d9
Author: Aldy Hernandez
Date: Fri Jun 28 11:27:24 2024 +0200
Remove unused hybrid_* operators in range-ops.
gcc/ChangeLog:
* range-op-ptr.cc
Now that the dust has settled on the prange work, we can remove the
hybrid operators. I will push this once tests complete.
gcc/ChangeLog:
* range-op-ptr.cc (class hybrid_and_operator): Remove.
(class hybrid_or_operator): Same.
(class hybrid_min_operator): Same.
(
https://gcc.gnu.org/g:bcdbb85f26aa0d25645d51ddf728a049b201c980
commit r15-1691-gbcdbb85f26aa0d25645d51ddf728a049b201c980
Author: Aldy Hernandez
Date: Wed Jun 19 11:42:16 2024 +0200
Avoid global bitmap space in ranger.
gcc/ChangeLog:
* gimple-range-cache.cc
On 6/20/24 4:36 PM, Richard Biener wrote:
Am 20.06.2024 um 16:05 schrieb 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
er to get rid of
all/most of the local obstacks we use in ranger, and just use the
global (NULL) one?
Thoughts?
Aldy
On Mon, Apr 8, 2024 at 7:47 PM Richard Biener
wrote:
>
>
>
> > Am 08.04.2024 um 18:40 schrieb Aldy Hernandez :
> >
> > On Mon, Apr 8, 2024 at 6:29 PM
Now that all remaining users of value_range have been renamed to
int_range<>, we can reclaim value_range as a temporary, thus removing
the annoying CamelCase.
gcc/ChangeLog:
* data-streamer-in.cc (streamer_read_value_range): Rename
Value_Range to value_range.
* data-stream
https://gcc.gnu.org/g:3dedfad5a1edb14169a138492e486ee691387a53
commit r15-1372-g3dedfad5a1edb14169a138492e486ee691387a53
Author: Aldy Hernandez
Date: Tue Jun 4 07:35:51 2024 +0200
Rename Value_Range to value_range.
Now that all remaining users of value_range have been renamed to
https://gcc.gnu.org/g:6fb43d1b90e2683f6f41f04a65341fc2dab4b495
commit r15-992-g6fb43d1b90e2683f6f41f04a65341fc2dab4b495
Author: Aldy Hernandez
Date: Fri May 31 15:49:26 2024 +0200
Remove value_range typedef.
Now that pointers and integers have been disambiguated from irange
Now that pointers and integers have been disambiguated from irange,
and all the pointer range temporaries use prange, we can reclaim
value_range as a general purpose range container.
This patch removes the typedef, in favor of int_range_max, thus
providing slightly better ranges in places. I have
Fix a use of int_range_max in phiopt that should be a type agnostic
range, because it could be either a pointer or an int.
PR tree-optimization/115191
gcc/ChangeLog:
* tree-ssa-phiopt.cc (value_replacement): Use Value_Range instead
of int_range_max.
gcc/testsuite/ChangeL
https://gcc.gnu.org/g:35a293a6454ac0cd88735036f536d8f4ec65951a
commit r15-785-g35a293a6454ac0cd88735036f536d8f4ec65951a
Author: Aldy Hernandez
Date: Wed May 22 22:32:57 2024 +0200
[prange] Use type agnostic range in phiopt [PR115191]
Fix a use of int_range_max in phiopt that
If the intersection of the bitmasks made the range span the entire
domain, normalize the range to VARYING.
gcc/ChangeLog:
PR middle-end/115131
* value-range.cc (prange::intersect): Set VARYING if intersection
of bitmasks made the range span the entire domain.
(rang
https://gcc.gnu.org/g:1accf4454a2ab57c4d681d1f6db332c46c61c058
commit r15-632-g1accf4454a2ab57c4d681d1f6db332c46c61c058
Author: Aldy Hernandez
Date: Fri May 17 13:44:08 2024 +0200
[prange] Drop range to VARYING if the bitmask intersection made it so
[PR115131]
If the
Undefined ranges have no type. This patch fixes the thinko.
gcc/ChangeLog:
PR middle-end/115128
* ipa-cp.cc (ipa_value_range_from_jfunc): Check for undefined_p
before looking at type.
(propagate_vr_across_jump_function): Same.
gcc/testsuite/ChangeLog:
*
https://gcc.gnu.org/g:bc6e336cb7c85094ddc77757be97c3d8588f35ca
commit r15-627-gbc6e336cb7c85094ddc77757be97c3d8588f35ca
Author: Aldy Hernandez
Date: Fri May 17 10:30:03 2024 +0200
[prange] Avoid looking at type() for undefined ranges
Undefined ranges have no type. This patch
fc3df74204c9b5e01e12f7.
etc etc.
Next time, would you like me to add manual changelog entries?
My apologies, I thought what I did was the blessed way of doing things.
Aldy
On Thu, May 16, 2024 at 12:08 PM Jakub Jelinek wrote:
>
> On Thu, May 16, 2024 at 12
This reverts commit d7bb8eaade3cd3aa70715c8567b4d7b08098e699 and enables prange
support again.
---
gcc/gimple-range-cache.cc | 4 ++--
gcc/gimple-range-fold.cc | 4 ++--
gcc/gimple-range-fold.h | 2 +-
gcc/gimple-range-infer.cc | 2 +-
gcc/gimple-range-op.cc| 2 +-
In adding some traps for PR114985 I noticed that the conditional
folding code in simplify_using_ranges was using the wrong type. This
cleans up the oversight.
gcc/ChangeLog:
PR tree-optimization/114985
* vr-values.cc (simplify_using_ranges::fold_cond_with_ops): Use
boolea
The pointers_handled_p() code was a temporary sanity check, and not
even a good one, since we have a cleaner way of checking type
mismatches with operand_check_p. This patch removes all the code, and
adds an explicit type check for relational operators, which are the
main problem in PR114985.
Add
https://gcc.gnu.org/g:da73261ce7731be7f2b164f1db796878cdc23365
commit r15-575-gda73261ce7731be7f2b164f1db796878cdc23365
Author: Aldy Hernandez
Date: Fri May 10 00:38:51 2024 +0200
Revert "Revert: "Enable prange support.""
https://gcc.gnu.org/g:b8e3574e68310f68116f157a35d5650600d13718
commit r15-574-gb8e3574e68310f68116f157a35d5650600d13718
Author: Aldy Hernandez
Date: Thu May 16 09:47:56 2024 +0200
Cleanup prange sanity checks.
The pointers_handled_p() code was a temporary sanity check, and not
https://gcc.gnu.org/g:f6bed6d3fcc13880ffa786b6c616e2306efe2bf3
commit r15-573-gf6bed6d3fcc13880ffa786b6c616e2306efe2bf3
Author: Aldy Hernandez
Date: Thu May 16 09:22:55 2024 +0200
Use a boolean type when folding conditionals in simplify_using_ranges.
In adding some traps for
Any thoughts on this?
If no one objects, I'll re-enable prange tomorrow.
Aldy
On Sat, May 11, 2024 at 11:43 AM Aldy Hernandez wrote:
>
> I have pushed a few cleanups to make it easier to move forward without
> disturbing passes which are affected by IPA's mixing up the r
The pointers_handled_p() method is an internal range-op helper to help
catch dispatch type mismatches for pointer operands. This is what
caught the IPA mismatch in PR114985.
This method is only a temporary measure to catch any incompatibilities
in the current pointer range-op entries. This patch
https://gcc.gnu.org/g:c400b2100719d0a9e5989c63e0827b9e98919df3
commit r15-504-gc400b2100719d0a9e5989c63e0827b9e98919df3
Author: Aldy Hernandez
Date: Tue May 14 16:21:50 2024 +0200
[prange] Default pointers_handled_p() to false.
The pointers_handled_p() method is an internal range
On Thu, May 9, 2024 at 10:05 AM Mikael Morin wrote:
>
> Hello,
>
> Le 07/05/2024 à 04:37, HAO CHEN GUI a écrit :
> > Hi,
> >The former patch adds isfinite optab for __builtin_isfinite.
> > https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html
> >
> >Thus the builtin might not be
o, for the above 4 architectures things work as before, and we have a
PR to track the IPA problem which doesn't seem to affect neither
bootstrap nor tests.
Does this sound reasonable?
Aldy
On Fri, May 10, 2024 at 12:26 PM Richard Biener
wrote:
>
> On Fri, May 10, 2024 at 11:24 AM
For the record, we have always returned false (VARYING) for
unsupported range operators. This patch just restores the behavior
we've always had, while adding a knob for further analysis (for
example. IPA which is getting its range types mixed up).
Aldy
On Sat, May 11, 2024 at 11:28 AM
The canonical way to indicate that a range operator is unsupported is
to return false, which has the sematic meaning of VARYING. This patch
cleans up a few default virtuals that were trying harder to set
VARYING manually.
gcc/ChangeLog:
* range-op-ptr.cc (range_operator::fold_range): Ret
The trap in the range-op dispatch code is really an internal debugging
aid, and only a temporary one for a few weeks while the dust settles.
This patch turns it off by default, allowing problematic passes to
turn it on for analysis.
gcc/ChangeLog:
* range-op.cc (TRAP_ON_UNHANDLED_POINTER_
https://gcc.gnu.org/g:18c93c65a9fbaaf3762198e78fb3c24b9b6fd9fc
commit r15-379-g18c93c65a9fbaaf3762198e78fb3c24b9b6fd9fc
Author: Aldy Hernandez
Date: Fri May 10 18:55:34 2024 +0200
[prange] Default unimplemented prange operators to false.
The canonical way to indicate that a range
https://gcc.gnu.org/g:45ef24f2702dac4f8707ca682ed364019ee90c44
commit r15-378-g45ef24f2702dac4f8707ca682ed364019ee90c44
Author: Aldy Hernandez
Date: Fri May 10 23:21:29 2024 +0200
[prange] Do not trap by default on range dispatch mismatches.
The trap in the range-op dispatch code
gcc/ChangeLog:
PR tree-optimization/115026
* value-range.cc (prange::update_bitmask): Use operand bitmask.
---
gcc/value-range.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 3e1ecf69517..5bcb2c3f650 100644
--- a
https://gcc.gnu.org/g:cbd420a1c3e2bb549dc83b53cc9a31aa6b23952c
commit r15-363-gcbd420a1c3e2bb549dc83b53cc9a31aa6b23952c
Author: Aldy Hernandez
Date: Fri May 10 12:26:49 2024 +0200
[prange] Fix thinko in prange::update_bitmask() [PR115026]
gcc/ChangeLog:
PR tree
I would much prefer the IPA experts to fix the pass, but I'm afraid I
don't understand the code enough to do so.
Could someone lend a hand here?
Aldy
On Fri, May 10, 2024 at 12:26 PM Richard Biener
wrote:
>
> On Fri, May 10, 2024 at 11:24 AM Aldy Hernandez wrote:
> >
There are various calls into fold_range() that have the wrong type
associated with the range temporary used to hold the result. This
used to work, because we could store either integers or pointers in a
Value_Range, but is no longer the case with prange's. Now you must
explicitly state which type
In a world with same sized pointers we can always reuse the storage
slots, but since this is not always the case, we need to be more
careful. However, we can always store an undefined, because that
requires no extra storage.
gcc/ChangeLog:
PR tree-optimization/115009
* value-rang
https://gcc.gnu.org/g:ac255c7afeb8a558bd6224ff77277eebcd849d6e
commit r15-357-gac255c7afeb8a558bd6224ff77277eebcd849d6e
Author: Aldy Hernandez
Date: Thu May 9 23:37:30 2024 +0200
[prange] Do not assume all pointers are the same size [PR115009]
In a world with same sized pointers
This reverts commit 36e877996936abd8bd08f8b1d983c8d1023a5842 until the IPA
pass is fixed with regards to POINTER = POINTER POINTER.
---
gcc/gimple-range-cache.cc | 4 ++--
gcc/gimple-range-fold.cc | 4 ++--
gcc/gimple-range-fold.h | 2 +-
gcc/gimple-range-infer.cc | 2 +-
https://gcc.gnu.org/g:d7bb8eaade3cd3aa70715c8567b4d7b08098e699
commit r15-353-gd7bb8eaade3cd3aa70715c8567b4d7b08098e699
Author: Aldy Hernandez
Date: Fri May 10 00:29:13 2024 +0200
Revert: "Enable prange support." [PR114985]
This reve
This is:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114985
I have proposed a patch but need confirmation from the IPA folks.
Aldy
On Thu, May 9, 2024 at 10:08 AM Andreas Schwab wrote:
>
> Breaks bootstrap on aarch64.
>
> $ /opt/gcc/gcc-20240509/Build/./prev-gcc/xg++
> -B/opt/gcc/gcc-20240509
Pushed to trunk to unblock sparc.
On Fri, May 3, 2024 at 4:24 PM Aldy Hernandez wrote:
>
> Ahh, that is indeed cleaner, and there's no longer a need to assert
> the sizeof of individual ranges.
>
> It looks like a default constructor is needed for the buffer now, but
&g
https://gcc.gnu.org/g:d7ff8ae5313bea755f5960786b33a7b151e7b663
commit r15-336-gd7ff8ae5313bea755f5960786b33a7b151e7b663
Author: Aldy Hernandez
Date: Fri May 3 11:17:32 2024 +0200
[ranger] Force buffer alignment in Value_Range [PR114912]
gcc/ChangeLog:
PR tree
https://gcc.gnu.org/g:be3df704ce7de417682d57bc3e819dfcf0fdd501
commit r15-335-gbe3df704ce7de417682d57bc3e819dfcf0fdd501
Author: Aldy Hernandez
Date: Wed May 8 22:50:22 2024 +0200
[prange] Reword dispatch error message
After reading the ICE for the PR, it's obvious the
After reading the ICE for the PR, it's obvious the error message is
rather cryptic. This makes it less so.
gcc/ChangeLog:
* range-op.cc (range_op_handler::discriminator_fail): Reword error
message.
---
gcc/range-op.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
I'll defer to the PPC maintainers, but LGTM. The less special casing, the
better.
Aldy
On Wed, May 8, 2024, 07:33 Kewen.Lin wrote:
> Hi,
>
> This reverts commit r14-6478-gfda8e2f8292a90 "range:
> Workaround different type precision between _Float128 and
> long double [PR112788]" as the fixes fo
https://gcc.gnu.org/g:36e877996936abd8bd08f8b1d983c8d1023a5842
commit r15-312-g36e877996936abd8bd08f8b1d983c8d1023a5842
Author: Aldy Hernandez
Date: Tue May 7 14:05:50 2024 +0200
Enable prange support.
This throws the switch on prange. After this patch, it is no longer
valid
This throws the switch on prange. After this patch, it is no longer
valid to store a pointer in an irange (or vice versa). Instead, they
must go in prange, which is faster and more memory efficient.
I will push this now, so I have time to do any follow-up bugfixing
before going on paternity leav
Pushed to trunk.
On Sun, Apr 28, 2024 at 10:10 PM Aldy Hernandez wrote:
>
> The polymorphic Value_Range object takes a tree type at construction
> so it can determine what type of range to use (currently irange or
> frange). It seems a few of the types are slightly off. This isn
https://gcc.gnu.org/g:24853cd854eb9b8a5c7b9706ad0908221bf964ce
commit r15-270-g24853cd854eb9b8a5c7b9706ad0908221bf964ce
Author: Aldy Hernandez
Date: Tue Mar 19 17:55:58 2024 +0100
Minor range type fixes for IPA in preparation for prange.
The polymorphic Value_Range object takes a
PING.
I can probably commit this patchlet as a ranger maintainer, but I'd
prefer a nod from a global or IPA maintainer. It is the one patch
that's needed before I can throw the switch on prange support later
this week.
Thanks.
Aldy
On Sun, Apr 28, 2024 at 10:10 PM Aldy Hernan
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_gt::fold_range): New.
(operator_gt::op1_range): New.
(operator_gt::op2_range): New.
(operator_gt::op1_op2_relation): New.
(operator_gt::p
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_equal::fold_range): New.
(operator_equal::op1_range): New.
(operator_equal::op2_range): New.
(operator_equal::op1_op2_relation): New.
(op
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_ge::fold_range): New.
(operator_ge::op1_range): New.
(operator_ge::op2_range): New.
(operator_ge::op1_op2_relation): New.
(operator_ge::p
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for fold_range,
op1_range,
lhs_op1_relation, pointers_handled_p.
* range-op-ptr.cc (operator_identity::fold_range): New.
(operator_identity::lhs_op1_relation): New.
(operator_identity::op1_range
gcc/ChangeLog:
* range-op-ptr.cc
(operator_pointer_diff::op1_op2_relation_effect): New.
(operator_pointer_diff::pointers_handled_p): New.
---
gcc/range-op-ptr.cc | 32
1 file changed, 32 insertions(+)
diff --git a/gcc/range-op-ptr.cc b/gcc
gcc/ChangeLog:
* gimple-range-op.cc (class cfn_pass_through_arg1): Add overloads
for prange operations.
(cfn_strlen): Same.
---
gcc/gimple-range-op.cc | 36
1 file changed, 36 insertions(+)
diff --git a/gcc/gimple-range-op.cc b/gcc/gim
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_le::fold_range): New.
(operator_le::op1_range): New.
(operator_le::op2_range): New.
(operator_le::op1_op2_relation): New.
(operator_le::p
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_min::fold_range): New.
(operator_min::pointers_handled_p): New.
(operator_max::fold_range): New.
(operator_max::pointers_handled_p): New.
---
gc
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_cst::fold_range): New.
(operator_cst::pointers_handled_p): New.
---
gcc/range-op-mixed.h | 4
gcc/range-op-ptr.cc | 23 +++
2 files c
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_not_equal::fold_range): New.
(operator_not_equal::op1_range): New.
(operator_not_equal::op2_range): New.
(operator_not_equal::op1_op2_relation):
gcc/ChangeLog:
* value-range.cc (get_legacy_range): New version for prange.
---
gcc/value-range.cc | 35 +--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 62170a438bf..3e1ecf69517 100644
--- a/g
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (max_limit): New.
(min_limit): New.
(build_lt): New.
(build_le): New.
(build_gt): New.
(build_ge): New.
(operator_lt::fold_range):
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_addr_expr::op1_range): New.
(operator_addr_expr::pointers_handled_p): New.
---
gcc/range-op-mixed.h | 4
gcc/range-op-ptr.cc | 38 +++
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_cast::fold_range): New.
(operator_cast::op1_range): New.
(operator_cast::lhs_op1_relation): New.
(operator_cast::pointers_handled_p): New.
---
g
gcc/ChangeLog:
* range-op-ptr.cc (class pointer_plus_operator): Add overloaded
declarations
for pointer variants.
(pointer_plus_operator::fold_range): New.
(pointer_plus_operator::op2_range): New.
(pointer_plus_operator::pointers_handled_p): New.
---
gcc/r
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
* range-op-ptr.cc (operator_bitwise_and::fold_range): New.
(operator_bitwise_and::pointers_handled_p): New.
---
gcc/range-op-mixed.h | 6 ++
gcc/range-op-ptr.cc | 30
We seem to have a range-op entry for pointer bitwise OR that we've
inherited from the original VRP implementation, but it never gets
used. If this is not valid gimple, we can safely remove this entry.
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded declarations for pointer variants.
gcc/ChangeLog:
* value-range.cc (add_vrange): Add prange support.
---
gcc/value-range.cc | 16
1 file changed, 16 insertions(+)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 84113ccfbd0..62170a438bf 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@
There is a 2% slowdown to VRP unrelated to the work at hand. This patch
is a skeleton implementation of prange that exhibits this degradation. It
is meant as a place in the commit history we can return to in order to revisit
the issue.
The relevant discussion is here:
https://gcc.gnu.org/piperm
This patch adds the range-op dispatch code for prange, and adds some
temporary sanity checks (for flag_checking only) to make sure we handle
all the pointer/integer variants.
In order to make sure I got all the combinations right, I started with
a clean slate, trapping on all pointer operands. Th
This provides a bare prange class with bounds and bitmasks. It will
be a drop-in replacement for pointer ranges, so we can pull their
support from irange. The range-op code will be contributed as a
follow-up.
The code is disabled by default, as irange::supports_p still accepts
pointers:
inline
gcc/ChangeLog:
* value-range-storage.cc (vrange_allocator::clone_varying): Add
prange support.
(vrange_allocator::clone_undefined): Same.
(vrange_storage::alloc): Same.
(vrange_storage::set_vrange): Same.
(vrange_storage::get_vrange): Same.
(
u.org/pipermail/gcc-patches/2024-May/650320.html
So things are looking relatively good.
The memory usage will also decrease, both by the 14% reduction in
Value_Range, and by prange's being smaller than say int_range_max or
int_range<3>.
Tested and benchmarked on x86-64 Linux.
Al
gcc/ChangeLog:
* data-streamer-in.cc (streamer_read_value_range): Add prange support.
* data-streamer-out.cc (streamer_write_vrange): Same.
---
gcc/data-streamer-in.cc | 12
gcc/data-streamer-out.cc | 10 ++
2 files changed, 22 insertions(+)
diff --git a/gcc
https://gcc.gnu.org/g:6cec31d44a426fa031ca07266fd2723b0038de83
commit r15-164-g6cec31d44a426fa031ca07266fd2723b0038de83
Author: Aldy Hernandez
Date: Wed Mar 20 11:27:21 2024 +0100
Add prange entries in gimple-range-op.cc.
gcc/ChangeLog:
* gimple-range-op.cc
https://gcc.gnu.org/g:ff306c77b7cf5b7b09914f38b7351328835ac4ce
commit r15-163-gff306c77b7cf5b7b09914f38b7351328835ac4ce
Author: Aldy Hernandez
Date: Wed Mar 20 11:15:03 2024 +0100
Implement operator_ge for prange
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:76fae4051a72b2d417d50f1980dff8ab0c50d0c5
commit r15-162-g76fae4051a72b2d417d50f1980dff8ab0c50d0c5
Author: Aldy Hernandez
Date: Wed Mar 20 11:10:03 2024 +0100
Implement operator_gt for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded
https://gcc.gnu.org/g:3a4ee6ea8627efe0d34a71d0ea4ce9b70d34df18
commit r15-161-g3a4ee6ea8627efe0d34a71d0ea4ce9b70d34df18
Author: Aldy Hernandez
Date: Wed Mar 20 11:07:30 2024 +0100
Implement operator_le for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded
https://gcc.gnu.org/g:bfa2323d1ddf96a4f40a26aa39b8e1e3bd9b6d98
commit r15-160-gbfa2323d1ddf96a4f40a26aa39b8e1e3bd9b6d98
Author: Aldy Hernandez
Date: Wed Mar 20 11:03:24 2024 +0100
Implement operator_lt for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add overloaded
https://gcc.gnu.org/g:d1be4c907fa47d868d6ef31e8fd7ede0535420ca
commit r15-158-gd1be4c907fa47d868d6ef31e8fd7ede0535420ca
Author: Aldy Hernandez
Date: Wed Mar 20 10:49:11 2024 +0100
Implement operator_not_equal for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:bcb226924f50d9b84ca32b6f39abb63b43e23229
commit r15-159-gbcb226924f50d9b84ca32b6f39abb63b43e23229
Author: Aldy Hernandez
Date: Wed Mar 20 10:54:39 2024 +0100
Implement operator_equal for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
1 - 100 of 1063 matches
Mail list logo