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: [IPCP] Remove unreachable code


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.


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