An unsupported_range temporary is instantiated in every Value_Range for completeness sake and should be mostly a NOP. However, it's showing up in the callgrind stats, because it's not inline. This fixes the oversight.
PR tree-optimization/106514 gcc/ChangeLog: * value-range.cc (unsupported_range::unsupported_range): Move... * value-range.h (unsupported_range::unsupported_range): ...here. (unsupported_range::set_undefined): New. --- gcc/value-range.cc | 6 ------ gcc/value-range.h | 10 +++++++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index dd5a4303908..a2273f540e8 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -248,12 +248,6 @@ irange::set_nonnegative (tree type) set (build_int_cst (type, 0), TYPE_MAX_VALUE (type)); } -unsupported_range::unsupported_range () -{ - m_discriminator = VR_UNKNOWN; - set_undefined (); -} - void frange::accept (const vrange_visitor &v) const { diff --git a/gcc/value-range.h b/gcc/value-range.h index 305e2cae7e6..856947d23dd 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -250,7 +250,15 @@ private: class unsupported_range : public vrange { public: - unsupported_range (); + unsupported_range () + { + m_discriminator = VR_UNKNOWN; + set_undefined (); + } + virtual void set_undefined () final override + { + m_kind = VR_UNDEFINED; + } virtual void accept (const vrange_visitor &v) const override; }; -- 2.37.1