lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] Lightning Digest, Vol 91, Issue 9


From: Marc Nieper-Wißkirchen
Subject: Re: [Lightning] Lightning Digest, Vol 91, Issue 9
Date: Tue, 15 Oct 2019 07:50:10 +0200

Hi Paul, hi Paulo,

>   This feature already existed on earlier versions of lightning 2,
> and was droped due to being close to unmaintenable. Maybe you want
> to revive it :)
>
>   Can you describe use cases of it?
>
>   Either way, I imagine it is to have extra long lived registers. If
> not, I suggest using jit_get_reg and jit_unget_reg while generating the
> IR. A register value returned by jit_get_reg before calling jit_emit
> should be used for an as small as possible code range, and avoid using
> it in branches (for example, use only to jump over an instruction).
> Basically, jit_get_reg as exported will generate a spill/reload in the
> range it is used. And then, when calling jit_emit, it will check these
> registers, and if safe, will remove the spill/reload.
>
>   Using JIT_Ax (and JIT_FAx) might break badly when there are variadic
> functions involved, and argument registers are already in the pool of
> temporaries returned by jit_get_reg. Just that jit_get_reg should
> prevent bugs by checking possible clobbers.

That's great news about jit_get_reg and jit_unget_reg. May I ask to
add documentation about them to the manual, including examples of
their use? In particular, what exactly has to be avoided with respect
to branches.

Speaking of the official manual, could you also include the
documentation of `jit_live' with examples and what will work and what
won't? That would be great!

Thanks,

Marc

>
> Thanks!
> Paulo
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Lightning mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lightning
>
>
> ------------------------------
>
> End of Lightning Digest, Vol 91, Issue 9
> ****************************************



reply via email to

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