On Tue, 2013-11-19 at 18:55 -0700, Jeff Law wrote: > So when we first started looking at the FSA/FSM optimization for > coremark, I speculated that it could be done in the jump threader and > that by doing so we'd see benefits in more general codes. > > This patch enables the code to allow multiple duplicated blocks on a > threading path. It won't catch the coremark case as-is because of the > loop issues (which I'll be returning to immediately). > > We can measure the benefits quite easily using valgrind/cachegrind. > > I've used the trunk compiler with and without this patch to build > gcc-4.7.3 (no special options, so it includes checking). I then run .i > files through that 4.7.3 compiler under the watchful eye of valgrind. > > Valgrind gives me nice data about the number of dynamic branches, # > instructions and the like. Some of you may recall similar tests in 2011 :-) > > This patch allows GCC to eliminate .34% of the dynamic conditional > branches and .26% of the total number of dynamic instructions. > Furthermore, if you compare the total number of dynamic branches > eliminated vs total number of instructions eliminated, you'd find that > for each dynamic branch eliminated, we also eliminate 3.3 other > instructions. > > To compare, the 2011 testing saw a .63% reduction in dynamic branches > and a .50% reduction in total dynamic instructions eliminated. We > eliminated 3.4 other instructions for each dynamic branch eliminated. > > So this picks up fewer cases that the 2011 changes. But it's still > significant. The secondary effects are consistent, which isn't a great > surprise I suppose. > > There's still some obvious improvements that can be made here, but this > code is far enough along that it should go in now so that focus can move > to the loop issues to enable the FSA/FSM coremark optimization. > > > > Bootstrapped and regression tested on x86_64-unknown-linux-gnu. > Installed on the trunk. > > plain text document attachment (patch) > * tree-ssa-threadupdate.c: Fix trailing whitespace. > * tree-ssa-threadupdate.h: Likewise.
FWIW, it looks like you attached the whitespace cleanup patch again, rather than the one you discuss above. For the archives, it looks like your email is referring to r205074 (though that itself seems to have some purely whitespace fixes, together with the real changes).