Segher Boessenkool writes: > On Fri, Sep 11, 2015 at 10:24:42AM +0100, Jiong Wang wrote: >> >> Segher Boessenkool writes: >> >> > On Thu, Sep 10, 2015 at 08:14:29AM -0700, Segher Boessenkool wrote: >> >> This patch rewrites the shrink-wrapping algorithm, allowing non-linear >> >> pieces of CFG to be duplicated for use without prologue instead of just >> >> linear pieces. >> > >> >> Bootstrapped and regression tested on powerpc64-linux. Is this okay >> >> for mainline? >> > >> > Now also bootstrapped and regression tested on x86_64-linux. >> >> + AArch64 boostrapping OK. > > Thank you for testing! > >> A quick check shows > 30% more functions shrink-wrapped during >> bootstrapping by a the following command: >> >> cd $TOP_BUILD ; find . -name "*.pro_and_epilogue" | xargs grep >> "Perform.*shrink" | wc -l > > Wow, that is a lot! But this is mostly the testsuite? Shorter functions > can be wrapped a whole lot more often.
They all comes from gcc source code, not from testsuite as my bootstrap command is "make BOOT_CFLAGS=-O2 -fdump-rtl-pro_and_epilogue". testsuite itself is not involved in bootstrap. And I can confirm I get >30% more functions shrink-wrapped by cd $TOP_BUILD/gcc ; grep "Perform.*shrink" *.pro_and_epilogue | wc -l This only count shrink-wrap performed on gcc core source code during final stage in bootstrapping. I also do some quick check, new shrink-wrap opportunites come from files like dwarf2out.c, emit-rtl.c, tree.c, tree-into-ssa.c etc, so they are valid. I know shrink-wrap is very sensitive to the RTL instruction sequences, looks like your re-write make it much more friendly to AArch64 :) -- Regards, Jiong