[PATCH] IPA: fix reproducibility in IPA MOD REF
Martin Liška
mliska@suse.cz
Thu Nov 18 18:31:11 GMT 2021
On 11/18/21 19:29, Jan Hubicka wrote:
>> On 11/18/21 19:22, Jan Hubicka wrote:
>>>> Supported LTO compression algorithms: zlib zstd
>>>> gcc version 12.0.0 20211118 (experimental) (GCC)
>>>> /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warning: relocation against `lm_read_ctl_dict_size_n_lmclass_used' in read-only section `.text'
>>>> /usr/bin/ld: ./xxx.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `__ckd_calloc___elem_size' can not be used when making a shared object; recompile with -fPIC
>>>> /usr/bin/ld: final link failed: bad value
>>>> collect2: error: ld returned 1 exit status
>>>> /usr/bin/ld: ./yyy.ltrans0.ltrans.o: warning: relocation against `__ckd_calloc___n_elem' in read-only section `.text'
>>>> /usr/bin/ld: ./yyy.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `__ckd_calloc___elem_size' can not be used when making a shared object; recompile with -fPIC
>>>> /usr/bin/ld: final link failed: bad value
>>>> collect2: error: ld returned 1 exit status
>>>> diff: yyy.ltrans0.ltrans*optimized: No such file or directory
>>>> 54,55d53
>>>> < movslq lm_read_ctl_dict_size_n_lmclass_used(%rip), %rax
>>>> < movl $0, 0(%rbp,%rax,4)
>>>>
>>>> I tracked that it differs in tree DSE dump.
>>>>
>>>> May I install the patch?
>>>
>>> No, I think it is bug of symbol_summary that get is causing a
>>> difference.
>>
>> Isn't problem that the following code
>>
>> past_flags.reserve_exact (summary->arg_flags.length ());
>> past_flags.splice (summary->arg_flags);
>> past_retslot_flags = summary->retslot_flags;
>
> Aha, that makes sense. Sorry. It used to be saved for dumping only
> while we now use it to merge old summaries with new. So it is indeed a
> (quite stupid) bug.
Good :) Good. I thought I overlooked something.
>
> The patch is OK. Thanks for finding it.
> Honza
>
You're welcome. Thanks for fast review.
Martin
More information about the Gcc-patches
mailing list