]> gcc.gnu.org Git - gcc.git/commit
Callers of irange_bitmask must normalize value/mask pairs.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 23 Apr 2024 08:12:56 +0000 (10:12 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Sun, 28 Apr 2024 19:03:01 +0000 (21:03 +0200)
commitd71308d5a681de008888ea291136c162e5b46c7c
tree47c8e3131d4a7b74f97a78c9acfb997e0f5b66f3
parent3b9abfd2df5fe720798aab1e21b4a11876607561
Callers of irange_bitmask must normalize value/mask pairs.

As per the documentation, irange_bitmask must have the unknown bits in
the mask set to 0 in the value field.  Even though we say we must have
normalized value/mask bits, we don't enforce it, opting to normalize
on the fly in union and intersect.  Avoiding this lazy enforcing as
well as the extra saving/restoring involved in returning the changed
status, gives us a performance increase of 1.25% for VRP and 1.51% for
ipa-CP.

gcc/ChangeLog:

* tree-ssa-ccp.cc (ccp_finalize): Normalize before calling
set_bitmask.
* value-range.cc (irange::intersect_bitmask): Calculate changed
irange_bitmask bits on our own.
(irange::union_bitmask): Same.
(irange_bitmask::verify_mask): Verify that bits are normalized.
* value-range.h (irange_bitmask::union_): Do not normalize.
Remove return value.
(irange_bitmask::intersect): Same.
gcc/tree-ssa-ccp.cc
gcc/value-range.cc
gcc/value-range.h
This page took 0.064778 seconds and 6 git commands to generate.