[RFC] Tightening up the type system
Diego Novillo
dnovillo@redhat.com
Thu Sep 30 18:43:00 GMT 2004
On Tue, 2004-09-28 at 15:57, Tom Tromey wrote:
> So, I'm in favor of adding the checks, with the caveat that if it
> turns into a big morass it should perhaps be put off until the next
> stage 1.
>
It's certainly looking that way. Attached is the WIP patch. The main
changes are in the gimplifier (as we break down expressions, we need to
adjust the types of the operands) and in some optimizers that were not
emitting operands with the right types (e.g., ivopts).
I then ran into limitations in builtin processing. We have several
regressions in testsuite/builtins mostly because we are no longer able
to fold memmove to memcpy because we convert
memmove (&a, &b, n)
to
a.1 = (void *) &a;
b.1 = (const void *) &b;
memmove (a.1, b.1, n);
which we then fail to fold into memcpy because we don't recognize that
a.1 and b.1 really are non-overlapping. Perhaps this optimization
should be moved up into the tree optimizers. I'm not quite sure where
exactly this happens.
I will keep working on this from time to time, mostly to keep the patch
alive until 4.1 opens. If anyone is interested in picking it up, let me
know.
Diego.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20040930-type-checking.diff
Type: text/x-patch
Size: 19403 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20040930/7d1c31d9/attachment.bin>
More information about the Gcc
mailing list