This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc compile-time performance
From: Jan Hubicka <jh@suse.cz>
Date: Mon, 20 May 2002 14:56:49 +0200
> One big disappointment is that, because approx_reg_cost runs on
> just about any RTX, we can't use note_uses() just like gcse.c
> does to find REGs. note_uses only works on the toplevel pattern
note_uses won't return you the REGs in complex expression.
For (set (reg A) (plus (reg B) (reg C))
the callback is called just for (plus (reg B) (reg C)) and needs to do
it's own walk.
If GCSE relies on something else, it is buggy.
GCSE provides it's own infrastructure to handle this part.
See gcse.c:find_used_regs(). That's exactly what I would have
liked to use for this approx_reg_cost stuff.
But, like I said, because CSE examines sub-expressions of an
insn pattern not the whole pattern itself, this solution cannot
be used.