Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a1ba861

Browse files
authoredFeb 14, 2023
Rollup merge of #107573 - cuviper:drop-llvm-13, r=nagisa
Update the minimum external LLVM to 14 With this change, we'll have stable support for LLVM 14 through 16 (pending release). For reference, the previous increase to LLVM 13 was #100460.
2 parents 9bb6e60 + ffdbd58 commit a1ba861

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+58
-218
lines changed
 

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
tidy: true
5555
os: ubuntu-20.04-xl
5656
env: {}
57-
- name: x86_64-gnu-llvm-13
57+
- name: x86_64-gnu-llvm-14
5858
tidy: false
5959
os: ubuntu-20.04-xl
6060
env: {}
@@ -300,11 +300,7 @@ jobs:
300300
env:
301301
RUST_BACKTRACE: 1
302302
os: ubuntu-20.04-xl
303-
- name: x86_64-gnu-llvm-13
304-
env:
305-
RUST_BACKTRACE: 1
306-
os: ubuntu-20.04-xl
307-
- name: x86_64-gnu-llvm-13-stage1
303+
- name: x86_64-gnu-llvm-14-stage1
308304
env:
309305
RUST_BACKTRACE: 1
310306
os: ubuntu-20.04-xl

‎Cargo.lock‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,9 @@ dependencies = [
874874

875875
[[package]]
876876
name = "compiler_builtins"
877-
version = "0.1.85"
877+
version = "0.1.87"
878878
source = "registry+https://github.com/rust-lang/crates.io-index"
879-
checksum = "13e81c6cd7ab79f51a0c927d22858d61ad12bd0b3865f0b13ece02a4486aeabb"
879+
checksum = "f867ce54c09855ccd135ad4a50c777182a0c7af5ff20a8f537617bd648b10d50"
880880
dependencies = [
881881
"cc",
882882
"rustc-std-workspace-core",

‎compiler/rustc_codegen_llvm/src/consts.rs‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use crate::common::{self, CodegenCx};
33
use crate::debuginfo;
44
use crate::errors::{InvalidMinimumAlignment, SymbolAlreadyDefined};
55
use crate::llvm::{self, True};
6-
use crate::llvm_util;
76
use crate::type_::Type;
87
use crate::type_of::LayoutLlvmExt;
98
use crate::value::Value;
@@ -56,13 +55,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
5655
// to avoid the cost of generating large complex const expressions.
5756
// For example, `[(u32, u8); 1024 * 1024]` contains uninit padding in each element,
5857
// and would result in `{ [5 x i8] zeroinitializer, [3 x i8] undef, ...repeat 1M times... }`.
59-
let max = if llvm_util::get_version() < (14, 0, 0) {
60-
// Generating partially-uninit consts inhibits optimizations in LLVM < 14.
61-
// See https://github.com/rust-lang/rust/issues/84565.
62-
1
63-
} else {
64-
cx.sess().opts.unstable_opts.uninit_const_chunk_threshold
65-
};
58+
let max = cx.sess().opts.unstable_opts.uninit_const_chunk_threshold;
6659
let allow_uninit_chunks = chunks.clone().take(max.saturating_add(1)).count() <= max;
6760

6861
if allow_uninit_chunks {

‎compiler/rustc_codegen_llvm/src/context.rs‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,6 @@ pub unsafe fn create_module<'ll>(
143143

144144
let mut target_data_layout = sess.target.data_layout.to_string();
145145
let llvm_version = llvm_util::get_version();
146-
if llvm_version < (14, 0, 0) {
147-
if sess.target.llvm_target == "i686-pc-windows-msvc"
148-
|| sess.target.llvm_target == "i586-pc-windows-msvc"
149-
{
150-
target_data_layout =
151-
"e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
152-
.to_string();
153-
} else if sess.target.arch == "wasm32" {
154-
target_data_layout = target_data_layout.replace("-p10:8:8-p20:8:8", "");
155-
}
156-
}
157146
if llvm_version < (16, 0, 0) {
158147
if sess.target.arch == "s390x" {
159148
target_data_layout = target_data_layout.replace("-v128:64", "");

0 commit comments

Comments
 (0)
Please sign in to comment.