On Fri, Jan 10, 2020 at 11:23:34AM +0100, Richard Biener wrote: > > The following manages to avoid high EH indegree of landing pads > during the sequence of cleaning up empty EH with a chain of those. > By walking the landing pads in reverse order we mimic walking of > the EH tree depth-first (which I am too lazy to write...). It > looks like EH build assures that this is effectively the same. > > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. > > OK? > > With this the RedHat bugzilla testcase is down to a "flat" profile: > > parser function body : 14.60 ( 17%) 1.77 ( 31%) 16.37 ( > 18%) 720798 kB ( 23%) > tree eh : 14.80 ( 17%) 0.06 ( 1%) 14.87 ( > 16%) 246315 kB ( 8%) > integrated RA : 13.08 ( 15%) 0.30 ( 5%) 13.40 ( > 15%) 227799 kB ( 7%) > TOTAL : 85.07 5.68 90.77 > > 3183334 kB > > and memory usage is down as well to 4GB (it's actually this very patch > that helps here for reasons I have not investigated - maybe we never > shrink some EH data structures, who knows). > > Thanks, > Richard. > > 2020-01-10 Richard Biener <rguent...@suse.de> > > PR middle-end/93199 > * tree-eh.c (redirect_eh_edge_1): Avoid some work if possible. > (cleanup_all_empty_eh): Walk landing pads in reverse order to > avoid quadraticness.
LGTM. Jakub