Re: Do not lose track of resolution info due to tree merging

2018-02-08 Thread Jan Hubicka
Hi, this is patch I comitted yesterday (but failed to send email) which removes forgotten sanity check from original fix. The check tries to catch cases where we do merge definitions and declarations to see if resolution merging logic is live. It is. Honza * lto.c (register_resolution): R

Re: Do not lose track of resolution info due to tree merging

2018-02-08 Thread Jan Hubicka
Hi, it turns out that I have hit bit of can of worms here, so I spent most of yesterday looking into minimal fix. There are multiple issues remaining - we forget to output symbols that have only DECL_EXTERNAL flag set; we behave funny to builtins (in some cases it makes sense in others it does not

Re: Do not lose track of resolution info due to tree merging

2018-02-06 Thread Richard Biener
On February 6, 2018 2:29:42 PM GMT+01:00, Jan Hubicka wrote: >> >> I think unify_scc is only ever called from WPA so you can elide the >flag_ltrans checks. >> >> Otherwise OK. > >Thanks, I have updated this and also dropped the sanity check from >symtab.c >because, well, it finds another bugs

Re: Do not lose track of resolution info due to tree merging

2018-02-06 Thread Jan Hubicka
> > I think unify_scc is only ever called from WPA so you can elide the > flag_ltrans checks. > > Otherwise OK. Thanks, I have updated this and also dropped the sanity check from symtab.c because, well, it finds another bugs in target versioning I will handle incrementally. I also noticed I

Re: Do not lose track of resolution info due to tree merging

2018-02-05 Thread Richard Biener
On February 5, 2018 3:49:25 PM GMT+01:00, Jan Hubicka wrote: >Hi, >in the testcase of PR81004 we produce wrong code (reference to >optimized out >comdat symbol) due to strange sequence of events that is initiated by >fact >that after streaming in a comdat group we sed one of resolution infos >to >

Do not lose track of resolution info due to tree merging

2018-02-05 Thread Jan Hubicka
Hi, in the testcase of PR81004 we produce wrong code (reference to optimized out comdat symbol) due to strange sequence of events that is initiated by fact that after streaming in a comdat group we sed one of resolution infos to LDPR_UNKNOWN. This is because of tree merging with earlier unit that