Hi, I have an LTO pass which stores information collected during "generate function summary" in a map which is symtab_node* -> data*. I know that the symtab_node*s are encoded by an lto encoder and can be decoded back during the "read function summary". I also am aware that other optimizations might be removing or adding cgraph_node*s to the program and my pass uses the insertion and removal hooks to analyze or drop these accordingly. However, I am confused about different function versions. My current understanding is that different versions of the same function share the same cgraph_node*. Is this correct?
If that's the case, that would mean that storing information on a map where the key is the symtab_node* is probably not a good idea as a specific version of the function might be dropped and in that case I may be dropping information for all cases. This brings me to the field "order" in symtab_node. Is this field constant through the linking process and can it be used to differentiate between different versions of the same function? Thanks!