Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Josh Stone
1f4ab77911 Merge branch 'rawhide' into f37 2023-11-16 16:38:16 -08:00
Josh Stone
da4ec08f74 Loosen the search for older libclang_rt.profile 2023-10-05 16:02:32 -07:00
Josh Stone
e306c2b0d1 Merge branch 'rawhide' into f37 2023-10-05 15:18:29 -07:00
Josh Stone
ae245b1852 Merge branch 'rawhide' into f37 2023-09-19 11:14:04 -07:00
Josh Stone
27b7401a74 Revert a MIR inlining change for ppc64le 2023-08-31 16:57:59 -07:00
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,41 @@
From 816745286555b978e8b0fe05d3bc99d28218587b Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 31 Aug 2023 13:37:23 -0700
Subject: [PATCH] Revert "Ignore the always part of #[inline(always)] in MIR
inlining"
This reverts part of commit c153f3a356b0e7917c91d3a804b93fadffb778b0.
On Fedora 37 with LLVM 15, we were seeing strange errors from the stage2
rustc on ppc64le, which seemed to imply bad codegen in rustc itself. Git
bisect pointed to this MIR inlining change -- it's not likely the root
cause, since later Fedora with LLVM 16 is working, but this will unblock
us for now.
---
compiler/rustc_mir_transform/src/inline.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs
index fc9e18378d5a..800155922b28 100644
--- a/compiler/rustc_mir_transform/src/inline.rs
+++ b/compiler/rustc_mir_transform/src/inline.rs
@@ -499,12 +499,11 @@ fn check_mir_body(
}
}
- // N.B. We still apply our cost threshold to #[inline(always)] functions.
- // That attribute is often applied to very large functions that exceed LLVM's (very
- // generous) inlining threshold. Such functions are very poor MIR inlining candidates.
- // Always inlining #[inline(always)] functions in MIR, on net, slows down the compiler.
let cost = checker.cost;
- if cost <= threshold {
+ if let InlineAttr::Always = callee_attrs.inline {
+ debug!("INLINING {:?} because inline(always) [cost={}]", callsite, cost);
+ Ok(())
+ } else if cost <= threshold {
debug!("INLINING {:?} [cost={} <= threshold={}]", callsite, cost, threshold);
Ok(())
} else {
--
2.41.0

View file

@ -118,6 +118,9 @@ Patch3: 0001-Let-environment-variables-override-some-default-CPUs.patch
Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch
Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
# Revert a MIR inlining change that broke ppc64le with LLVM 15.
Patch6: 0001-Revert-Ignore-the-always-part-of-inline-always-in-MI.patch
### RHEL-specific patches below ###
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
@ -558,6 +561,7 @@ rm -rf %{wasi_libc_dir}/dlmalloc/
%if %without bundled_wasi_libc
%patch -P5 -p1
%endif
%patch -P6 -p1
%if %with disabled_libssh2
%patch -P100 -p1