bjorn3 commented on Issue #1364:
I think
finalize_definition
may makes sense to be called multiple times in for example a C JIT. After every function definition all pending relocations are likely either resolved outside the current compilation unit, or resolved to a previously defined function. This means that you could immediately perform the relocation of the code without a list of pending relocations consuming unnecessary memory.
iximeow commented on Issue #1364:
In that case, wouldn't the C JIT would have a custom
Backend
implementation that (hopefully) makes that usage clear in its documentation? I mostly want to be sure that uses ofcranelift-module
in-tree here are clear about how they should be used.I'm not sure if trying to write a C JIT on top of cranelift-object would be ideal..
bjorn3 commented on Issue #1364:
Yeah, a C jit would probably use simplejit. It may want to support aot too though, in which case it would be nice to still support
finalize_definitions
to be able to make the actual C -> clif part generic over the backend.
philipc commented on Issue #1364:
Do I need to do anything more to get this merged?
bnjbvr commented on Issue #1364:
@philipc nope. Merging on behalf of @iximeow who approved.
Last updated: Nov 22 2024 at 17:03 UTC