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: [lno] Some functions for the loop structure


Pop Sébastian <pop@gauvain.u-strasbg.fr> writes:

> +/* Returns the exit edges of the loop.  */
> +
> +static inline edge *
> +loop_exit_edges (struct loop *loop)
> +{
> +  return loop->exit_edges;
> +}
> +
> +/* Returns the n-th exit edge of the loop.  */
> +
> +static inline edge 
> +loop_exit_edge (struct loop *loop, unsigned n)
> +{
> +  return loop->exit_edges[n];
> +}

I think this "half-abstraction" is a bit confusing. Either you want to
hide the fact that exit_edges is an array; then there should be no
loop_exit_edges. Or you don't want to hide it, then loop_exit_edge is
pointless.

-- 
	Falk


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