89b0276d3f
It's cleaner to have the unsupported_range fully fleshed out, instead of trapping on every operation. It can also serve as the basis for the default vrange methods that frange and prange will inherit. This patch implements most methods, including union and intersect, to handle an UNDEFINED and a VARYING range. Since this can serve as the basis for other classes, I have moved everything into the vrange class, making the unsupported_range trivial. Note that vrange is still an abstract class, as I have purposely left the dump() method abstract. Also, I have made the unsupported range in the temporary class (Value_Range) a method field, instead of a static member. This way the temporary can set UNDEFINED and VARYING as needed. Tested on x86-64 Linux. gcc/ChangeLog: * value-range.cc (vrange::contains_p): Implement. (vrange::type): Return void. (vrange::supports_type_p): Implement. (irange::fits_p): Same. (vrange::set_undefined): Same. (irange::set_nonnegative): Same. (vrange::set_varying): Same. (vrange::union_): Same. (unsupported_range::set): Move to vrange. (unsupported_range::type): Move to vrange. (vrange::intersect): Implement for varying and undefined. (vrange::zero_p): Implement. (unsupported_range::supports_type_p): Move to vrange. (vrange::nonzero_p): Implement. (unsupported_range::set_undefined): Move to vrange. (unsupported_range::set_varying): Same. (unsupported_range::dump): Same. (unsupported_range::union_): Same. Implement for varying and undefined. (unsupported_range::intersect): Move to vrange. (unsupported_range::zero_p): Same. (unsupported_range::nonzero_p): Same. (unsupported_range::set_nonzero): Same. (unsupported_range::set_zero): Same. (unsupported_range::set_nonnegative): Same. (unsupported_range::fits_p): Same. * value-range.h (class vrange): Remove abstract markers for most methods. (class unsupported_range): Remove most methods as they will now be inherited from vrange. |
||
---|---|---|
c++tools | ||
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcody | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
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 | ||
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.