https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65076
--- Comment #18 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 25 Mar 2015, hubicka at ucw dot cz wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65076 > > --- Comment #17 from Jan Hubicka <hubicka at ucw dot cz> --- > > > Even though the inline decisions does not seem to be changed considerably > > > (at least on tramp3d). > > > > Yeah, clobbers don't account for anything for size/inline estimates > > (well, I hope so!). > > Yep, they are ignored. Btw, and we indeed generate more clobbers with GCC 5: > grep CLOBBER a/tramp3d-v4.ii.015t.ssa | wc -l 8937 > grep CLOBBER b/tramp3d-v4.ii.018t.ssa | wc -l 12636 which is odd as we now have new code that replaces clobbers with SSA default defs... > grep CLOBBER a/tramp3d-v4.ii.010t.eh | wc -l 13012 > grep CLOBBER b/tramp3d-v4.ii.010t.eh | wc -l 13012 > grep CLOBBER a/tramp3d-v4.ii.011t.cfg | wc -l 12827 > grep CLOBBER b/tramp3d-v4.ii.011t.cfg | wc -l 12827 so we manage to drop a lot of them during into-SSA with GCC 4.9 but fail to do that with GCC 5. Which would mean we write less vars into SSA form(?) > grep '_[0-9]* =' a/tramp3d-v4.ii.015t.ssa | wc -l 46055 > grep '_[0-9]*(D)' a/tramp3d-v4.ii.015t.ssa | wc -l 30839 vs. > grep '_[0-9]* =' b/tramp3d-v4.ii.018t.ssa | wc -l 45543 > grep '_[0-9]*(D)' b/tramp3d-v4.ii.018t.ssa | wc -l 33782 eventually it might be that in 4.9 local_pure_const runs for a functions callees before we fixup its CFG and write it into SSA form. That might cause a significant cleanup of EH before entering into-SSA for 4.9 (as callees might become nothrow). At least that's now my theory. I wonder if it makes sense to run local + IPA pure-const as we now do "IPA into-SSA". So sth like Index: gcc/passes.def =================================================================== --- gcc/passes.def (revision 221633) +++ gcc/passes.def (working copy) @@ -58,7 +58,9 @@ along with GCC; see the file COPYING3. NEXT_PASS (pass_build_ssa); NEXT_PASS (pass_ubsan); NEXT_PASS (pass_early_warn_uninitialized); + NEXT_PASS (pass_local_pure_const); POP_INSERT_PASSES () + NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_chkp_instrumentation_passes); PUSH_INSERT_PASSES_WITHIN (pass_chkp_instrumentation_passes) (which likely doesn't work exactly like that, of course). Or keep doing local_pure_const only and make sure to process pass_build_ssa_passes in a proper order. Of course the real power of local-pure-const only arrives when done after local optimizations... But I'd say the compile-time effect is clearly going into-SSA before cleaning up EH significantly. > > And yes, doing DSE early is quite an old idea... we should revisit it > > next stage1. > > I also run into it several time. We should not forget this time ;) ;)