Skip to content

Commit 45cfb21

Browse files
committed
Define parameter for uwtable LLVM attribute
This is now required by llvm15.
1 parent c3a43c4 commit 45cfb21

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/lisp/kernel/cleavir/translate.lisp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,11 +1884,14 @@
18841884
#+(or)(llvm-sys:set-calling-conv the-function 'llvm-sys:fastcc)
18851885
(llvm-sys:set-personality-fn the-function
18861886
(cmp:irc-personality-function))
1887-
(llvm-sys:add-fn-attr the-function 'llvm-sys:attribute-uwtable)
1887+
;; we'd like to be able to be interruptable at any time, so we
1888+
;; need async-safe unwinding tables basically everywhere.
1889+
;; (Although in code that ignores interrupts we could loosen this.)
1890+
(llvm-sys:add-fn-attr2string the-function "uwtable" "async")
18881891
(when (null (bir:returni function))
18891892
(llvm-sys:add-fn-attr the-function 'llvm-sys:attribute-no-return))
18901893
(unless (policy:policy-value (bir:policy function)
1891-
'perform-optimization)
1894+
'perform-optimization)
18921895
(llvm-sys:add-fn-attr the-function 'llvm-sys:attribute-no-inline)
18931896
(llvm-sys:add-fn-attr the-function 'llvm-sys:attribute-optimize-none))
18941897
(cmp:with-irbuilder (body-irbuilder)
@@ -1945,7 +1948,8 @@
19451948
:function xep-arity-function)
19461949
(llvm-sys:set-personality-fn xep-arity-function
19471950
(cmp:irc-personality-function))
1948-
(llvm-sys:add-fn-attr xep-arity-function 'llvm-sys:attribute-uwtable)
1951+
(llvm-sys:add-fn-attr2string xep-arity-function
1952+
"uwtable" "async")
19491953
(when (null (bir:returni function))
19501954
(llvm-sys:add-fn-attr xep-arity-function
19511955
'llvm-sys:attribute-no-return))

src/lisp/kernel/cmp/cmpir.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ Otherwise do a variable shift."
938938
(irc-make-vaslist new-nvals new-vals label)))
939939

940940
(defparameter *default-function-attributes*
941-
'(llvm-sys:attribute-uwtable ("frame-pointer" "all")))
941+
'(("uwtable" "async") ("frame-pointer" "all")))
942942

943943
(defun function-description-name (function)
944944
(let ((function-name (llvm-sys:get-name function)))

0 commit comments

Comments
 (0)