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: [PATCH] Fix PR middle-end/35136


On Thu, Feb 14, 2008 at 12:22 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > > Hence the fix, bootstrapped/regtested on i586-suse-linux, OK for
>  > > mainline?
>  >
>  > Ok.
>
>  Although I still think that the change is the right thing to do, it ends up
>  only papering over the problem, which is that IVOPTS takes the address of
>  non-addressable objects, leading to wrong code.  More specifically:
>
>  &VIEW_CONVERT_EXPR<system__address>((system__aux_dec__TsaB) a_3(D))
>
>  There is already a counter-measure for this (may_be_nonaddressable_p) but it
>  is both incomplete and invoked too early in find_interesting_uses_address.
>
>  Hence this second fix, lightly tested on i586-suse-linux.  Moreover Jakub said
>  that he was concerned about changing force_gimple_operand at this point, so
>  the patch also reverts the first fix.
>
>  OK for mainline if a full testing cycle successfully completes?

The change to may_be_nonaddressable_p looks ok.  I still think the
force_gimple_operand change is a real bugfix - and a safe one as well.

Zdenek, does the move of the may_be_nonaddressable_p check in ivopts
make sense?  Or should we keep checks in both places?

Thanks,
Richard.

>
>         PR middle-end/35136
>         * gimplify.c (force_gimple_operand_bsi): Revert 2008-02-12 change.
>         (force_gimple_operand): Likewise.
>         * tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): Add new cases
>         for TARGET_MEM_REF and CONVERT_EXPR/NON_LVALUE_EXPR/NOP_EXPR.
>         Also recurse on the operand for regular VIEW_CONVERT_EXPRs.
>         (find_interesting_uses_address): Check addressability and alignment
>         of the base expression only after substituting bases of IVs into it.
>
>
>  --
>  Eric Botcazou
>


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