http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54519
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-11 13:26:54 UTC --- Created attachment 28171 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28171 gcc48-pr54519.patch Generic solution patch. This doesn't attempt to special case inlining of FN.part.N back into FN or FN inlined into BAR (which is going to be harder than I've initially thought, because both the (possibly inlined) FN and FN.part.N have originally full copy of the BLOCK tree of FN, after some optimizations in between fnsplit and inlining some of the BLOCKs or BLOCK_VARS in either or both of them might be removed though. So, expand_call_inline would probably need to avoid attaching remap_blocks as children of new BLOCK it creates, instead it should somehow merge the two BLOCK trees back into one (it could use BLOCK_ABSTRACT_ORIGIN to find the matching blocks, and for the blocks that already exist in FN just insert_decl_map from FN.part.N's BLOCK to corresponding FN BLOCK). Similarly BLOCK_VARS need to be handled by preferring to remap to vars in the caller FN BLOCK_VARS (just insert_decl_map those), and just re-add the rest that was dropped on the floor in the mean time. And it would need to drop some of the debug bind and debug source bind stmts for parameters that this patch adds. Several of the tests fail sometimes, I'm going to file a separate PR for that because the problem is during the first df_analyze.