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: PR 41952 -- simple folding rule


On Wed, Apr 14, 2010 at 12:17 AM, Xinliang David Li <davidxl@google.com> wrote:
> Retested on x86_64/linux using trunk.
>
> Ok for mainline?

Please move this into the

  /* For comparisons of pointers we can decompose it to a compile time
     comparison of the base objects and the offsets into the object.
     This requires at least one operand being an ADDR_EXPR or a
     POINTER_PLUS_EXPR to do more than the operand_equal_p test below.  */
  if (POINTER_TYPE_P (TREE_TYPE (arg0))
      && (TREE_CODE (arg0) == ADDR_EXPR
          || TREE_CODE (arg1) == ADDR_EXPR
          || TREE_CODE (arg0) == POINTER_PLUS_EXPR
          || TREE_CODE (arg1) == POINTER_PLUS_EXPR))

handling to also get &local_var.a.b != parameter_default [ + x].

and re-post.

Thanks,
Richard.

> David
>
> On Fri, Nov 6, 2009 at 11:58 AM, Xinliang David Li <davidxl@google.com> wrote:
>> Hi, the patch is to used to delete redundant comparisons and branches
>> resulting from inlining. While it does not address any particular bug
>> in 4.5, it is safe to be considered.
>>
>> Tested: bootstrap and regression tested: x86_64/linux (with 4.5).
>>
>> Ok to get in?
>>
>> Thanks,
>>
>> David
>>
>


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