This is the mail archive of the gcc-patches@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: Speed up RTL CPROP


On Wed, 2005-02-02 at 11:26 -0500, Ian Lance Taylor wrote:
> Jeffrey A Law <law@redhat.com> writes:
> 
> > The sole remaining purpose of the reg_set_table is to allow us to know
> > what blocks a particular pseudo register is set in.  Rather than store
> > the insn which sets the pseudo, we can just as easily store the block
> > index of the block containing the insn which sets the pseudo.  That
> > allows us to remove two memory loads from the loop.
> 
> Don't you know have duplicate information in reg_set_table,
Yes.  Note that we effectively had duplicate information before
even if the entries weren't exact duplicates.



>  in that a
> single basic block index may appear in the list multiple times?
Yes.


>   That
> shouldn't break anything, but is it wasteful?
It's rare.
  
> 
> In particular, what if you make the simple optimization that
> record_one_set only adds a new entry if
>     reg_set_table[regno] != NULL
>     && reg_set_table[regno]->bb_index != BLOCK_NUM (insn)
> ?  I would imagine that that would cut down on the number of entries
> considerably in some types of code, given that compute_sets() just
> walks down the insn chain in order.
I can do some experiments with it.  

jeff



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