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] Java: Decls that alias?


Jeff Sturm writes:
 > On Fri, 12 Sep 2003, Andrew Haley wrote:
 > > In the mainline compiler we handle this by sharing RTL between
 > > multiple decls; this has exactly the effect we want.  But how is it
 > > possible to do this in GIMPLE?  Is there a way to alias two local
 > > variable declarations?
 > 
 > Andrew, I'm not sure I really understand the problem.  Is this somehow
 > related to the bytecode failures currently on tree-ssa?

I think so.

Imagine you have "Slot 4", and this contains a jint.  

At one point in the program, "Slot 4" might have debug info with a
variable name "bar".  At another point, "Slot 4" might have debug info
with a variable name "foo".  But semantically they are the same
variable -- an assignment to "Slot 4" can refer either to "foo" or
"bar".  So, we need to treat "foo" and "bar" as two names of a single
variable.

Also, at some point in the program there might be no debug info at all
for "Slot 4", yet it's still legal to refer to that slot.  A write to
"Slot 4" might be read later as "foo" or "bar".

We handle this in the current byte compiler by sharing RTL between all
the decls that correspond to "Slot 4".

I don't know how to do this in GIMPLE.

Andrew.


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