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] Use rtx_refs_may_alias_p instead of alias_sets_conflict_p in


On Mon, Aug 9, 2010 at 5:56 PM, Bingfeng Mei <bmei@broadcom.com> wrote:
> Sorry, I will check in patch and always enable Werror next time.

-Werror is enabled by default when you bootstrap, so I wonder
how you could miss this?

Richard.

> Cheers,
> Bingefng
>
>> -----Original Message-----
>> From: H.J. Lu [mailto:hjl.tools@gmail.com]
>> Sent: 09 August 2010 16:53
>> To: Bingfeng Mei
>> Cc: Richard Guenther; Michael Matz; Diego Novillo; gcc-
>> patches@gcc.gnu.org
>> Subject: Re: [PATCH] Use rtx_refs_may_alias_p instead of
>> alias_sets_conflict_p in
>>
>> On Mon, Aug 9, 2010 at 5:41 AM, Bingfeng Mei <bmei@broadcom.com> wrote:
>> > Hi,
>> > I created a new may_alias_p function as Richard proposed. The
>> function
>> > disables offset-based memory disambiguation and TBAA, it is also
>> slightly
>> > more conservative than true/output/anti_dependence. For example,
>> > write_dependence checks:
>> > ?if (GET_MODE (x) == BLKmode && GET_CODE (XEXP (x, 0)) == SCRATCH)
>> > ? ?return 1;
>> > ?if (GET_MODE (mem) == BLKmode && GET_CODE (XEXP (mem, 0)) == SCRATCH)
>> > ? ?return 1;
>> >
>> > true_depdence checks both above and following (isn't above
>> > statement redundant then?).
>> > ?if (mem_mode == BLKmode || GET_MODE (x) == BLKmode)
>> > ? ?return 1;
>> > may_alias_p takes more conservative check of the latter one only.
>> >
>> > Since insn_alias_sets_conflict_p is misnamed and only used once by
>> ddg.c,
>> > it & friends (walk_mems_1, walk_mems_2) are moved into ddg.c and
>> > renamed as insns_may_alias_p.
>> >
>> > The patch is bootstrapped on x86_64-unknown-linux-gnu and tested.
>> > OK for trunk?
>> >
>> > Thanks,
>> > Bingfeng
>> >
>> >
>> > 2010-08-10 ?Bingfeng Mei ?<bmei@broadcom.com>
>> >
>> > ? ? ? ?* ddg.c (walk_mems_2): Moved from alias.c, use may_alias_p
>> instead of
>> > ? ? ? ?alias_sets_conflict_p.
>> > ? ? ? ?(walk_mems_1): Moved from alias.c.
>> > ? ? ? ?(insns_may_alias_p): New function, originally
>> insn_alias_sets_conflict_p
>> > ? ? ? ?in alias.c.
>> > ? ? ? ?(add_inter_loop_mem_dep): Use insns_may_alias_p now.
>> > ? ? ? ?* cse.c (cse_insn): New argument in calling
>> nonoverlapping_memrefs_p.
>> > ? ? ? ?* alias.c (walk_mems_2): Moved to ddg.c.
>> > ? ? ? ?(walk_mems_1): Ditto.
>> > ? ? ? ?(insn_alias_sets_conflict_p): Renamed to insns_may_alias_p and
>> moved
>> > ? ? ? ?to ddg.c.
>> > ? ? ? ?(nonoverlapping_memrefs_p): Add flag to guard offset-based
>> memory
>> > ? ? ? ?disambiguation.
>> > ? ? ? ?*(may_alias_p): New function to check whether two memory
>> expression
>> > ? ? ? ?may alias or not. Currently used in buidling inter-iteration
>> memory
>> > ? ? ? ?dependence.
>> > ? ? ? ?*alias.h (nonoverlapping_memrefs_p): New flag as third
>> argument.
>> > ? ? ? ?(insn_alias_sets_conflict_p): Removed
>> > ? ? ? ?*rtl.h (may_alias_p): New function prototype.
>> >
>>
>> Gcc is broken:
>>
>> ../../src-trunk/gcc/alias.c: In function 'may_alias_p':
>> ../../src-trunk/gcc/alias.c:2537:7: error: unused variable 'ret'
>> [-Werror=unused-variable]
>> cc1: all warnings being treated as errors
>>
>>
>> H.J.
>
>
>


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