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: Avoid most of calls to canon_rtx


On Wed, Mar 12, 2003 at 02:47:09PM +0100, Jan Hubicka wrote:
> +    Expect that X and Y has beel already canonicalized.

Typo.  And in the cut and pasted copy below.

The rtx_equal_for_memref_p change looks ok.

>     if (offset)
> -     addr = gen_rtx_PLUS (GET_MODE (addr), XEXP (addr, 0), GEN_INT (offset));
> +     addr = canon_rtx (gen_rtx_PLUS (GET_MODE (addr), XEXP (addr, 0),
> + 		      GEN_INT (offset)));
>     else
> -     addr = XEXP (addr, 0);
> +     addr = canon_rtx (XEXP (addr, 0));

Err, how about 

	if (...)
	  addr =
	else
	  addr = 
	addr = canon_rtx (addr);

instead.

> - 	    return memrefs_conflict_p (xsize, canon_rtx (XEXP (x, 0)),
> - 				       ysize, canon_rtx (XEXP (y, 0)), c);
> + 	    return memrefs_conflict_p (xsize, XEXP (x, 0),
> + 				       ysize, XEXP (y, 0), c);

I don't see how CONST guarantees that its contents are canonicalized?


r~


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