This is the mail archive of the
mailing list for the GCC project.
Re: Speed up RTL CPROP
Jeffrey A Law <firstname.lastname@example.org> 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.