public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1973] Inline unsupported_range constructor. Date: Fri, 5 Aug 2022 12:06:55 +0000 (GMT) [thread overview] Message-ID: <20220805120655.841123858407@sourceware.org> (raw) 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; };
reply other threads:[~2022-08-05 12:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220805120655.841123858407@sourceware.org \ --to=aldyh@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).