>>>>> "Michael" == Michael Matz <[EMAIL PROTECTED]> writes:
Michael> Yes, devirtualization. But I wonder if you really need class Michael> hierarchies for this (actually I'm fairly sure you don't). I'm generally in favor of what you talked about in this note and others, and also Danny's overall approach of trying to design trees as a language-neutral IR. However, I'm not sure I agree with the above assertion. Specifically, for Java I think it is sometimes possible to strength reduce interface calls to virtual calls, but I don't see how this could be done without class hierarchy information. Also in Java it is possible to devirtualize calls in some situations where only a bound on the type is known. For instance at a call site we might know that all possible targets are derived from a class where the virtual method is final. I have no idea whether these cases matter, but they do exist. There are also type-related optimizations that can be done on Java that don't involve devirtualization. We have some code kicking around that does devirtualization and some other things for Java. We never put this in since it has a huge hack: the new passes aren't language-neutral and are added at runtime. Tom