On Thu, Nov 26, 2015 at 09:45:06PM -0200, Alexandre Oliva wrote: > VTA's cselib expression hashing compares expressions with the same > hash before adding them to the hash table. When there is a collision > involving a self-referencing expression, we could get infinite > recursion, in spite of the cycle breakers already in place. The > problem is currently latent in the trunk, because by chance we don't > get a collision. > > Such value cycles are often introduced by reverse_op; most often, > they're indirect, and then value canonicalization takes care of the > cycle, but if the reverse operation simplifies to the original value, > we used to issue a (plus V (const_int 0)), because at some point > adding a plain value V to a location list as a reverse_op equivalence > caused other problems. > > (Jakub, do you by any chance still remember what those problems were, > some 5+ years ago?)
I'm sorry, but I don't remember. Perhaps it has been before some recursion prevention has been added or whatever, maybe your own PR52001? Have you checked if your patch results in any significant debug info quality changes (say on cc1plus itself, using dwlocstat or just comparing .debug_info/.debug_loc sizes)? Jakub