Keep VR_UNDEFINED and VR_VARYING in sync (speeds up evrp by 8.47%).
Currently multi-ranges calculate the undefined and varying bits on the
fly, whereas legacy uses the m_kind field. Since we will always have
space in the irange class for a kind field, might as well keep it in
sync as ranges are created, thus speeding up lookups.
This patch, along with an upcoming ones for num_pairs(), speeds up EVRP
by 8.47%, VRP proper by 1.84% and overall compilation by 0.24%.
FWIW, since evrp is such a fast pass, and is hard to measure clock-wise,
we've been using callgrind to estimate improvements. This has coincided
more or less with -ftime-report numbers (albeit having to run -ftime-report
half a dozen times and use the average).
gcc/ChangeLog:
* value-range.cc (irange::operator=): Set m_kind.
(irange::copy_to_legacy): Handle varying and undefined sources
as a legacy copy since they can be easily copied.
(irange::irange_set): Set m_kind.
(irange::irange_set_anti_range): Same.
(irange::set): Rename normalize_min_max to normalize_kind.
(irange::verify_range): Adjust for multi-ranges having the
m_kind field set.
(irange::irange_union): Set m_kind.
(irange::irange_intersect): Same.
(irange::invert): Same.
* value-range.h (irange::kind): Always return m_kind.
(irange::varying_p): Rename to...
(irange::varying_comptaible_p): ...this.
(irange::undefined_p): Only look at m_kind.
(irange::irange): Always set VR_UNDEFINED if applicable.
(irange::set_undefined): Always set VR_UNDEFINED.
(irange::set_varying): Always set m_kind to VR_VARYING.
(irange::normalize_min_max): Rename to...
(irange::normalize_kind): ...this.