PIC = polymorphic inline caches.

When you optimize the lookup in the VM for speed you implement the so called inline caches: at each send site, you put information about the result of the previous lookup done here. In most case, a send site is monomorphic, which mean it is always the same method that is called there (the receiver has always the same class), so the information put is the method always called and this method is triggered instead of doing a lookup to find the method (to increase the execution speed by avoiding lookup).

Some other send sites use polymorphism, which means there are a few different class possible for the receiver of the send site. Inline caches optimizations on this sites are called PIC, and the optimization is done differently.

For more informations, there's Eliot's blog about cog here:
http://www.mirandabanda.org/cogblog/2011/03/01/build-me-a-jit-as-fast-as-you-can/
or the thesis of hölzle here:
http://www.cs.ucsb.edu/~urs/oocsb/self/papers/urs-thesis.html

The thesis of hölzle explains the basics of inline caches and their implementation in self 91, the cog blog explains their implementation in Cog.

Hope I could help you,


2013/7/2 Tudor Girba <tudor@tudorgirba.com>
 
What is PIC? :)

Doru


On Sun, Jun 30, 2013 at 10:06 AM, stephane ducasse <stephane.ducasse@gmail.com> wrote:

Hi eliot

So I was reading the PhD of Holzle and I wanted to know

        - I remember that at southampton (yes that far) you did a presentation on the tragedy of the PIC.
        And I would not find the slides (because there were none).
        What was the pitch? That megamorphic site are killing PIC?

        - does VW use type feedback?
        if yes, what were the strategies to decide what and when to recompile.

        - I was wondering how type feedback and PIC interact (I'm at chapter 5 of the PhD so may be this is explain in the self implementation part)
        the first case of the PIC could be based on type feedback?



Stef



--
www.tudorgirba.com

"Every thing has its own flow"




--
Clément Béra
Mate Virtual Machine Engineer
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq