This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] How to make DECLs that alias
Per Bothner writes:
>
> Could we use whatever mechanism C++ references use?
>
> I.e. suppose bytecode verification gives us that local variable
> number 4 has type int (within a region of interest). We later
> see variable declarations "x" and "y" that map to slot 4.
>
> Then represent this as:
> jint __local_4_as_int;
> jint& x = __local_4_as_int;
> jint& y = __local_4_as_int;
We could. I'm a bit reluctant to do so, because this AFAIK will get
expanded to
jint *x = &__local_4_as_int;
jint *y = &__local_4_as_int;
so every local will be forced into a stack slot. But I'll try.
Andrew.