On 27/12/2020 09:27, Luc Van Oostenryck wrote: > Add he helper has_definition() to check if the pseudo belong to one s/Add he/Add the/ ATB, Ramsay Jones > of the pseudo types having a definition: PSEUDO_REG & PSEUDO_PHI. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > linearize.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/linearize.h b/linearize.h > index 2c548d43526f..c5bdd04257a1 100644 > --- a/linearize.h > +++ b/linearize.h > @@ -249,6 +249,11 @@ static inline int has_use_list(pseudo_t p) > return (p && p->type != PSEUDO_VOID && p->type != PSEUDO_UNDEF && p->type != PSEUDO_VAL); > } > > +static inline bool has_definition(pseudo_t p) > +{ > + return p->type == PSEUDO_REG || p->type == PSEUDO_PHI; > +} > + > static inline int pseudo_user_list_size(struct pseudo_user_list *list) > { > return ptr_list_size((struct ptr_list *)list); >