[tuples] gimple statement iterators

Andrew MacLeod amacleod@redhat.com
Wed Apr 25 14:47:00 GMT 2007


On Tue, 2007-04-24 at 17:57 -0400, Aldy Hernandez wrote:

> +static inline bool
> +gsi_one_before_end_p (gimple_stmt_iterator i)
> +{
> +  return *i.ptr != NULL && GS_NEXT (*i.ptr) == NULL;
> +}
> +

Since you have an end of list pointer, you could simply do one
comparison:
  return i.ptr == &GS_SEQ_LAST (i.seq);

 
Andrew



More information about the Gcc-patches mailing list