On Wed, Aug 16, 2017 at 11:34 AM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > Here by 'simple' we really mean 'worth of putting in a register'. > > We select all scalar types as well as struct and unions with a > size not bigger than a long (register). > > Global and static variables, variables which address have been > taken and volatiles variables are never selected. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > symbol.h | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/symbol.h b/symbol.h > index 327449611..3f075c5bc 100644 > --- a/symbol.h > +++ b/symbol.h > @@ -407,6 +407,39 @@ static inline int is_scalar_type(struct symbol *type) > return 0; > } > > +static inline int is_simple_type(struct symbol *type) ... > + case SYM_STRUCT: > + case SYM_UNION: > + return type->bit_size <= long_ctype.bit_size; I think the function name should be some thing along the line of "type fits register" or is_registerable_type. union and struct are composite types. It is a bit confusing calling them simple, if some one just looking at the code without look at the commit message. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html