This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [IPCP] Remove unreachable code
- From: Prathamesh Kulkarni <prathamesh dot kulkarni at linaro dot org>
- To: kugan <kugan dot vivekanandarajah at linaro dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Martin Jambor <mjambor at suse dot cz>
- Date: Tue, 25 Oct 2016 09:09:48 +0530
- Subject: Re: [IPCP] Remove unreachable code
- Authentication-results: sourceware.org; auth=none
- References: <9a16aa02-ca87-48a9-562d-aa9042356260@linaro.org>
On 25 October 2016 at 04:16, kugan <kugan.vivekanandarajah@linaro.org> wrote:
> Hi,
>
> I noticed that in ipcp_bits_lattice::meet_with we have:
>
> else if (TREE_CODE_CLASS (code) == tcc_unary)
> ....
> else if (code == NOP_EXPR)
> ....
>
> Since TREE_CODE_CLASS for NOP_EXPR is tcc_unary, if (code == NOP_EXPR) is
> unreachable and therefore removing it. I also don't think that we need any
> special casing for NOP_EXPR here. bit_value_unop handles already handles
> CASE_CONVERT.
Oops, sorry about that :/
IICU NOP_EXPR is present when the pass-thru operation is "simple"
involving only the argument.
bit_value_unop() already handles the case for NOP_EXPR in
CASE_CONVERT, so I suppose
NOP_EXPR won't need any special casing.
Thanks for catching this!
Regards,
Prathamesh
>
> Is this OK if no regressions in bootstrap and regression testing.
>
> Thanks,
> Kugan
>
>
>
>
> gcc/ChangeLog:
>
> 2016-10-25 Kugan Vivekanandarajah <kuganv@linaro.org>
>
> * ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.