public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1973] Inline unsupported_range constructor.
@ 2022-08-05 12:06 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-08-05 12:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:47964e766270f349f5b171bcd68ff7c1e60d85d8

commit r13-1973-g47964e766270f349f5b171bcd68ff7c1e60d85d8
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Aug 5 08:04:10 2022 +0200

    Inline unsupported_range constructor.
    
    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.

Diff:
---
 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;
 };


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-05 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 12:06 [gcc r13-1973] Inline unsupported_range constructor Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).