http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51275
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-23 10:54:07 UTC --- The question is if we should do this in the fab pass or elsewhere. Also, I'm afraid it is O(n^2) compile time written this way, consider a basic block containing 100000 clobber stmts followed by a normal assignment, optimize_clobbers will return 100000 times false in that case, the first call will walk through 100001 stmts, second call through 100000 stmts, third through 99999 stmts, etc. to find that out. So, IMHO it would be better to call optimize_clobbers not for each clobber stmt, but instead for the GIMPLE_RETURN or GIMPLE_RESX and walk backwards from it. BTW, for the internal GIMPLE_RESX I think we perhaps could move over the clobber stmts to where the exception would land.