Hi, On Mon, Nov 04 2019, Jan Hubicka wrote: >> On 11/4/19 3:12 PM, Jan Hubicka wrote: >> > Martin, do you know why this flag was introduced? >> >> Hi. >> >> The flag is used in IPA CP: >> >> call_summary <edge_clone_summary *> >> >> class edge_clone_summary >> { >> ... >> cgraph_edge *prev_clone; >> cgraph_edge *next_clone; >> } > > I see, so it is there to collect chains of duplications. I suppose it > makes sense even though it is bit unexpected use of summaries (I suppose > I approved it :)
Well, it was originally a duplication hook but martin converted it to a summary too. it just creates a link list of edges created during IPA-CP but these specific "summaries" live only during the IPA-CP WPA stage and are promptly deleted afterwards so they hopefully should not pose any issues. > > In this case we want to more know that something was duplicated and > trigger creation. I am afraid I don't understand what is "this case" in this context but yeah, the behavior should not be normally required. > There are other cases where we do not want to > duplicate in all siutations (like when inline clone is created). > I was wondering about adding duplicate_p function which will by default > return true if source summary exists and which one can overwrite with > different behaviour. What do you think? > Well, you'll have to override it for edge_clone_summary_t :-) But otherwise it makes sense, I guess. Martin