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: Two more doloop patches


Hi,

> These two patches strengthen functions in loop-iv.c so that we allow 
> frame and stack pointers in the expressions we're examining.  For loops 
> that walk an array on the stack, the exit test often is a pointer 
> comparison involving addresses based on fp or sp, and the compiler can 
> make useful simplifications if these substitutions are allowed.
> 
> Bootstrapped and regression tested on i686-linux (irrelevant extra 
> failures in libmudflap due to expect truncating compilre output). 
> Equivalent patches have been in our Blackfin 4.3 tree for a while now 
> and had a fair amount of testing.

> +      note = find_reg_equal_equiv_note (DF_REF_INSN (adef));
> +      if (note && function_invariant_p (XEXP (note, 0)))
> +	src = XEXP (note, 0);
> +      else
> +	src = SET_SRC (set);
> +
> +      if (REG_P (SET_SRC (set)))
> +	{
> +	  regno = REGNO (SET_SRC (set));
> +	  continue;
> +	}
> +      break;

maybe

if (note && function_invariant_p (XEXP (note, 0)))
  {
    src = XEXP (note, 0);
    break;
  }
src = SET_SRC (set);

if (REG_P (src))
  ...

?

Otherwise OK,

Zdenek


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