[tree-ssa] One final DCE speedup.

Andrew MacLeod amacleod@redhat.com
Fri Oct 17 20:25:00 GMT 2003


On Fri, 2003-10-17 at 16:05, Richard Henderson wrote:
> On Fri, Oct 17, 2003 at 03:52:36PM -0400, Andrew MacLeod wrote:
> > + /* vector indicating an SSA name has already been processed and marked 
> > +    as necessary.  */
> > + static bool *processed;
> 
> I'd think an sbitmap would take less memory.  Which could be
> non-inconsequential in large functions...
> 

Its so heavily called, I was going for pure speed :-). This check is the
dominant part of the routine on programs with a lot of PHI nodes. 

I just checked and the overhead of doing the bit check isn't terribly
significant, but it is in the 5-10%(!!) range for all of DCE. But when
DCE is running at 30% of the previous speed, Its probably worth it to
save the memory. Time spent in DCE jumps from  .3 to about .33 seconds
consistantly.

All things considered, I'll switch it now, tahts not enough time to
worry about non using a bitmap. :-).

Andrew



More information about the Gcc-patches mailing list