[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libjit] stack maps / patchpoint

From: Aleksey Demakov
Subject: Re: [Libjit] stack maps / patchpoint
Date: Thu, 18 Jan 2018 01:42:50 +0300

Hi David,

On Wed, Jan 17, 2018 at 10:54 PM, David Meyer <address@hidden> wrote:
> Does libjit have a mechanism that is equivalent to LLVM’s stack maps and
> patch points? ( ).

There is no such a mechanism readily available. In principle, it
should be possible to add it. Libjit has internal data  on value
locations. But libjit uses very simplistic code generation approach.
It assigns stack frame offsets on demand when it meets the first
instruction that needs the value to be on the stack. The order of
basic block compilation might be different from the execution order.
So, I guess, sometimes you might be interested in a value the position
of which is not yet known. It is possible to call _jit_gen_fix_value()
in order to force a value to obtain some stack offset. But a given
value might be optimised out and so that enforced stack location would
contain nothing useful. To prevent this it from being optimized out
you need to make it live at the point you ask its location. The way to
do it is to refer to it in some instruction, perhaps it will be
required to introduce some new opcode for this. In effect it would
forbid optimizing out a value. Probably there will be some more
problems to resolve.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]