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 a06aaa4

Browse files
committedFeb 11, 2023
Update the minimum external LLVM to 14
1 parent 2773383 commit a06aaa4

Some content is hidden

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

42 files changed

+54
-205
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

‎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 {

0 commit comments

Comments
 (0)
Please sign in to comment.