Find a file
Aldy Hernandez 4ba9fb0a3e Multi-range implementation for value_range (irange).
Implement class irange, a generic multi-range implementation for
value ranges.  This class is API compatible with value_range, and is meant
to seamlessly coexist with it.

gcc/ChangeLog:

	* Makefile.in (GTFILES): Move value-range.h up.
	* gengtype-lex.l: Set yylval to handle GTY markers on templates.
	* ipa-cp.c (initialize_node_lattices): Call value_range
	constructor.
	(ipcp_propagate_stage): Use in-place new so value_range construct
	is called.
	* ipa-fnsummary.c (evaluate_conditions_for_known_args): Use std
	vec instead of GCC's vec<>.
	(evaluate_properties_for_edge): Adjust for std vec.
	(ipa_fn_summary_t::duplicate): Same.
	(estimate_ipcp_clone_size_and_time): Same.
	* ipa-prop.c (ipa_get_value_range): Use in-place new for
	value_range.
	* ipa-prop.h (struct GTY): Remove class keyword for m_vr.
	* range-op.cc (empty_range_check): Rename to...
	(empty_range_varying): ...this and adjust for varying.
	(undefined_shift_range_check): Adjust for irange.
	(range_operator::wi_fold): Same.
	(range_operator::fold_range): Adjust for irange.  Special case
	single pairs for performance.
	(range_operator::op1_range): Adjust for irange.
	(range_operator::op2_range): Same.
	(value_range_from_overflowed_bounds): Same.
	(value_range_with_overflow): Same.
	(create_possibly_reversed_range): Same.
	(range_true): Same.
	(range_false): Same.
	(range_true_and_false): Same.
	(get_bool_state):  Adjust for irange and tweak for performance.
	(operator_equal::fold_range): Adjust for irange.
	(operator_equal::op1_range): Same.
	(operator_equal::op2_range): Same.
	(operator_not_equal::fold_range): Same.
	(operator_not_equal::op1_range): Same.
	(operator_not_equal::op2_range): Same.
	(build_lt): Same.
	(build_le): Same.
	(build_gt): Same.
	(build_ge): Same.
	(operator_lt::fold_range): Same.
	(operator_lt::op1_range): Same.
	(operator_lt::op2_range): Same.
	(operator_le::fold_range): Same.
	(operator_le::op1_range): Same.
	(operator_le::op2_range): Same.
	(operator_gt::fold_range): Same.
	(operator_gt::op1_range): Same.
	(operator_gt::op2_range): Same.
	(operator_ge::fold_range): Same.
	(operator_ge::op1_range): Same.
	(operator_ge::op2_range): Same.
	(operator_plus::wi_fold): Same.
	(operator_plus::op1_range): Same.
	(operator_plus::op2_range): Same.
	(operator_minus::wi_fold): Same.
	(operator_minus::op1_range): Same.
	(operator_minus::op2_range): Same.
	(operator_min::wi_fold): Same.
	(operator_max::wi_fold): Same.
	(cross_product_operator::wi_cross_product): Same.
	(operator_mult::op1_range): New.
	(operator_mult::op2_range): New.
	(operator_mult::wi_fold): Adjust for irange.
	(operator_div::wi_fold): Same.
	(operator_exact_divide::op1_range): Same.
	(operator_lshift::fold_range): Same.
	(operator_lshift::wi_fold): Same.
	(operator_lshift::op1_range): New.
	(operator_rshift::op1_range): New.
	(operator_rshift::fold_range): Adjust for irange.
	(operator_rshift::wi_fold): Same.
	(operator_cast::truncating_cast_p): Abstract out from
	operator_cast::fold_range.
	(operator_cast::fold_range): Adjust for irange and tweak for
	performance.
	(operator_cast::inside_domain_p): Abstract out from fold_range.
	(operator_cast::fold_pair): Same.
	(operator_cast::op1_range): Use abstracted methods above.  Adjust
	for irange and tweak for performance.
	(operator_logical_and::fold_range): Adjust for irange.
	(operator_logical_and::op1_range): Same.
	(operator_logical_and::op2_range): Same.
	(unsigned_singleton_p): New.
	(operator_bitwise_and::remove_impossible_ranges): New.
	(operator_bitwise_and::fold_range): New.
	(wi_optimize_and_or):  Adjust for irange.
	(operator_bitwise_and::wi_fold): Same.
	(set_nonzero_range_from_mask): New.
	(operator_bitwise_and::simple_op1_range_solver): New.
	(operator_bitwise_and::op1_range): Adjust for irange.
	(operator_bitwise_and::op2_range): Same.
	(operator_logical_or::fold_range): Same.
	(operator_logical_or::op1_range): Same.
	(operator_logical_or::op2_range): Same.
	(operator_bitwise_or::wi_fold): Same.
	(operator_bitwise_or::op1_range): Same.
	(operator_bitwise_or::op2_range): Same.
	(operator_bitwise_xor::wi_fold): Same.
	(operator_bitwise_xor::op1_range): New.
	(operator_bitwise_xor::op2_range): New.
	(operator_trunc_mod::wi_fold):  Adjust for irange.
	(operator_logical_not::fold_range): Same.
	(operator_logical_not::op1_range): Same.
	(operator_bitwise_not::fold_range): Same.
	(operator_bitwise_not::op1_range): Same.
	(operator_cst::fold_range): Same.
	(operator_identity::fold_range): Same.
	(operator_identity::op1_range): Same.
	(class operator_unknown): New.
	(operator_unknown::fold_range): New.
	(class operator_abs): Adjust for irange.
	(operator_abs::wi_fold): Same.
	(operator_abs::op1_range): Same.
	(operator_absu::wi_fold): Same.
	(class operator_negate): Same.
	(operator_negate::fold_range): Same.
	(operator_negate::op1_range): Same.
	(operator_addr_expr::fold_range): Same.
	(operator_addr_expr::op1_range): Same.
	(pointer_plus_operator::wi_fold): Same.
	(pointer_min_max_operator::wi_fold): Same.
	(pointer_and_operator::wi_fold): Same.
	(pointer_or_operator::op1_range): New.
	(pointer_or_operator::op2_range): New.
	(pointer_or_operator::wi_fold):  Adjust for irange.
	(integral_table::integral_table): Add entries for IMAGPART_EXPR
	and POINTER_DIFF_EXPR.
	(range_cast):  Adjust for irange.
	(build_range3): New.
	(range3_tests): New.
	(widest_irange_tests): New.
	(multi_precision_range_tests): New.
	(operator_tests): New.
	(range_tests): New.
	* range-op.h (class range_operator): Adjust for irange.
	(range_cast): Same.
	* tree-vrp.c (range_fold_binary_symbolics_p): Adjust for irange and
	tweak for performance.
	(range_fold_binary_expr): Same.
	(masked_increment): Change to extern.
	* tree-vrp.h (masked_increment): New.
	* tree.c (cache_wide_int_in_type_cache): New function abstracted
	out from wide_int_to_tree_1.
	(wide_int_to_tree_1): Cache 0, 1, and MAX for pointers.
	* value-range-equiv.cc (value_range_equiv::deep_copy): Use kind
	method.
	(value_range_equiv::move): Same.
	(value_range_equiv::check): Adjust for irange.
	(value_range_equiv::intersect): Same.
	(value_range_equiv::union_): Same.
	(value_range_equiv::dump): Same.
	* value-range.cc (irange::operator=): Same.
	(irange::maybe_anti_range): New.
	(irange::copy_legacy_range): New.
	(irange::set_undefined): Adjust for irange.
	(irange::swap_out_of_order_endpoints): Abstract out from set().
	(irange::set_varying): Adjust for irange.
	(irange::irange_set): New.
	(irange::irange_set_anti_range): New.
	(irange::set): Adjust for irange.
	(value_range::set_nonzero): Move to header file.
	(value_range::set_zero): Move to header file.
	(value_range::check): Rename to...
	(irange::verify_range): ...this.
	(value_range::num_pairs): Rename to...
	(irange::legacy_num_pairs): ...this, and adjust for irange.
	(value_range::lower_bound): Rename to...
	(irange::legacy_lower_bound): ...this, and adjust for irange.
	(value_range::upper_bound): Rename to...
	(irange::legacy_upper_bound): ...this, and adjust for irange.
	(value_range::equal_p): Rename to...
	(irange::legacy_equal_p): ...this.
	(value_range::operator==): Move to header file.
	(irange::equal_p): New.
	(irange::symbolic_p): Adjust for irange.
	(irange::constant_p): Same.
	(irange::singleton_p): Same.
	(irange::value_inside_range): Same.
	(irange::may_contain_p): Same.
	(irange::contains_p): Same.
	(irange::normalize_addresses): Same.
	(irange::normalize_symbolics): Same.
	(irange::legacy_intersect): Same.
	(irange::legacy_union): Same.
	(irange::union_): Same.
	(irange::intersect): Same.
	(irange::irange_union): New.
	(irange::irange_intersect): New.
	(subtract_one): New.
	(irange::invert): Adjust for irange.
	(dump_bound_with_infinite_markers): New.
	(irange::dump): Adjust for irange.
	(debug): Add irange versions.
	(range_has_numeric_bounds_p): Adjust for irange.
	(vrp_val_max): Move to header file.
	(vrp_val_min): Move to header file.
	(DEFINE_INT_RANGE_GC_STUBS): New.
	(DEFINE_INT_RANGE_INSTANCE): New.
	* value-range.h (class irange): New.
	(class int_range): New.
	(class value_range): Rename to a instantiation of int_range.
	(irange::legacy_mode_p): New.
	(value_range::value_range): Remove.
	(irange::kind): New.
	(irange::num_pairs): Adjust for irange.
	(irange::type): Adjust for irange.
	(irange::tree_lower_bound): New.
	(irange::tree_upper_bound): New.
	(irange::type): Adjust for irange.
	(irange::min): Same.
	(irange::max): Same.
	(irange::varying_p): Same.
	(irange::undefined_p): Same.
	(irange::zero_p): Same.
	(irange::nonzero_p): Same.
	(irange::supports_type_p): Same.
	(range_includes_zero_p): Same.
	(gt_ggc_mx): New.
	(gt_pch_nx): New.
	(irange::irange): New.
	(int_range::int_range): New.
	(int_range::operator=): New.
	(irange::set): Moved from value-range.cc and adjusted for irange.
	(irange::set_undefined): Same.
	(irange::set_varying): Same.
	(irange::operator==): Same.
	(irange::lower_bound): Same.
	(irange::upper_bound): Same.
	(irange::union_): Same.
	(irange::intersect): Same.
	(irange::set_nonzero): Same.
	(irange::set_zero): Same.
	(irange::normalize_min_max): New.
	(vrp_val_max): Move from value-range.cc.
	(vrp_val_min): Same.
	* vr-values.c (vr_values::get_lattice_entry): Call value_range
	constructor.
