[PATCH 4/8] Add header files for new Internal Representation form.

Scott Wood scottwood at freescale.com
Thu Sep 25 05:17:48 EST 2008


Jon Loeliger wrote:
> +struct ir {
> +	ir_type ir_type;
> +	srcpos *ir_srcpos;
> +
> +	long long ir_literal;
> +	char *ir_lit_str;
> +	char *ir_label_name;
> +	irb_id ir_builtin_id;
> +
> +	struct ir *ir_name;
> +	struct ir *ir_label;
> +	struct ir *ir_expr1;
> +	struct ir *ir_expr2;
> +	struct ir *ir_expr3;
> +
> +	struct ir *ir_mem_reserves;
> +	struct ir *ir_statements;
> +	struct ir *ir_statements2;
> +	struct ir *ir_declarations;
> +
> +	struct ir *ir_first;
> +	struct ir *ir_last;
> +	struct ir *ir_prev;
> +	struct ir *ir_next;
> +};

Could we skip the redundant "ir_" prefix?  Structs have had their own 
namespaces for a *loooooong* time now.

> +extern struct ir *the_ir_tree;

s/the_//

> +struct irb_entry {
> +	irb_id irb_id;
> +	char *irb_name;
> +	irb_impl_func irb_implementation;
> +};

How about "struct builtin_func" or similar?  Let's not pack the 
meaningful bits of the name into an obscure acronym.

-Scott



More information about the devicetree-discuss mailing list