This is the mail archive of the gcc@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: [tree-ssa] where to fix this?


On Mon, 5 Jan 2004 law@redhat.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?

Roger
--


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