Fix WPA corruption seen in LTO bootstrap

H.J. Lu hjl.tools@gmail.com
Wed May 11 09:03:00 GMT 2011


On Tue, May 10, 2011 at 8:12 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Apr 23, 2011 at 6:33 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Hi,
>> the problems with LTO build reported by Toon is caused by a hack disabling
>> jump function in ipa-prop on wpa.  The hack is no longer needed and it is wrong,
>> since jump function makes no sense when they are not updated. Consequentely
>> inline cost metrics get lost.
>>
>> I am testing the following patch that also fortifies the datastructures
>> for array overruns (this was how the problem manifested itself).
>>
>> Bootstrapping/regtesting x86_64-linux, will commit it if passes.
>>
>> Honza
>>
>>        * ipa-prop.c (ipa_propagate_indirect_call_infos): Remove obsolette
>>        WPA hack.
>>        * ipa-prop.h (ipa_get_param, ipa_is_param_used, ipa_param_cannot_devirtualize_p,
>>        ipa_param_types_vec_empty, ipa_get_ith_jump_func, ipa_get_lattice):
>>        Fortify array bounds.
>>        * ipa-inline-analysis.c (add_clause): Fix clause ordering.
>>        (and_predicates, or_predicates, predicates_equal_p, evaulate_predicate):
>>        Sanity check predicate length.
>>        (remap_predicate): Likewise; sanity check jump functions.
>>        (inline_read_section, inline_write_summary): Sanity check
>>        predicate length.
>
> This caused:
>
> http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg01110.html
>

I meant:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954



-- 
H.J.



More information about the Gcc-patches mailing list