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: [patch] Fix type merging deficiency during WPA


> I see that gimple_canonical_types_compatible_p winds up using
> operand_equal_p on expressions which represent the array size and that is
> why you need walk_simple_constant_arithmetic and operand_equal_p change.

Not just array size, but also offsets via gimple_compare_field_offset.

> I wonder how much code quality we would lose by simply treating only
> constantly sized arrays and considering all VLAs of the same type to be
> compatible? There are interesting issues WRT C standard and the canonical
> types of arrays have just secondary role (i.e. they are hardly used by
> themselves and only are used to compute canonical types of structures) and
> there may be lower hanging fruits in TBAA improvement than trying to handle
> sturctures containng VLAs right.

Yes, array types themselves can probably be kludged around, but the main issue 
in Ada are record types with dynamic offsets, which are first-class citizens.

-- 
Eric Botcazou


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