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 loop optimization bug


On Mon, Oct 6, 2008 at 4:23 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Can it be your patch is for the 4.3 branch only?  Trunk has
>>
>>     case VIEW_CONVERT_EXPR:
>>       /* This kind of view-conversions may wrap non-addressable objects
>>          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)))
>>         return true;
>>
>> and so never should fall through to the default case for
>> unary/binary expressions.
>
> Why?  PLUS_EXPR is neither is_gimple_reg nor is_gimple_min_invariant.
> Should I add tcc_unary to the set of codes for which true is returned?

Oh, I see.  Well, the only addressable ones after that
test are is_gimple_var () || handled_component_p.
IMHO we better return true for anything else.

Richard.

>
> --
> Eric Botcazou
>


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