Hi,

On 16 December 2016 at 23:41,  <hguala...@inf.puc-rio.br> wrote:
> Apparently when I compile my program with --opt=JIT, my code gets included
> 3 times in the resulting executable.

Likely, you are seeing two C copies of the function because of the way
the JIT is built.  You may get two very similar copies, but only of
the function that contains jitdriver.jit_merge_point().  You only get
one copy of all the rest.

The reason is that there is the normal function, and another
reorganized copy which can be called in some cases, like when
execution needs to exit the JIT and jump back to the interpreter.
This copy starts from the jit_merge_point instead of starting from the
normal entry point of the function.  In some cases the two versions
can be very similar, but for example, if the function does things
before entering the loop, then these things will not be found in the
JIT-generated copy.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to