2020-08-03 08:39:29 +02:00
config Daily bump. 2020-07-31 00:16:26 +00:00
contrib Daily bump. 2020-07-30 00:16:24 +00:00
fixincludes Allow CONFIG_SHELL to override build-time shell in mkheaders 2020-02-20 22:09:03 -03:00
gcc Multi-range implementation for value_range (irange). 2020-08-03 08:39:29 +02:00
gnattools
gotools libgo: update to Go1.14beta1 2020-01-21 23:53:22 -08:00
include Daily bump. 2020-07-10 00:16:28 +00:00
INSTALL
intl intl: Unbreak intl build with bison 3 when no regeneration is needed [PR92008] 2020-04-16 11:55:00 +02:00
libada Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libatomic Daily bump. 2020-07-15 00:16:35 +00:00
libbacktrace Daily bump. 2020-07-31 00:16:26 +00:00
libcc1 Daily bump. 2020-07-31 00:16:26 +00:00
libcpp Daily bump. 2020-07-31 00:16:26 +00:00
libdecnumber Daily bump. 2020-07-31 00:16:26 +00:00
libffi libffi/test: Fix compilation for build sysroot 2020-04-25 21:27:14 +01:00
libgcc Daily bump. 2020-08-01 00:16:25 +00:00
libgfortran Daily bump. 2020-07-27 00:16:20 +00:00
libgo libgo: update to go1.15rc1 2020-08-01 11:21:40 -07:00
libgomp Daily bump. 2020-07-28 00:16:25 +00:00
libhsail-rt Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libiberty Daily bump. 2020-07-31 00:16:26 +00:00
libitm Daily bump. 2020-07-25 00:16:22 +00:00
libobjc Daily bump. 2020-05-30 00:16:27 +00:00
liboffloadmic Add missing ChangeLog entries. 2020-05-05 16:10:13 +02:00
libphobos Daily bump. 2020-06-26 00:16:23 +00:00
libquadmath Daily bump. 2020-05-30 00:16:27 +00:00
libsanitizer Daily bump. 2020-07-17 00:16:27 +00:00
libssp Daily bump. 2020-05-30 00:16:27 +00:00
libstdc++-v3 Daily bump. 2020-08-02 00:16:21 +00:00
libvtv Daily bump. 2020-05-30 00:16:27 +00:00
lto-plugin Daily bump. 2020-07-31 00:16:26 +00:00
maintainer-scripts Daily bump. 2020-05-30 00:16:27 +00:00
zlib Daily bump. 2020-05-30 00:16:27 +00:00
.dir-locals.el
.gitattributes Add *.md diff=md. 2020-01-15 14:29:53 +01:00
.gitignore Add .clang-tidy to git ignored. 2020-06-12 16:03:02 +02:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2020-07-31 00:16:26 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in MSP430: Add -fno-exceptions multilib 2019-12-11 19:19:50 +00:00
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure bootstrap: Fix --disable-bootstrap with older g++. 2020-06-08 16:42:35 -04:00
configure.ac bootstrap: Fix --disable-bootstrap with older g++. 2020-06-08 16:42:35 -04:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ltgcc.m4
ltmain.sh Do not use HAVE_DOS_BASED_FILE_SYSTEM for Cygwin. 2020-04-17 09:22:51 +02:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Add myself for write after approval 2020-07-30 13:17:06 +00:00
Makefile.def Merge top-level configury changes from gdb 2020-04-09 06:52:55 -06:00
Makefile.in Merge top-level configury changes from gdb 2020-04-09 06:52:55 -06:00
Makefile.tpl Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
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.