Skip to content

Commit 7e0a6ff

Browse files
authored
Adapt NVVMReflect pass to LLVM.jl changes. (#411)
1 parent bec672c commit 7e0a6ff

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Manifest.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ version = "1.4.1"
3939

4040
[[LLVM]]
4141
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"]
42-
git-tree-sha1 = "1c614dfbecbaee4897b506bba2b432bf0d21f2ed"
42+
git-tree-sha1 = "ee3374fcbdcd90fb10b27f1d847af7ade3a3213b"
43+
repo-rev = "master"
44+
repo-url = "https://github.com/maleadt/LLVM.jl.git"
4345
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
44-
version = "4.17.0"
46+
version = "5.0.0"
4547

4648
[[LLVMExtra_jll]]
4749
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
1515

1616
[compat]
1717
ExprTools = "0.1"
18-
LLVM = "4.17"
18+
LLVM = "5"
1919
Scratch = "1"
2020
TimerOutputs = "0.5"
2121
julia = "1.6"

src/ptx.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ function nvvm_reflect!(fun::LLVM.Function)
436436
end
437437
isa(sym, LLVM.GlobalVariable) || error("Format of __nvvm__reflect function not recognized")
438438
sym_op = operands(sym)[1]
439-
isa(sym_op, LLVM.ConstantArray) || error("Format of __nvvm__reflect function not recognized")
439+
isa(sym_op, LLVM.ConstantArray) || isa(sym_op, LLVM.ConstantDataArray) ||
440+
error("Format of __nvvm__reflect function not recognized")
440441
chars = convert.(Ref(UInt8), collect(sym_op))
441442
reflect_arg = String(chars[1:end-1])
442443

0 commit comments

Comments
 (0)