Re: Devirtualizing method calls

2006-01-05 Thread Daniel Berlin
On Thu, 2006-01-05 at 13:37 +, Andrew Haley wrote: > Andrew Pinski writes: > > > > On Jan 5, 2006, at 8:09 AM, Andrew Haley wrote: > > > > > I've been experimenting with devirtualizing method calls, and > > > sometimes a construct like

Re: Devirtualizing method calls

2006-01-05 Thread Andrew Haley
Andrew Pinski writes: > > 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 conver

Re: Devirtualizing method calls

2006-01-05 Thread Andrew Pinski
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 a

Devirtualizing method calls

2006-01-05 Thread Andrew Haley
I've been experimenting with devirtualizing method calls, and sometimes a construct like this can pay dividends: /* Fetch vtable entry into D.914, then... */ if (D.914 != bar) { /* Make virtual call. */ D.915 = D.914 (this.7, p.6); iftmp.8 = D.915; }