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: [PATCH, CHKP] [always_inline 1/2] Allow inlining for not instrumented calls to always_inline functions


2015-01-16 19:58 GMT+03:00 Jeff Law <law@redhat.com>:
> On 01/16/15 04:04, Ilya Enkovich wrote:
>>
>> Hi,
>>
>> Currently compiler emits an error in case of not instrumented call to
>> instrumented alwyas_inline function.  It happens because when we inline
>> there is only instrumented version of function available and we don't inline
>> thunks.  This patch solves the problem by split of thunk production pass
>> into two passes.  The first one removes all functions we don't have to
>> inline.  The other one does the rest after local optimizations.
>>
>> Bootstrapped and checked on x86_64-unknown-linux-gnu.  This patch causes
>> fault in chkp-strchr.c test and also breaks instrumented bootstrap.  Both
>> are due to problem in SRA fixed by the next patch.  OK for trunk?
>>
>> Thanks,
>> Ilya
>> --
>> gcc/
>>
>> 2015-01-16  Ilya Enkovich  <ilya.enkovich@intel.com>
>>
>>         * ipa-chkp.c (chkp_produce_thunks): Add early param.
>
>  to support splitting of thunk production.  Do not remove bodies of
> "always_inline" functions.
>
> Is that an accurate representation of what changed?
>
>
>>         (pass_data_ipa_chkp_early_produce_thunks): New.
>>         (pass_ipa_chkp_early_produce_thunks): New.
>>         (pass_ipa_chkp_produce_thunks::execute): Adjust to new
>>         chkp_produce_thunks signature.
>>         (make_pass_ipa_chkp_early_produce_thunks): New.
>>         * passes.def (pass_ipa_chkp_early_produce_thunks): New.
>>         (pass_ipa_chkp_produce_thunks): Move after local optimizations.
>>         * tree-pass.h (make_pass_ipa_chkp_early_produce_thunks): New.
>>
>> gcc/testsuite/
>>
>> 2015-01-16  Ilya Enkovich  <ilya.enkovich@intel.com>
>>
>>         * gcc.target/i386/chkp-always_inline.c: New.
>
> With the updated ChangeLog, this is fine.
>
> jeff
>

Thanks for review!  Here is a committed ChangeLog.

Ilya
--
gcc/

2015-01-19  Ilya Enkovich  <ilya.enkovich@intel.com>

        * ipa-chkp.c (chkp_produce_thunks): Add early param
        to split thunks production into two passes.  Keep
        'always_inline' function bodies after the first pass.
        (pass_data_ipa_chkp_early_produce_thunks): New.
        (pass_ipa_chkp_early_produce_thunks): New.
        (pass_ipa_chkp_produce_thunks::execute): Adjust to new
        chkp_produce_thunks signature.
        (make_pass_ipa_chkp_early_produce_thunks): New.
        * passes.def (pass_ipa_chkp_early_produce_thunks): New.
        (pass_ipa_chkp_produce_thunks): Move after local optimizations.
        * tree-pass.h (make_pass_ipa_chkp_early_produce_thunks): New.

gcc/testsuite/

2015-01-19  Ilya Enkovich  <ilya.enkovich@intel.com>

        * gcc.target/i386/chkp-always_inline.c: New.


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