This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC -- CSE compile-time stupidity


On Mon, 2005-02-21 at 14:42 -0500, Kazu Hirata wrote:
> Hi Jeff,
> 
> > The second thought is to initialize all of cse_reg_info entries at the
> > beginning of cse_main.  Set aside a bitmap with as many bits as
> > max_regs.  Whenever we use one of these accessor macros for register
> > k, set a bit k saying "cse_reg_info_table[k] is in use."  This way,
> > when we are done with a basic block, we can walk the bitmap and
> > reinitialize those that are used.  Again, a good optimizer should be
> > able to eliminate most of these bit sets, but a non-pure/const
> > function call will block the cleanup opportunities.  Of course, this
> > bitmap walk is far more expensive than cse_reg_info_timestamp++.
> 
> I just tried this.  It comes very close to the current timestamp
> approach but loses by 0.3% or so in compile time.  I'm attaching a
> patch for completeness.
Thanks.  I suspect this won't cut the mustard either -- the SET_BIT
twiddles memory, which, due to lameness in our aliasing code, is
likely going to cause us to miss the CSE opportunities that are
so important here.

Beyond that, I suspect we get killed zeroing the sbitmap every time we
start a new cse block.  I may play with it though.  Who knows, maybe
there'll be something that we can do with it.

jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]