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: [lto][patch] remove local variables from types (after gimplification)


> While we in most places check for NULL TYPE_MIN/MAX_VALUE we
> should not need to - so I'd like you to adjust it instead of NULLing it.

OK. I think I got it right. Can you take a look at the attached patch?
It would probably be cleaner to split
set_min_and_max_values_for_integral_type, but I would like to reduce
the difference from branch to trunk.

Just calling set_min_and_max_values_for_integral_type unconditionally
doesn't work because set_sizetype tries to be smart and copies the
type cache from type A to type B and when we try to build a constant
for type B, build_int_cst_wide aborts.

2008-06-24  Rafael Espindola  <espindola@google.com>

	* calls.c (must_pass_in_stack_var_size_or_pad): Don't check if
	TYPE_SIZE is NULL.
	* expr.c (store_field): Don't check if TYPE_SIZE is NULL.
	* tree.c (reset_type_lang_specific): Set both TYPE_SIZE_UNIT
	and TYPE_SIZE or none of them. Don't set TYPE_MAX_VALUE to
	NULL. call set_min_and_max_values_for_integral_type.

> Richard.
>

Cheers,
-- 
Rafael Avila de Espindola

Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland

Registered in Dublin, Ireland
Registration Number: 368047

Attachment: types.patch
Description: Binary data


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