------- Comment #15 from hubicka at gcc dot gnu dot org 2010-01-10 22:51 ------- In general requiring all changes to clone function body is bit expensive since it involves copying of whole function (ipa-sra is one of more busy passes). It is also somewhat difficult to implement with current PM organization: early IPA passes are allowed to produce new functions and process them via cgraph_add_new_function but in this case this won't work, since the function is half way optimized (i.e. already in SSA form).
This will require either splitting optimizations into early optimization from in-to SSA as separate pass so they are re-entrant (that would be useful to run them at LTO stage too) and/or teaching passmanager to be more flexible and start from given pass. But this is both bit too invasiave for stage 4. Can't we just fix this in dwarf2out to give out debug info here or output templates early? Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42336