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,
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
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
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
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.""
This reverts commit
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
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
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
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
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
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 reverts commit
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
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 error
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
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
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
https://gcc.gnu.org/g:6b9e640d49138183aaeee67f2dcf3de329318d27
commit r15-157-g6b9e640d49138183aaeee67f2dcf3de329318d27
Author: Aldy Hernandez
Date: Wed Mar 20 10:29:50 2024 +0100
Implement operator_bitwise_or for prange.
We seem to have a range-op entry for pointer bitwise OR
https://gcc.gnu.org/g:e58f14916954411628eb122da996383b8c996b57
commit r15-156-ge58f14916954411628eb122da996383b8c996b57
Author: Aldy Hernandez
Date: Wed Mar 20 10:23:31 2024 +0100
Implement operator_bitwise_and for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:f803b93feef60c8c2d4f7f7270bfc94650dbc8f5
commit r15-155-gf803b93feef60c8c2d4f7f7270bfc94650dbc8f5
Author: Aldy Hernandez
Date: Wed Mar 20 10:12:47 2024 +0100
Implement operator_pointer_diff for prange.
gcc/ChangeLog:
* range-op-ptr.cc
https://gcc.gnu.org/g:86ff3c45ea82452888244476f26a4f628b148ace
commit r15-154-g86ff3c45ea82452888244476f26a4f628b148ace
Author: Aldy Hernandez
Date: Wed Mar 20 10:04:41 2024 +0100
Implement pointer_plus_operator for prange.
gcc/ChangeLog:
* range-op-ptr.cc (class
https://gcc.gnu.org/g:54d3fd6d9f5d029c23ab376df2f5decb4902907d
commit r15-153-g54d3fd6d9f5d029c23ab376df2f5decb4902907d
Author: Aldy Hernandez
Date: Wed Mar 20 09:51:33 2024 +0100
Implement operator_addr_expr for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:1a4f5d499109d3f2a06bfd1403b6d47d6f55e481
commit r15-152-g1a4f5d499109d3f2a06bfd1403b6d47d6f55e481
Author: Aldy Hernandez
Date: Wed Mar 20 08:44:49 2024 +0100
Implement operator_min and operator_max for prange.
gcc/ChangeLog:
*
https://gcc.gnu.org/g:95fce0dc73002d5c9557fa7260c7ba1e761136ff
commit r15-151-g95fce0dc73002d5c9557fa7260c7ba1e761136ff
Author: Aldy Hernandez
Date: Wed Mar 20 08:04:32 2024 +0100
Implement operator_cast for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:a91fd7b4342dbeaf1d2514beaee3af0bb5680b81
commit r15-150-ga91fd7b4342dbeaf1d2514beaee3af0bb5680b81
Author: Aldy Hernandez
Date: Wed Mar 20 07:55:57 2024 +0100
Implement operator_cst for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:e7b6e9663e9b31e681fb0302338bcb4bb306a334
commit r15-149-ge7b6e9663e9b31e681fb0302338bcb4bb306a334
Author: Aldy Hernandez
Date: Wed Mar 20 07:50:11 2024 +0100
Implement operator_identity for prange.
gcc/ChangeLog:
* range-op-mixed.h: Add
https://gcc.gnu.org/g:ddf039adef5e2695f1cb27e0b6e5056fef4be2ee
commit r15-147-gddf039adef5e2695f1cb27e0b6e5056fef4be2ee
Author: Aldy Hernandez
Date: Wed Mar 20 06:39:48 2024 +0100
Add prange implementation for get_legacy_range.
gcc/ChangeLog:
* value-range.cc
https://gcc.gnu.org/g:31377eed515506c9e8ba2ac8fa3ab4e743f8c1f3
commit r15-148-g31377eed515506c9e8ba2ac8fa3ab4e743f8c1f3
Author: Aldy Hernandez
Date: Wed Mar 20 07:19:45 2024 +0100
Implement range-op dispatch for prange.
This patch adds the range-op dispatch code for prange, and
https://gcc.gnu.org/g:7c1b136630790eb34d57c45d9a816b32fd904e3f
commit r15-146-g7c1b136630790eb34d57c45d9a816b32fd904e3f
Author: Aldy Hernandez
Date: Wed Mar 20 06:39:07 2024 +0100
Add hashing support for prange.
gcc/ChangeLog:
* value-range.cc (add_vrange): Add
https://gcc.gnu.org/g:f859996a976ca185f371a8ed395e9c8e459e05b0
commit r15-145-gf859996a976ca185f371a8ed395e9c8e459e05b0
Author: Aldy Hernandez
Date: Wed Mar 20 06:38:06 2024 +0100
Add storage support for prange.
gcc/ChangeLog:
* value-range-storage.cc
https://gcc.gnu.org/g:a7f1285380029d2928d61e61032c1948ccabc495
commit r15-144-ga7f1285380029d2928d61e61032c1948ccabc495
Author: Aldy Hernandez
Date: Wed Mar 20 06:34:26 2024 +0100
Add streaming support for prange.
gcc/ChangeLog:
* data-streamer-in.cc
https://gcc.gnu.org/g:64993a89ad75814ab69addade1b2c0020a180f41
commit r15-143-g64993a89ad75814ab69addade1b2c0020a180f41
Author: Aldy Hernandez
Date: Wed Mar 20 06:25:52 2024 +0100
Implement basic prange class.
This provides a bare prange class with bounds and bitmasks. It will
https://gcc.gnu.org/g:f5891967947562060076956bd953e5df4c7289bf
commit r15-142-gf5891967947562060076956bd953e5df4c7289bf
Author: Aldy Hernandez
Date: Sat May 4 06:45:18 2024 +0200
Minimal prange class showing inlining degradation to VRP.
There is a 2% slowdown to VRP unrelated to
t;
> On 4/30/24 12:22, Jakub Jelinek wrote:
> > On Tue, Apr 30, 2024 at 03:09:51PM -0400, Jason Merrill via Gcc wrote:
> >> On Fri, Apr 26, 2024 at 5:44 AM Aldy Hernandez via Gcc
> >> wrote:
> >>>
> >>> In implementing prange (pointer ranges)
https://gcc.gnu.org/g:c60b3e211c555706cdc2dc8bfcdd540152cff350
commit r15-88-gc60b3e211c555706cdc2dc8bfcdd540152cff350
Author: Aldy Hernandez
Date: Tue Apr 30 19:39:00 2024 +0200
Reduce startup costs for Value_Range.
Value_Range is our polymorphic temporary that can hold any
https://gcc.gnu.org/g:1b5732de7e3980aa5197b1ac818f48f1ce9f87ab
commit r15-87-g1b5732de7e3980aa5197b1ac818f48f1ce9f87ab
Author: Aldy Hernandez
Date: Tue Apr 30 18:54:11 2024 +0200
Cleanups to unsupported_range.
Here are some cleanups to unsupported_range so the assignment operator
https://gcc.gnu.org/g:0b2735e0797fee9b4ec5cd74f22afe0483f888dd
commit r15-70-g0b2735e0797fee9b4ec5cd74f22afe0483f888dd
Author: Aldy Hernandez
Date: Tue Apr 30 10:36:58 2024 +0200
Change int_range<2> to infinite precision.
In my previous change I mistakenly changed Value_Range to
On Tue, Apr 30, 2024 at 9:58 AM Richard Biener
wrote:
>
> On Fri, Apr 26, 2024 at 11:45 AM Aldy Hernandez via Gcc
> wrote:
> >
> > Hi folks!
> >
> > In implementing prange (pointer ranges), I have found a 1.74% slowdown
> > in VRP, even without any cod
https://gcc.gnu.org/g:d71308d5a681de00ea291136c162e5b46c7c
commit r15-41-gd71308d5a681de00ea291136c162e5b46c7c
Author: Aldy Hernandez
Date: Tue Apr 23 10:12:56 2024 +0200
Callers of irange_bitmask must normalize value/mask pairs.
As per the documentation, irange_bitmask
https://gcc.gnu.org/g:3b9abfd2df5fe720798aab1e21b4a11876607561
commit r15-40-g3b9abfd2df5fe720798aab1e21b4a11876607561
Author: Aldy Hernandez
Date: Wed Mar 20 05:51:55 2024 +0100
Remove range_zero and range_nonzero.
Remove legacy range_zero and range_nonzero as they return by
https://gcc.gnu.org/g:df6a1bc59a355c9fee10d29f54c9dca81612afb6
commit r15-39-gdf6a1bc59a355c9fee10d29f54c9dca81612afb6
Author: Aldy Hernandez
Date: Tue Mar 19 20:26:27 2024 +0100
Move print_irange_* out of vrange_printer class.
Move some code out of the irange pretty printers so
https://gcc.gnu.org/g:c284f8d2d16ce9c29defce3329419ccc54605ad4
commit r15-37-gc284f8d2d16ce9c29defce3329419ccc54605ad4
Author: Aldy Hernandez
Date: Tue Mar 19 18:22:08 2024 +0100
Make some integer specific ranges generic Value_Range's.
There are some irange uses that should be
https://gcc.gnu.org/g:b102633be7d0b763d106b0a883679bb1497ca17c
commit r15-38-gb102633be7d0b763d106b0a883679bb1497ca17c
Author: Aldy Hernandez
Date: Tue Mar 19 18:29:21 2024 +0100
Accept any vrange in range_includes_zero_p.
Accept a vrange, as this will be used for either integers
https://gcc.gnu.org/g:2caf7a50a6a9de80d2767d82b8cdb69d63469aaf
commit r15-36-g2caf7a50a6a9de80d2767d82b8cdb69d63469aaf
Author: Aldy Hernandez
Date: Tue Mar 19 18:04:55 2024 +0100
Move get_bitmask_from_range out of irange class.
prange will also have bitmasks, so it will need to
https://gcc.gnu.org/g:92f74ee21218cab08d7bb7769004a65e8a291fa3
commit r15-34-g92f74ee21218cab08d7bb7769004a65e8a291fa3
Author: Aldy Hernandez
Date: Tue Mar 19 16:35:41 2024 +0100
Verify that reading back from vrange_storage doesn't drop bits.
We have a sanity check in the irange
https://gcc.gnu.org/g:9a2f0d152d98dd55efc9accd07ea507b929c3516
commit r15-35-g9a2f0d152d98dd55efc9accd07ea507b929c3516
Author: Aldy Hernandez
Date: Tue Mar 19 17:17:53 2024 +0100
Accept a vrange in get_legacy_range.
In preparation for prange, make get_legacy_range take a generic
https://gcc.gnu.org/g:d883fc7d00ed6bf5ee151de4fd3e05431582bd5f
commit r15-33-gd883fc7d00ed6bf5ee151de4fd3e05431582bd5f
Author: Aldy Hernandez
Date: Tue Mar 19 16:33:47 2024 +0100
Change range_includes_zero_p argument to a reference.
Make range_includes_zero_p take an argument
https://gcc.gnu.org/g:039e88b1aea5723221e8b0b926c35afb2f96a8a9
commit r15-32-g039e88b1aea5723221e8b0b926c35afb2f96a8a9
Author: Aldy Hernandez
Date: Wed Feb 7 11:27:29 2024 +0100
Make fold_cond_with_ops use a boolean type for range_true/range_false.
Conditional operators are
https://gcc.gnu.org/g:eeef1f69c5e77ecf13fdcf44df5bcf592a9993e6
commit r15-31-geeef1f69c5e77ecf13fdcf44df5bcf592a9993e6
Author: Aldy Hernandez
Date: Wed Feb 21 09:34:29 2024 +0100
Remove GTY support for vrange and derived classes.
Now that we have a vrange storage class to save
https://gcc.gnu.org/g:ba1a8e8eed963c0253c6e5550c8bccc264c5d469
commit r15-29-gba1a8e8eed963c0253c6e5550c8bccc264c5d469
Author: Aldy Hernandez
Date: Mon Apr 22 13:34:48 2024 +0200
Add tree versions of lower and upper bounds to vrange.
This patch adds vrange::lbound() and
https://gcc.gnu.org/g:fd4cf7a092bb2ce21c0d8246c17c0b7f82de440c
commit r15-30-gfd4cf7a092bb2ce21c0d8246c17c0b7f82de440c
Author: Aldy Hernandez
Date: Thu Feb 22 09:18:46 2024 +0100
Move bitmask routines to vrange base class.
Any range can theoretically have a bitmask of set bits.
https://gcc.gnu.org/g:a46564e4876c9a863d9897d72963cc4f03689adc
commit r15-28-ga46564e4876c9a863d9897d72963cc4f03689adc
Author: Aldy Hernandez
Date: Mon Apr 22 13:29:39 2024 +0200
Make some Value_Range's explicitly integer.
Fix some Value_Range's that we know ahead of time will be
https://gcc.gnu.org/g:a78dfb0fc83606e9b83b76575deb7e43300254fa
commit r15-27-ga78dfb0fc83606e9b83b76575deb7e43300254fa
Author: Aldy Hernandez
Date: Wed Feb 21 09:33:19 2024 +0100
Add a virtual vrange destructor.
Richi mentioned in PR113476 that it would be cleaner to move the
https://gcc.gnu.org/g:21713edf52974d14238cdda865fc662eca58302a
commit r15-26-g21713edf52974d14238cdda865fc662eca58302a
Author: Aldy Hernandez
Date: Wed Feb 21 20:37:14 2024 +0100
Make vrange an abstract class.
Explicitly make vrange an abstract class. This involves fleshing out
Hi folks!
In implementing prange (pointer ranges), I have found a 1.74% slowdown
in VRP, even without any code path actually using the code. I have
tracked this down to irange::get_bitmask() being compiled differently
with and without the bare bones patch. With the patch,
irange::get_bitmask()
In trying to come up with a missing testcase for commit 979e0fbf53cd,
I've realized the patch doesn't catch anything.
A relation of VREL_EQ in foperator_ltgt::fold_range() is either both
arguments the same (x LTGT_EXPR x), which we should never emit, or two
arguments that are actually the same,
In the conversion of iranges to wide_int (commit cb779afeff204f), I
mistakenly made contains_zero_p() return TRUE for undefined ranges.
This means the rest of the patch was adjusted for this stupidity.
For example, we ended up doing the following, to make up for the fact
that contains_zero_p was
LTGT_EXPR hasn't been handling relations, especially with NANs as a
possibility. This handles them while documenting how relations work
in a world with NANs.
Basically we need to special case VREL_EQ before calling
frelop_early_resolve. Note that VREL_EQ on entry to a range-op entry
is really
[Jakub/Andrew: I've been staring at this for far too long and could
use another pair of eyes.]
This patch implements a new frelop_early_resolve() that handles the
NAN special cases instead of calling into the integer version which
can break for some combinations. Relaxing FP conditional folding
When one operand is a known NAN, we always return TRUE from
union_nans(), even if no change occurred. This patch fixes the
oversight.
gcc/ChangeLog:
* value-range.cc (frange::union_nans): Return false if nothing
changed.
(range_tests_floats): New test.
---
The mask/value pair we track in the irange is a bit fickle in that it
can sometimes contradict the bitmask inherent in the range. This can
happen when a series of calculations yield a combination such as:
[3, 1000] MASK 0xfffe VALUE 0x0
The mask/value above implies that the lowest
On 7/31/23 18:47, Martin Jambor wrote:
Hello,
On Tue, Jul 18 2023, Aldy Hernandez wrote:
On 7/17/23 15:14, Aldy Hernandez wrote:
Instead of reading the known zero bits in IPA, read the value/mask
pair which is available.
There is a slight change of behavior here. I have removed the check
On 8/3/23 16:29, Jeff Law wrote:
On 8/3/23 08:23, Jan Hubicka wrote:
Jeff, an help would be appreciated here :)
I will try to debug this. One option would be to disable branch
prediciton on vect_check for time being - it is not inlined anyway
Not a lot of insight. The backwards threader
PING * 2
On Tue, Jul 25, 2023 at 8:32 AM Aldy Hernandez wrote:
>
> Ping
>
> On Mon, Jul 17, 2023, 15:14 Aldy Hernandez wrote:
>>
>> Instead of reading the known zero bits in IPA, read the value/mask
>> pair which is available.
>>
>> There is a slight change of behavior here. I have removed the
Now that we can generically handle bitmasks for unary operators,
there's no need to special case them.
gcc/ChangeLog:
* range-op-mixed.h (class operator_cast): Add update_bitmask.
* range-op.cc (operator_cast::update_bitmask): New.
(operator_cast::fold_range): Call
gcc/ChangeLog:
* range-op.cc (class operator_absu): Add update_bitmask.
(operator_absu::update_bitmask): New.
---
gcc/range-op.cc | 9 +
1 file changed, 9 insertions(+)
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index bfab53caea0..5653ca0d186 100644
---
gcc/ChangeLog:
* range-op-mixed.h (class operator_abs): Add update_bitmask.
* range-op.cc (operator_abs::update_bitmask): New.
---
gcc/range-op-mixed.h | 2 ++
gcc/range-op.cc | 6 ++
2 files changed, 8 insertions(+)
diff --git a/gcc/range-op-mixed.h
gcc/ChangeLog:
* range-op-mixed.h (class operator_bitwise_not): Add update_bitmask.
* range-op.cc (operator_bitwise_not::update_bitmask): New.
---
gcc/range-op-mixed.h | 2 ++
gcc/range-op.cc | 7 +++
2 files changed, 9 insertions(+)
diff --git a/gcc/range-op-mixed.h
It looks like we missed out on bitmasks for unary operators because we
were using bit_value_binop exclusively. This patch hands off to
bit_value_unop when appropriate, thus allowing us to handle ABS and
BIT_NOT_EXPR, and others. Follow-up patches will add the tweaks for the
range-ops entries
The frange bits look fine to me, so if you feel confident in the math
logic, go right ahead :).
Thanks.
Aldy
On 7/24/23 18:01, Jakub Jelinek wrote:
Hi!
IEEE754 says that x + (-x) and x - x result in +0 in all rounding modes
but rounding towards negative infinity, in which case the result is
bit_value_binop initializes VAL regardless of the final mask. It even
has a comment to that effect:
/* Ensure that VAL is initialized (to any value). */
However, bit_value_unop, which in theory shares the same API, does not.
This causes range-ops to choke on uninitialized VALs for some
Committed as obvious.
gcc/ChangeLog:
* tree-ssa-ccp.cc (value_mask_to_min_max): Make static.
(bit_value_mult_const): Same.
(get_individual_bits): Same.
---
gcc/tree-ssa-ccp.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-ssa-ccp.cc
Ping
On Mon, Jul 17, 2023, 15:14 Aldy Hernandez wrote:
> Instead of reading the known zero bits in IPA, read the value/mask
> pair which is available.
>
> There is a slight change of behavior here. I have removed the check
> for SSA_NAME, as the ranger can calculate the range and value/mask
On 7/17/23 15:14, Aldy Hernandez wrote:
Instead of reading the known zero bits in IPA, read the value/mask
pair which is available.
There is a slight change of behavior here. I have removed the check
for SSA_NAME, as the ranger can calculate the range and value/mask for
INTEGER_CST. This
Instead of reading the known zero bits in IPA, read the value/mask
pair which is available.
There is a slight change of behavior here. I have removed the check
for SSA_NAME, as the ranger can calculate the range and value/mask for
INTEGER_CST. This simplifies the code a bit, since there's no
Currently IPA throws away the known 1 bits because VRP and irange have
traditionally only had a way of tracking known 0s (set_nonzero_bits).
With the ability to keep all the known bits in the irange, we can now
save this between passes.
OK?
gcc/ChangeLog:
* ipa-prop.cc
Currently CCP throws away the known 1 bits because VRP and irange have
traditionally only had a way of tracking known 0s (set_nonzero_bits).
With the ability to keep all the known bits in the irange, we can now
save this between passes.
OK?
gcc/ChangeLog:
* tree-ssa-ccp.cc
The bit twiddling in union/intersect for the value/mask pair must be
normalized to have the unknown bits with a value of 0 in order to make
the math simpler. Normalizing at construction slowed VRP by 1.5% so I
opted to normalize before updating the bitmask in range-ops, since it
was the only
This patch provides a way to set the value/mask pair of known bits
globally, similarly to how we can use set_nonzero_bits for known 0
bits. This can then be used by CCP and IPA to set value/mask info
instead of throwing away the known 1 bits.
In further clean-ups, I will see if it makes sense to
On 7/14/23 15:37, Richard Biener wrote:
On Fri, 14 Jul 2023, Aldy Hernandez wrote:
I don't know what you're trying to accomplish here, as I haven't been
following the PR, but adding all these helper functions to the ranger header
file seems wrong, especially since there's only one use of
I don't know what you're trying to accomplish here, as I haven't been
following the PR, but adding all these helper functions to the ranger
header file seems wrong, especially since there's only one use of them.
I see you're tweaking the irange API, adding helper functions to
range-op (which
On 7/12/23 23:50, Jeff Law wrote:
On 7/12/23 15:15, Aldy Hernandez via Gcc-patches wrote:
This patch teaches popcount about known set bits which are now
available in the irange.
PR tree-optimization/107053
gcc/ChangeLog:
* gimple-range-op.cc (cfn_popcount): Use known set bits
This patch teaches popcount about known set bits which are now
available in the irange.
PR tree-optimization/107053
gcc/ChangeLog:
* gimple-range-op.cc (cfn_popcount): Use known set bits.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr107053.c: New test.
---
PR tree-optimization/107043
gcc/ChangeLog:
* range-op.cc (operator_bitwise_and::op1_range): Update bitmask.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr107043.c: New test.
---
gcc/range-op.cc | 8
Throw the switch in range-ops to make full use of the value/mask
information instead of only the nonzero bits. This will cause most of
the operators implemented in range-ops to use the value/mask
information calculated by CCP's bit_value_binop() function which
range-ops uses. This opens up more
Integer ranges (irange) currently track known 0 bits. We've wanted to
track known 1 bits for some time, and instead of tracking known 0 and
known 1's separately, it has been suggested we track a value/mask pair
similarly to what we do for CCP and RTL. This patch implements such a
thing.
With
Per the function comment, the caller to intersect(wide_int, wide_int)
must handle the mask. This means it must also normalize the range if
anything changed.
gcc/ChangeLog:
* value-range.cc (irange::intersect): Leave normalization to
caller.
---
gcc/value-range.cc | 7 +--
1
gcc/ChangeLog:
* value-range.cc (irange::get_bitmask_from_range): Return all the
known bits for a singleton.
(irange::set_range_from_bitmask): Set a range of a singleton when
all bits are known.
---
gcc/value-range.cc | 19 ++-
1 file changed, 18
There's a few spots where a range is being altered in-place, but we
fail to call normalize the range. This patch makes sure we always
call normalize_kind(), and that normalize_kind in turn, calls
verify_range to make sure verything is canonical.
gcc/ChangeLog:
* value-range.cc
gcc/ChangeLog:
* tree-vrp.cc (maybe_set_nonzero_bits): Move from here...
* tree-ssa-dom.cc (maybe_set_nonzero_bits): ...to here.
* tree-vrp.h (maybe_set_nonzero_bits): Remove.
---
gcc/tree-ssa-dom.cc | 65 +
gcc/tree-vrp.cc
ng*2
> >
> > On Wed, Jun 14, 2023, 14:11 Aldy Hernandez wrote:
> >>
> >> PING
> >>
> >> On Sat, Jun 10, 2023 at 10:30 PM Aldy Hernandez wrote:
> >> >
> >> >
> >> >
> >> > On 5/29/23 16:51, Martin Jam
5/29/23 16:51, Martin Jambor wrote:
>> > > Hi,
>> > >
>> > > On Mon, May 22 2023, Aldy Hernandez via Gcc-patches wrote:
>> > >> Implement hashing for ipa_vr. When all is said and done, all these
>> > >> patches incurr a 7.64% slowdo
Ping*2
On Wed, Jun 14, 2023, 14:11 Aldy Hernandez wrote:
> PING
>
> On Sat, Jun 10, 2023 at 10:30 PM Aldy Hernandez wrote:
> >
> >
> >
> > On 5/29/23 16:51, Martin Jambor wrote:
> > > Hi,
> > >
> > > On Mon, May 22 2023, Aldy Hernande
1 - 100 of 1233 matches
Mail list logo