This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to cleanup noop move handling (version 2)
- To: John Wehle <john at feith dot com>
- Subject: Re: Patch to cleanup noop move handling (version 2)
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Tue, 3 Apr 2001 13:22:04 +0100 (BST)
- Cc: <gcc-patches at gcc dot gnu dot org>
On Sat, 10 Mar 2001, John Wehle wrote:
> [ This version cleans up a few more places. ]
>
> This eliminates some code duplication. This patch passes make
> bootstrap and check on i386-unknown-freebsd4.2. It also passes
> make check for powerpc-eabisim.
>
> ChangeLog:
>
> Sat Mar 10 00:43:36 EST 2001 John Wehle (john@feith.com)
>
> * rtl.h (set_noop_p): Declare.
> * flow.c (set_noop_p): Move from here ...
> * rtlanal.c (set_noop_p): ... to here and enhance.
> * cse.c (delete_trivially_dead_insns): Use it.
> * gcse.c (hash_scan_set): Likewise.
> * jump.c (delete_noop_moves): Likewise.
> * recog.c (split_all_insns): Likewise.
Ok.
> + if (side_effects_p (set))
> + return 0;
Depending on terminology you could say that each SET rtx has a side effect.
side_effects_p doesn't care, but it might be slightly clearer to use
if (side_effects_p (src) || side_effects_p (dst))
Bernd