Re: [PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2023-01-05 Thread Alex Fan
There is discussion in https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/13 to change the abi default, but not much attention for some time. The consensus seems to be set the abi and extension explicitly. > I recommend proposing a patch for adding such an API to LLVM. I would

Re: [PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2023-01-05 Thread Alex Fan
*From:* Thomas Munro *Sent:* Thursday, December 15, 2022 9:59:39 AM *To:* David Rowley *Cc:* Alex Fan ; pgsql-hack...@postgresql.org < pgsql-hack...@postgresql.org>; and...@anarazel.de ; geidav...@gmail.com ; l...@swarm64.com *Subject:* Re: [PATCH] Enable usi

Re: [PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2022-12-25 Thread Andres Freund
Hi, On 2022-11-23 21:13:04 +1100, Alex Fan wrote: > > @@ -241,6 +246,40 @@ llvm_mutable_module(LLVMJitContext *context) > > context->module = LLVMModuleCreateWithName("pg"); > > LLVMSetTarget(context->module, llvm_triple); > >

Re: [PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2022-12-14 Thread Thomas Munro
On Thu, Nov 24, 2022 at 12:08 AM David Rowley wrote: > On Wed, 23 Nov 2022 at 23:13, Alex Fan wrote: > > I am new to the postgres community and apologise for resending this as the > > previous one didn't include patch properly and didn't cc reviewers (maybe > > the reason it has been buried in

Re: [PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2022-11-23 Thread David Rowley
On Wed, 23 Nov 2022 at 23:13, Alex Fan wrote: > I am new to the postgres community and apologise for resending this as the > previous one didn't include patch properly and didn't cc reviewers (maybe the > reason it has been buried in mailing list for months) Welcome to the community! I've not

Re: [PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2022-11-23 Thread Alex Fan
jectLinkingLayer(LLVMOrcExecutionSessionRef ES) > +{ > + assert(ES && "ES must not be null"); > + auto ObjLinkingLayer = new > llvm::orc::ObjectLinkingLayer(*unwrap(ES)); > + > > ObjLinkingLayer->addPlugin(std::make_unique( > + *unw

[PATCH] Enable using llvm jitlink as an alternative llvm jit linker of old Rtdyld.

2022-08-29 Thread Alex Fan
This brings the bonus of support jitting on riscv64 (included in this patch) and other platforms Rtdyld doesn't support, e.g. windows COFF. Currently, llvm doesn't expose jitlink (ObjectLinkingLayer) via C API, so a wrapper is added. This also adds minor llvm 15 compat fix that is needed ---