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: Fix ifcvt on memory operands


On Wed, Dec 04, 2002 at 08:35:01PM +0100, Jan Hubicka wrote:
> +       if (!nonoverlapping_memrefs_p (x, (rtx)data))

I don't think you should be using nonoverlapping_memrefs_p
directly.  Use

	anti_dependence (x, data) || output_dependence (x, data)

Or better yet change write_depenence_p to let you do both
at once.

> + 	memory_modified = 1;

	= true;

> +   rtx insn;
> +   if (start == end)
> +     return 0;

Whitespace before if.

>       case MEM:
> !       if (RTX_UNCHANGING_P (x))
> ! 	return 0;
> !       if (modified_between_p (XEXP (x, 0), start, end))
>   	return 1;
> +       for (insn = NEXT_INSN (start); insn != end; insn = NEXT_INSN (insn))
> + 	if (memory_modified_in_insn_p (x, insn))
> + 	  return 1;
> +       return 0;

Why are you checking the address?

You'll need to change the function comment that says that
alias info isn't used.  ;-)



r~


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