This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Fix rtl-optimization/57425
- From: Michael Matz <matz at suse dot de>
- To: Joern Rennecke <joern dot rennecke at embecosm dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 19 Jun 2013 18:30:25 +0200 (CEST)
- Subject: Re: RFA: Fix rtl-optimization/57425
- References: <20130615190823 dot wzbakvee68w0kcwo-nzlynne at webmail dot spamcop dot net> <1601106 dot B4Cs0hoEPR at polaris> <20130616092626 dot oidnkv1n8gkg808w-nzlynne at webmail dot spamcop dot net> <alpine dot LNX dot 2 dot 00 dot 1306181449150 dot 10932 at wotan dot suse dot de> <20130619102813 dot c4swjkprkskw4swk-nzlynne at webmail dot spamcop dot net>
On Wed, 19 Jun 2013, Joern Rennecke wrote:
> > I.e. the arguments after your patch are exactly swapped. This is usually
> > harmless, but not always, so that should be corrected before check in.
> > The change in cselib.c:cselib_invalidate_mem has the same problem.
>
> Well, I have already committed the patch, so attached is a patch to fix
> things up.
> int
> anti_dependence (const_rtx mem, const_rtx x)
> {
...
> int
> -canon_anti_dependence (const_rtx mem, enum machine_mode mem_mode,
> - rtx mem_addr, const_rtx x)
> +canon_anti_dependence (const_rtx x, enum machine_mode x_mode, rtx x_addr,
> + const_rtx mem, bool mem_canonicalized)
{
That's not good. You now have different order of parameters between
anti_dependence and canon_anti_dependence. That will be mightily
confusing, please instead change the caller. Currently these predicates
take their arguments in the order of the corresponding instructions, that
should better be retained:
true_dependence: write-then-(depending)read
anti_dependence: read-then-(clobbering)write
write_dependence: write-then-(clobbering)write
We could change the order of arguments to something else, like first the
clobber, then the clobbered, but then that should be done for all the
predicates at the same time (and I would suggest to not do it).
Ciao,
Michael.