Skip to content

Commit 54f2881

Browse files
alexreinkingclaude
andauthored
Drop support for LLVM 20 (#8998)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 997fb66 commit 54f2881

29 files changed

Lines changed: 20 additions & 158 deletions

.github/workflows/pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
# TODO: detect this from repo somehow: https://github.com/halide/Halide/issues/8406
11-
LLVM_VERSION: 21.1.8
11+
LLVM_VERSION: 22.1.0
1212
FLATBUFFERS_VERSION: 23.5.26
1313
WABT_VERSION: 1.0.39
1414

.github/workflows/testing-arm-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
bits: [ "64", "32" ]
23-
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21", "ci-llvm-20" ]
23+
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21" ]
2424
include:
2525
- bits: 32
2626
arch: armv7l

.github/workflows/testing-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
bits: [ "32" ] # Intentionally not 64, as we haven't configured self-hosted runners for it yet.
23-
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21", "ci-llvm-20" ]
23+
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21" ]
2424
include:
2525
- bits: 32
2626
arch: i686

.github/workflows/testing-make.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Makefile
22

33
env:
4-
LLVM_VERSION: '21'
4+
LLVM_VERSION: '22'
55

66
on:
77
pull_request:

.github/workflows/testing-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
bits: [ "32" ] # Intentionally not 64, as we haven't configured self-hosted runners for it yet.
27-
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21", "ci-llvm-20" ]
27+
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21" ]
2828
include:
2929
- bits: 32
3030
arch: x86

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ option(THREADS_PREFER_PTHREAD_FLAG "When enabled, prefer to use the -pthread fla
199199
find_package(Threads REQUIRED)
200200

201201
## LLVM
202-
find_package(Halide_LLVM 20...99 REQUIRED # Use 99 to fake a minimum-only constraint
202+
find_package(Halide_LLVM 21...99 REQUIRED # Use 99 to fake a minimum-only constraint
203203
COMPONENTS WebAssembly X86
204204
OPTIONAL_COMPONENTS AArch64 ARM Hexagon NVPTX PowerPC RISCV)
205205

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ issue.
151151

152152
At any point in time, building Halide requires either the latest stable version
153153
of LLVM, the previous stable version of LLVM, or trunk. At the time of writing,
154-
this means versions 22, 21, and 20 are supported, but 19 is not.
154+
this means versions 23, 22, and 21 are supported, but 20 is not.
155155

156156
It is simplest to get a binary release of LLVM on macOS by using
157157
[Homebrew](https://brew.sh). Just run `brew install llvm`. On Debian flavors of

cmake/FindHalide_LLVM.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ foreach (
1717
"/usr/local/lib/llvm-@VERSION@" # Third-party packages
1818
"/opt/llvm-@VERSION@" # Third-party packages
1919
)
20-
foreach (VERSION RANGE 20 22) # inclusive!
20+
foreach (VERSION RANGE 21 23) # inclusive!
2121
string(CONFIGURE "${template}" path @ONLY)
2222
list(APPEND llvm_paths "${path}")
2323
endforeach ()
@@ -28,7 +28,7 @@ find_package(LLVM PATHS ${llvm_paths})
2828

2929
# Neither LLVM_VERSION nor LLVM_PACKAGE_VERSION work as find_package arguments
3030
# in git/development builds as they include a "git" suffix. This applies at
31-
# time of writing to versions 18-21, inclusive.
31+
# time of writing to versions 21-23, inclusive.
3232
if (LLVM_FOUND)
3333
set(Halide_LLVM_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
3434
endif ()

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ ci-base = [
9090
ci-llvm-main = [{ include-group = "ci-base" }, "halide-llvm~=23.0.0.dev0"]
9191
ci-llvm-22 = [{ include-group = "ci-base" }, "halide-llvm~=22.1.0"]
9292
ci-llvm-21 = [{ include-group = "ci-base" }, "halide-llvm~=21.1.0"]
93-
ci-llvm-20 = [{ include-group = "ci-base" }, "halide-llvm~=20.1.0"]
9493

9594
[project.urls]
9695
Homepage = "https://halide-lang.org"

src/CodeGen_Internal.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,6 @@ void get_target_options(const llvm::Module &module, llvm::TargetOptions &options
612612

613613
options = llvm::TargetOptions();
614614
options.AllowFPOpFusion = per_instruction_fast_math_flags ? llvm::FPOpFusion::Strict : llvm::FPOpFusion::Fast;
615-
#if LLVM_VERSION < 210
616-
options.UnsafeFPMath = !per_instruction_fast_math_flags;
617-
#endif
618615
#if LLVM_VERSION < 230
619616
options.NoInfsFPMath = !per_instruction_fast_math_flags;
620617
#endif
@@ -676,11 +673,7 @@ std::unique_ptr<llvm::TargetMachine> make_target_machine(const llvm::Module &mod
676673
std::string mattrs = get_modflag_string(module, "halide_mattrs");
677674

678675
auto *tm = llvm_target->createTargetMachine(
679-
#if LLVM_VERSION >= 210
680676
triple,
681-
#else
682-
triple.str(),
683-
#endif
684677
mcpu_target,
685678
mattrs,
686679
options,

0 commit comments

Comments
 (0)