This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Incomplete Draft Patches to Correct Errors in Loop Unrolling Frequencies (bugzilla problem 68212)
- From: Michael Matz <matz at suse dot de>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, Kelvin Nilsen <kdnilsen at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Nov 2015 15:19:46 +0100 (CET)
- Subject: Re: RFC: Incomplete Draft Patches to Correct Errors in Loop Unrolling Frequencies (bugzilla problem 68212)
- Authentication-results: sourceware.org; auth=none
- References: <563E0E67 dot 1090101 at linux dot vnet dot ibm dot com> <5640D958 dot 7010300 at redhat dot com> <CAFiYyc0RJvqadRfMvzmjH=1sr9gWkyC0z=dryfYFpXkdEOP-LQ at mail dot gmail dot com>
Hi,
On Tue, 10 Nov 2015, Richard Biener wrote:
> >> +static bool
> >> +same_edge_p (edge an_edge, edge another_edge)
> >> +{
> >> + return ((an_edge->src == another_edge->src)
> >> + && (an_edge->dest == another_edge->dest));
> >> +}
> >
> >
> > Formatting aside (extra parentheses), I wonder why you can't just test
> > edges for pointer equality? Does anything make duplicate edges?
>
> We don't allow duplicate edges apart from edges with different flags (an
> EH edge may appear alongside a FALLTRHU one for example).
Actually, no. The flags are merged, the edge structure itself will never
be duplicated (so one such structure might represent several logical
edges, e.g. a fall-thru and an abnormal edge). So, yes, pointer equality
is enough.
Ciao,
Michael.