about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-18 12:53:09 +0000
committerbors <bors@rust-lang.org>2023-02-18 12:53:09 +0000
commit3eb5c4581a386b13c414e8c8bd73846ef37236d1 (patch)
tree5f3a983c91d8db87950f03bf08adbdc4050cd720 /compiler/rustc_codegen_llvm/src
parent3701bdc6333145410f009c83bd03f424eca05009 (diff)
parent6c91efd6d7806082f646d22eb3fd6736df82f9be (diff)
downloadrust-3eb5c4581a386b13c414e8c8bd73846ef37236d1.tar.gz
rust-3eb5c4581a386b13c414e8c8bd73846ef37236d1.zip
Auto merge of #108211 - matthiaskrgr:rollup-e59onmm, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #108031 (Don't recover lifetimes/labels containing emojis as character literals)
 - #108046 (Don't allow evaluating queries that were fed in a previous compiler run)
 - #108162 (Don't eagerly convert principal to string)
 - #108186 (Deny non-lifetime bound vars in `for<..> ||` closure binders)
 - #108197 (Update cargo)
 - #108205 (link to llvm changes that prompted the special cases)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index 8848ea3bb9a..37ee0e14020 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -145,8 +145,13 @@ pub unsafe fn create_module<'ll>(
     let llvm_version = llvm_util::get_version();
     if llvm_version < (16, 0, 0) {
         if sess.target.arch == "s390x" {
+            // LLVM 16 data layout changed to always set 64-bit vector alignment,
+            // which is conditional in earlier LLVM versions.
+            // https://reviews.llvm.org/D131158 for the discussion.
             target_data_layout = target_data_layout.replace("-v128:64", "");
         } else if sess.target.arch == "riscv64" {
+            // LLVM 16 introduced this change so as to produce more efficient code.
+            // See https://reviews.llvm.org/D116735 for the discussion.
             target_data_layout = target_data_layout.replace("-n32:64-", "-n64-");
         }
     }