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;
is guarded with if (dump_file && ... )?
It should be pure function. I think it is:
/* Getter for summary callgraph node pointer. */
T* get (cgraph_node *node) ATTRIBUTE_PURE
{
return exists (node) ? (*m_vector)[node->get_summary_id ()] : NULL;
}
It should not be using get_summary_id (which allocates it for no good
reaosn) and simply check that summary_id is non-negative.
/* Get summary id of the node. */
inline int get_summary_id ()
{
return m_summary_id;
}
Where do you see the allocation?
Martin
Still I wonder how this can make code different - that looks like
another bug somewhere.
Honza