This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 41952 -- simple folding rule
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>
- Date: Wed, 14 Apr 2010 11:17:46 +0200
- Subject: Re: PR 41952 -- simple folding rule
- References: <522e93240911061058j307d9f0ck8cf62aaa874035b@mail.gmail.com> <v2n522e93241004131517sa8e11d99i1ed225777263a1a4@mail.gmail.com>
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
>>
>