This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

java method calls and GIMPLE


Hi,

I've come to a bit of an impasse in the (java) escape analysis. In
order to do interprocedural analysis effectively, I need to know what
methods are called. However, it is rarely the case that this
information is available. For example, a call to System.out.println
looks like this:

 out.0 = out;
 out.1 = (struct  *) out.0;
 D.966 = out.1->vtable;
 D.967 = D.966 + 124B;
 D.968 = *D.967;
 D.969 = (java.io.PrintStream:: *) D.968;
 D.970 = _CD_HelloDate[1];
 D.971 = (struct  *) D.970;
 D.969 (out.0, D.971);

So its all vtables, function lookups and indirect function calls. I
appreciate that that's how it works, but its not terribly useful to
me, and severely restricts what I can do.

Ideally, I would have a list of methods that could be called at a
particular polymorphic function call. From there I can do whatever
analysis is appropriate.

Any ideas how I'd go about this?


Thanks Paul

PS it seems that even trivial examples, where the type is known at
compile time, generate code like this. Perhaps there's scope for a
polymorphism removal pass?



--
Paul Biggar
paul.biggar@gmail.com


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