On 05/12/2016 10:09 AM, Martin Jambor wrote:
Hi,

the following patch adds the final step necessary to perform
optimization requested in PR 69708, i.e do indirect inlining of a
function passed by value in a structure.  It allows jump functions to
be aggregate global constant VAR_DECLs, which enables the
constructor-walking code introduced in the first patch of the series
to deduce aggregate contents from it.  IPA-CP expects jump-functions
to be scalars, and they indeed need be for processing arithmetic
jump-functions, but this patch allows any tree for the simple ones.

Bootstrapped, lto-bootstrapped tested on x86_64.  OK for trunk?

Thanks,

Martin


2016-05-11  Martin Jambor  <mjam...@suse.cz>

        PR ipa/69708
        * ipa-cp.c (ipa_get_jf_pass_through_result): Allow non-ip constant
        input for NOP_EXPR pass-through functions.
        * ipa-prop.c (ipa_compute_jump_functions_for_edge): Allow
        aggregate global constant VAR_DECLs in constant jump functions.

testsuite/
        * gcc.dg/ipa/iinline-cstagg-2.c: New test.
        * gcc.dg/ipa/ipcp-cstagg-5.c: Likewise.
        * gcc.dg/ipa/ipcp-cstagg-6.c: Likewise.
        * gcc.dg/ipa/ipcp-cstagg-7.c: Likewise.
LGTM.
jeff

Reply via email to