On Jan 5, 2006, at 8:09 AM, Andrew Haley wrote:

I've been experimenting with devirtualizing method calls, and
sometimes a construct like this can pay dividends:

Another possibility is to have the inliner convert virtual calls into
something like the above.  Maybe the real solution to all of is is to
have a representation for virtual calls in the IL, but...

So, what I'm thinking of doing is writing a post-inlining pass that
rewrites the trees and then tidies up the CFG.  Is this the right
approach?

Just for the record, there are already two other people implementing
something like already:
http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00487.html
and
http://gcc.gnu.org/ml/gcc-patches/2005-10/msg01563.html

-- Pinski


Reply via email to