[PATCH] Fix loop optimization bug

Richard Guenther richard.guenther@gmail.com
Tue Oct 7 07:40:00 GMT 2008


On Mon, Oct 6, 2008 at 11:36 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Agreed.  Something like this?
>
> Sorry, that didn't really work.  I'm testing this instead:
>
> Index: tree-ssa-loop-ivopts.c
> ===================================================================
> --- tree-ssa-loop-ivopts.c      (revision 140904)
> +++ tree-ssa-loop-ivopts.c      (working copy)
> @@ -1557,8 +1557,7 @@ may_be_nonaddressable_p (tree expr)
>         and make them look addressable.  After some processing the
>         non-addressability may be uncovered again, causing ADDR_EXPRs
>         of inappropriate objects to be built.  */
> -      if (is_gimple_reg (TREE_OPERAND (expr, 0))
> -         || is_gimple_min_invariant (TREE_OPERAND (expr, 0)))
> +      if (!is_gimple_addressable (TREE_OPERAND (expr, 0)))
>        return true;
>
>       /* ... fall through ... */

That's reasonable.  Ok if it passes testing.

Thanks,
Richard.

> --
> Eric Botcazou
>



More information about the Gcc-patches mailing list