Tweaks to ranger API routines.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 28 Oct 2020 00:13:46 +0000 (20:13 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Wed, 28 Oct 2020 00:17:29 +0000 (20:17 -0400)
commitc25d317cf7d4ea8df0402feb939ce286e5f42988
tree606a076c0c7303648e51b6af80110f42bfeff0c2
parent89bb01e7cbd82cdf318202d8185d765dcc338915
Tweaks to ranger API routines.

Remove the gcc_assert wrappers that contain statements that need to be
executed.
Audit routines to ensure range is set to UNDEFINED when false is returned.

* gimple-range-gori.cc (gori_compute_cache::cache_stmt): Accumulate
return values and only set cache when everything returned true.
* gimple-range.cc (get_tree_range): Set the return range to UNDEFINED
when the range isn't supported.
(gimple_ranger::calc_stmt): Return varying if the type is supported,
even if the stmt processing failed.  False otherwise.
(range_of_builtin_ubsan_call): Don't use gcc_assert.
(range_of_builtin_call): Ditto.
(gimple_ranger::range_of_cond_expr): Ditto.
(gimple_ranger::range_of_expr): Ditto
(gimple_ranger::range_on_entry): Ditto.
(gimple_ranger::range_on_exit): Ditto.
(gimple_ranger::range_on_edge): DItto.
(gimple_ranger::range_of_stmt): Don't use gcc_assert, and initialize
return value to UNDEFINED.
gcc/gimple-range-gori.cc
gcc/gimple-range.cc