| From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: jit: Stop emitting lifetime.end for LLVM 22. |
| Date: | 2026-04-02 03:07:34 |
| Message-ID: | E1w88P8-002Y3N-0H@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
jit: Stop emitting lifetime.end for LLVM 22.
The lifetime.end intrinsic can now only be used for stack memory
allocated with alloca[1][2][3]. We use it to tell LLVM about the
lifetime of function arguments/isnull values that we keep in palloc'd
memory, so that it can avoid spilling registers to memory.
We might need to rearrange things and put them on the stack, but that'll
take some research. In the meantime, unbreak the build on LLVM 22.
[1] https://github.com/llvm/llvm-project/pull/149310
[2] https://llvm.org/docs/LangRef.html#llvm-lifetime-end-intrinsic
[3] https://llvm.org/docs/LangRef.html#i-alloca
Backpatch-through: 14
Reviewed-by: Matheus Alcantara <matheusssilv97(at)gmail(dot)com> (earlier attempt)
Reviewed-by: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> (earlier attempt)
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de> (earlier attempt)
Discussion: https://postgr.es/m/CA%2BhUKGJTumad75o8Zao-LFseEbt%3DenbUFCM7LZVV%3Dc8yg2i7dg%40mail.gmail.com
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/78cea19bf7daa16e8fff4d1bb69a349fcc1421f3
Modified Files
--------------
src/backend/jit/llvm/llvmjit_expr.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2026-04-02 03:07:50 | pgsql: jit: Stop emitting lifetime.end for LLVM 22. |
| Previous Message | Thomas Munro | 2026-04-02 03:06:18 | pgsql: jit: Stop emitting lifetime.end for LLVM 22. |