This is the mail archive of the 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] Refactor type handling in get_alias_set, fix PR58513

On Tue, Sep 24, 2013 at 4:00 AM, Richard Biener <> wrote:
> As noted in PR58513 the alias type comparison in operand_equal_p for
> MEM_REF and TARGET_MEM_REF is overly restrictive.  The following
> adds a new alias_ptr_types_compatible_p helper for a less conservative
> comparison and refactors get_alias_set and reference_alias_ptr_type
> to share code and behave in a more similar manner.
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
> Richard.
> 2013-09-24  Richard Biener  <>
>         PR middle-end/58513
>         * tree.c (reference_alias_ptr_type): Move ...
>         * alias.c (reference_alias_ptr_type): ... here and implement
>         in terms of the new reference_alias_ptr_type_1.
>         (ref_all_alias_ptr_type_p): New helper.
>         (get_deref_alias_set_1): Drop flag_strict_aliasing here,
>         use ref_all_alias_ptr_type_p.
>         (get_deref_alias_set): Add flag_strict_aliasing check here.
>         (reference_alias_ptr_type_1): New function, split out from ...
>         (get_alias_set): ... here.
>         (alias_ptr_types_compatible_p): New function.
>         * alias.h (reference_alias_ptr_type): Declare.
>         (alias_ptr_types_compatible_p): Likewise.
>         * tree.h (reference_alias_ptr_type): Remove.
>         * fold-const.c (operand_equal_p): Use alias_ptr_types_compatible_p
>         to compare MEM_REF alias types.

This caused:


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