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] Fix lto-profiledbootstrap [was: Merge cgraph_get_create_node and cgraph_get_create_real_symbol_node]


On Fri, Nov 15, 2013 at 12:46 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > 2013-11-14  Uros Bizjak  <ubizjak@gmail.com>
>> >
>> >     * lto-streamer-in.c (input function): Call cgraph_create_node if
>> >     cgraph_get_node failed.
>> >
>> > Tested with lto-profiledbootstrap on x86_64-pc-linux-gnu, regression
>> > tested also with -m32 [1].
>> >
>> > OK for mainline?
>
> OK (though it is a bit ugly - but lto streaming is very much a special case),
> thanks!

Why would the cgraph node be not present when we input the body!?
Isn't there a bug elsewhere??

IMHO this just papers over an issue.

Richard.

> Honza
>> >
>> > [1] http://gcc.gnu.org/ml/gcc-testresults/2013-11/msg00989.html
>> >
>> > Uros.
>
>> Index: lto-streamer-in.c
>> ===================================================================
>> --- lto-streamer-in.c (revision 204807)
>> +++ lto-streamer-in.c (working copy)
>> @@ -917,7 +917,8 @@ input_function (tree fn_decl, struct data_in *data
>>    gimple_register_cfg_hooks ();
>>
>>    node = cgraph_get_node (fn_decl);
>> -  gcc_checking_assert (node);
>> +  if (!node)
>> +    node = cgraph_create_node (fn_decl);
>>    input_struct_function_base (fn, data_in, ib);
>>    input_cfg (ib_cfg, fn, node->count_materialization_scale);
>>
>


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