This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: record_ranges_from_incoming_edge: use value_range API for creating new range
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrew MacLeod <amacleod at redhat dot com>
- Date: Thu, 8 Nov 2018 15:24:54 +0100
- Subject: Re: record_ranges_from_incoming_edge: use value_range API for creating new range
- References: <79800e67-85d6-be61-b105-65e945361bf9@redhat.com>
On Thu, Nov 8, 2018 at 1:17 PM Aldy Hernandez <aldyh@redhat.com> wrote:
>
> This one's rather obvious and does not depend on any get_range_info API
> change.
>
> OK for trunk?
Hmm, no - that's broken. IIRC m_equiv are shared bitmaps if you
do tem = *old_vr so you modify it in place with equiv_clear().
Thus, operator= should be really deleted or mapped to value_range::set()
in which case tem = *old_vr would do useless bitmap allocation and
copying that you then clear.
It's also two lines of code instead of one.
Richard.