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


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, in that a
single basic block index may appear in the list multiple times?  That
shouldn't break anything, but is it wasteful?

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.

Ian


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