On 10/01/2015 04:00 AM, Richard Biener wrote:

Apart from what Jakub said - this keeps the list non-recycled for example
after DCE if that doesnt call cleanup_cfg.  Likewise after passes that call
cleanup_cfg manually.  It also doesn't get called after IPA transform
passes (which would require calling on each function).

To at least catch those passes returning 0 (do nothing) I'd place the
call into execute_todo instead, unconditionally on flags.
As I suspected, the effect of doing this is small. Just under 1% increase in reused SSA_NAMEs (using an older version of GCC as input test files).

And just for future reference, the recycled vs allocated ratio is just under 40%.





@@ -607,6 +626,7 @@ unsigned int
  pass_release_ssa_names::execute (function *fun)
  {
    unsigned i, j;
+  flush_ssaname_freelist ();

which would make this redundant as well.  I suppose it would be
interesting to see some before/after
statistics of the release_ssa_names pass.  I expect the number of
holes removed to increase, hopefully
not too much (esp. important for analysis passes using sbitmaps of SSA names).
Interestingly enough, flushing the pending freelist in execute_todo results in marginally fewer holes being found (and it's very marginal -- .04%). Presumably that's because we actually do a better job at recycling and thus there's fewer holes to be found when pass_release_ssa_names eventually gets called.


Anyway, I'll spin that up.  Hopefully it'll complete before the day is over.

jeff


Reply via email to