Commit d23fb4d
committed
jit: API changes for LLVM 22.
The lifetime.end intrinsic can now only be used for stack memory
allocated with alloca. We were using it to tell the optimizer that we
are no longer interested in the arguments and null flag in a
FunctionCallInfo struct, so it could avoid actually storing them if it
managed to inline the function and keep everything in registers. It
can't figure that out by itself because it's part of the ExecEvalStep
struct and we scribble on it directly rather than building a new one on
the stack.
Instead, store the special poison value (undef would work too). This
is a no-op, but tells the optimizer that we are not interested in the
values.
XXX Verify inlined results!
Deform functions use LLVMBuildAlloca() for a stack variable, but that
memory is reclaimed implicitly by the ret instruction.
llvm/llvm-project#149310
https://llvm.org/docs/LangRef.html#llvm-lifetime-end-intrinsic
https://llvm.org/docs/LangRef.html#i-alloca1 parent 75e82b2 commit d23fb4d
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
3007 | 3009 | | |
3008 | 3010 | | |
3009 | 3011 | | |
3010 | | - | |
3011 | 3012 | | |
3012 | 3013 | | |
3013 | 3014 | | |
3014 | 3015 | | |
3015 | 3016 | | |
3016 | | - | |
3017 | | - | |
3018 | 3017 | | |
3019 | 3018 | | |
3020 | 3019 | | |
| |||
3030 | 3029 | | |
3031 | 3030 | | |
3032 | 3031 | | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
3033 | 3041 | | |
3034 | 3042 | | |
3035 | 3043 | | |
3036 | 3044 | | |
3037 | 3045 | | |
| 3046 | + | |
3038 | 3047 | | |
3039 | 3048 | | |
3040 | 3049 | | |
| |||
3046 | 3055 | | |
3047 | 3056 | | |
3048 | 3057 | | |
| 3058 | + | |
3049 | 3059 | | |
3050 | 3060 | | |
3051 | 3061 | | |
| |||
3083 | 3093 | | |
3084 | 3094 | | |
3085 | 3095 | | |
| 3096 | + | |
3086 | 3097 | | |
3087 | 3098 | | |
3088 | 3099 | | |
| |||
3112 | 3123 | | |
3113 | 3124 | | |
3114 | 3125 | | |
| 3126 | + | |
0 commit comments