[pypy-dev] [rpython] What might prevent a function call from beeing invlined by the JIT?

Maciej Fijalkowski fijall at gmail.com
Fri Feb 22 11:27:45 CET 2013


On Fri, Feb 22, 2013 at 8:49 AM, Костя Лопухин <kostia.lopuhin at gmail.com> wrote:
> In what cases does the jit decide not to inline a function call, but
> place "call_may_force" instead?
> The context is that I have a simple interpreter, like an expanded
> kermit, and I am testing how the jit helps - it perfectly unboxes
> wrapped objects in a loop, but does not inline function calls - I
> wonder what am I missing here. I found a place where PyPy interpreter
> makes a call and did not see anything special there.

call_may_force means you call a function that has a loop that calls
back to the intepreter. Probably argument handling or so. You need to
annotate the function with @jit.unroll_safe (that means that each time
the number of iteration is different, you'll get slightly different
assembler, so beware)


More information about the pypy-dev mailing list