On Thu, Apr 5, 2012 at 5:27 PM, Diego Novillo <dnovi...@google.com> wrote: > On 4/5/12 6:13 AM, Richard Guenther wrote: >> >> >> Currently we release the memory for released SSA names (which we keep >> around on a freelist, mainly to try to keep the SSA version namespace >> dense) after early optimizations. This has the negative impact >> (as documented) of permanently establishing holes in the SSA version >> namespace. The following patch fixes this in a simple way. >> >> Bootstrapped and tested on x86_64-unknown-linux-gnu. >> >> If you build fold-const.c with -O2 the distribution of released >> ssa names / removed holes is as follows: >> >> 43 release_ssa "SSA names released" 34900 >> 43 release_ssa "SSA name holes removed" 34900 > > > Could you elaborate on what this output means? What is 43? What is 34900?
It's citing from -fdump-statistics-stats output, 43 is the pass number of the 'release_ssa' pass, 34900 is the sum of released ssa names per function. Thus overall we released 34900 SSA names during the compile of fold-const.c > >> which means we never have "trailing" released SSA names, all SSA >> names on the freelist are for holes. The following is the >> distribution over releases happening per function: >> >> 43 release_ssa "SSA name holes removed == 0" 16 >> 43 release_ssa "SSA name holes removed == 1" 13 > > > Likewise here. What does this output mean? That's with changed statistics accounting, it's a histogram for the per-function number SSA names that got released, thus for 16 functions we released zero SSA names, for 13 functions one. > > >> We seem to have quite some "dead" functions in fold-const.c ;) >> >> I didn't measure any off-noise memory/compile-time effect of this >> patch though. > > > I ask because I don't understand these two conclusions. You're saying that > we don't do a lot of this, so compile-time effects should be nil? No, I'm saying despite some significant savings in SSA names namespace we don't have too many sbitmaps (the SSA renamer has one) or walks over the SSA name array. And we definitely don't have ones that would exhibit quadratic behavior in the size of the SSA name array. Richard. > > Thanks. Diego.