Go to file
Aldy Hernandez cab411a2b4 Set nonzero bits from bitwise and operator in range-ops.
Now that nonzero bits are first class citizens in the range, we can
keep better track of them in range-ops, especially the bitwise and
operator.

This patch sets the nonzero mask for the trivial case.  In doing so,
I've removed some old dead code that was an attempt to keep better
track of masks.

I'm sure there are tons of optimizations throughout range-ops that
could be implemented, especially the op1_range methods, but those
always make my head hurt.  I'll leave them to the smarter hackers
out there.

I've removed the restriction that nonzero bits can't be queried from
legacy.  This was causing special casing all over the place, and
it's not like we can generate incorrect code.  We just silently
drop nonzero bits to -1 in some of the legacy code.  The end result
is that VRP1, and other users of legacy, may not benefit from these
improvements.

Tested and benchmarked on x86-64 Linux.

gcc/ChangeLog:

	* range-op.cc (unsigned_singleton_p): Remove.
	(operator_bitwise_and::remove_impossible_ranges): Remove.
	(operator_bitwise_and::fold_range): Set nonzero bits.  *
	* value-range.cc (irange::get_nonzero_bits): Remove
	legacy_mode_p assert.
	(irange::dump_bitmasks): Remove legacy_mode_p check.
2022-07-12 16:40:51 +02:00
c++tools
config
contrib Daily bump. 2022-07-05 00:16:36 +00:00
fixincludes
gcc Set nonzero bits from bitwise and operator in range-ops. 2022-07-12 16:40:51 +02:00
gnattools
gotools
include lto-plugin: implement LDPT_GET_API_VERSION 2022-07-12 15:26:57 +02:00
INSTALL
intl
libada
libatomic
libbacktrace Daily bump. 2022-07-09 00:16:54 +00:00
libcc1
libcody
libcpp Daily bump. 2022-07-11 00:16:25 +00:00
libdecnumber
libffi
libgcc
libgfortran
libgo
libgomp libgomp: Add tailing \n to gomp_debug 2022-07-12 11:10:50 +02:00
libiberty Daily bump. 2022-07-05 00:16:36 +00:00
libitm
libobjc
liboffloadmic Daily bump. 2022-07-05 00:16:36 +00:00
libphobos Daily bump. 2022-07-07 00:16:46 +00:00
libquadmath
libsanitizer libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream 2022-07-11 22:04:00 +02:00
libssp
libstdc++-v3 libstdc++: Prefer const T to std::add_const_t<T> 2022-07-12 09:13:45 +01:00
libvtv
lto-plugin lto-plugin: implement LDPT_GET_API_VERSION 2022-07-12 15:26:57 +02:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-07-05 00:16:36 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: fix alphabetic sorting 2022-07-04 12:16:32 +02:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.