On June 2, 2014 5:44:13 PM CEST, Jan Hubicka <hubi...@ucw.cz> wrote: >> >> Well, I'm hesitant to add a new pass just to optimize a (irrelevant >in practice) >> benchmark. I'm ok with strengthening existing infrastructure or >enhancing >> existing passes. >> >> The issue with these mini-passes is that they are very placement >sensitive >> and you don't easily get secondary effects. See the comment (and >> "patch") about DCE - the ??? comment can be addressed the same >> way Bernd addressed it (use cgraph_function_possibly_inlined_p). >> Would that optimize the testcase? >> >> Note that the issue with nested function use prevails (not sure how >to >> solve that - same issue in Bernds patch). > >I think this part of the patch can be made much cleaner by simply >adding flag >"used by one function only" to variables. We can compute it at the end >of IPA >queue and remove the code playing with local statics, nested functions >and inlines. > >I can easily implement this analysis - perhaps it would be useful for >AA or >something else, too?
Yeah, I discussed this with martin today on irc. For aliasing we'd like to know whether a decl possibly has its address taken. Currently we only trust TREE_ADDRESSABLE for statics - and lto might change those to hidden visibility public :( So we want deck_referred_to_by_single_function and deck_may_have_address_taken. Richard. >Honza >> >> Thanks, >> Richard. >> >> > -Sandra >> >