This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Incomplete Draft Patches to Correct Errors in Loop Unrolling Frequencies (bugzilla problem 68212)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]