This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] where to fix this?
- From: Roger Sayle <roger at eyesopen dot com>
- To: law at redhat dot com
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Dale Johannesen <dalej at apple dot com>, <gcc at gcc dot gnu dot org>
- Date: Tue, 6 Jan 2004 09:30:15 -0700 (MST)
- Subject: Re: [tree-ssa] where to fix this?
On Mon, 5 Jan 2004 email@example.com wrote:
> ie, if I have something like
> x = (type) y;
> If we can prove that the typecast is useless, then we can enter x = y into
> the const_and_copies table and copy propagate y into the uses of x. Often
> this also makes "x" go away completely.
Wouldn't it be reasonable to record "(type) y" in the table, and then
propagate "(type) y" into all the uses of x, so that x can go away?
One of the major advantages of handling integer constants in tree form
over doing in RTL, is that the trees maintain type information, but in
RTL CONST_INTs have VOIDmode, making substitution and simplification
much tricker, i.e. (eq (const_int ...) (const_int ...)) must defined
as invalid RTL as there's not enough context to perform the comparison.
If we store the equivalence that x is "256", tree-ssa must also need
to record that the 256 is a signed vs. unsigned char vs. integer.
Therefore, isn't the const_and_copies table implicitly typed?