This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Two more doloop patches
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: Bernd Schmidt <bernds_cb1 at t-online dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 3 Apr 2009 19:53:41 +0200
- Subject: Re: Two more doloop patches
- References: <49D613D1.1040000@t-online.de>
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