Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2ca628e
loongarch: Add portable intrinsics::simd implementations for VAVG/VAV…
tangaac Jul 22, 2026
fcf4562
neon: drop the align requirement on vld1/vst1 lane loads and stores
valentynkit Aug 20, 2026
e9bc995
neon: drop the align requirement on vld1 dup loads
valentynkit Aug 20, 2026
2b05940
neon: assert ldr for the f32 lane and dup loads on arm
valentynkit Aug 20, 2026
98f513b
Add missing avx512vl intrinsics for f32->u32 conversions
Shnatsel Jul 26, 2026
773242f
Add manual exception for the intrinsics forgotten in the intel intrin…
Shnatsel Aug 23, 2026
d78d206
Use the proper tracking issue
Shnatsel Aug 23, 2026
9f02c53
cargo fmt
Shnatsel Aug 23, 2026
17c4c4f
Merge pull request #2197 from Shnatsel/missing-avx512vl-conversions
folkertdev Aug 23, 2026
f9fe5c5
Merge branch 'rust-lang:main' into loongarch-simd-vavg
tangaac Aug 24, 2026
2e36890
Prepare for merging from rust-lang/rust
invalid-email-address Aug 24, 2026
8d4eacf
Merge ref 'da5114692c9e' from rust-lang/rust
invalid-email-address Aug 24, 2026
7bd952b
Merge pull request #2203 from rust-lang/rustc-pull
adamgemmell Aug 24, 2026
8360819
Merge pull request #2195 from tangaac/loongarch-simd-vavg
adamgemmell Aug 24, 2026
2cc2b57
Prepare for merging from rust-lang/rust
invalid-email-address Sep 7, 2026
a3ff62c
Merge ref '32d94cc9be3f' from rust-lang/rust
invalid-email-address Sep 7, 2026
0016f59
Run rustfmt
adamgemmell Sep 7, 2026
7cbced2
Update vzipq arm instruction assertions
adamgemmell Sep 8, 2026
ab89d47
Merge pull request #2215 from rust-lang/rustc-pull
folkertdev Sep 8, 2026
0c4077d
Run cargo fmt on JOSH syncs
adamgemmell Sep 8, 2026
dd13995
Revert "Use SIMD intrinsics for vector shifts"
RalfJung Sep 5, 2026
39333b9
de-constify methods that depended on the vector shift ones
RalfJung Sep 5, 2026
aa62feb
fmt
RalfJung Sep 5, 2026
cfc12ac
Fix "explicit `package.readme` can be inferred"
adamgemmell Sep 9, 2026
89e9fe1
Fix "`package.homepage` is redundant with `package.repository`"
adamgemmell Sep 9, 2026
dce8dd2
Fix "unused dependency"
adamgemmell Sep 9, 2026
a5b1c3c
Merge pull request #2217 from RalfJung/vector-shift-codegen
adamgemmell Sep 9, 2026
aa1e431
Merge pull request #2220 from adamgemmell/dev/adagem01/josh-sync-fmt
folkertdev Sep 13, 2026
d3d4a64
only run `f16` tests when `target_has_reliable_f16`
folkertdev Sep 13, 2026
655ec5a
Merge pull request #2222 from adamgemmell/dev/adagem01/cargo-lints
folkertdev Sep 13, 2026
5bf69a2
Enable triagebot relabelling
clarfonthey Sep 13, 2026
dbac732
Merge pull request #2214 from valentynkit/vld1-lane-unaligned
Amanieu Sep 14, 2026
6c68a59
Merge pull request #2224 from folkertdev/win-gnu-no-f16
adamgemmell Sep 14, 2026
c18068c
Merge pull request #2223 from clarfonthey/triagebot
folkertdev Sep 14, 2026
8b69149
Use clap to parse arguments in `stdarch-gen-hexagon`
Kobzol Sep 14, 2026
d405672
Automatically reformat all generated files with a unified rustfmt config
Kobzol Sep 14, 2026
d0f6897
Use rustfmt formatting in stdarch-gen-loongarch
Kobzol Sep 14, 2026
2b0ee0b
Use unified rustfmt formatting in stdarch-gen-arm
Kobzol Sep 14, 2026
34bda05
Show diff when generated files do not match expectations
xonx4l Sep 14, 2026
988cc4b
Bless arm output
Kobzol Sep 14, 2026
1bda26e
Fix tests
Kobzol Sep 14, 2026
1d6ecb3
Install rustfmt on CI
Kobzol Sep 14, 2026
e358d1f
Merge pull request #2225 from Kobzol/gen-refactor-rustfmt
folkertdev Sep 14, 2026
4ff0ef6
intrinsic-test: Fix intrinsic test names for negative immediate values
heiher Sep 14, 2026
5a01034
intrinsic-test: Add C intrinsic name prefix support
heiher Sep 14, 2026
bb2b679
intrinsic-test: Support testing LoongArch64 SIMD intrinsics
heiher Sep 14, 2026
41bc79c
Merge pull request #2226 from heiher/loong64-intrinsic-test
folkertdev Sep 17, 2026
a998f8a
improve simd bitshift tests
folkertdev Sep 17, 2026
fcddd10
s390x: use funnel shift
folkertdev Sep 20, 2026
3da3866
s390x: use u128 arithmetic
folkertdev Sep 20, 2026
acc7501
gca: fix unreachable
khyperia Sep 21, 2026
fc49efd
Prepare for merging from rust-lang/rust
Kobzol Sep 21, 2026
20cdf9f
Merge ref '220b36c420c4' from rust-lang/rust
Kobzol Sep 21, 2026
dabd0d2
Merge pull request #2230 from folkertdev/s390x-llvm-fixmes
adamgemmell Sep 21, 2026
3ca6e6c
fix `test_mm_srav_epi64` shift direction
folkertdev Sep 23, 2026
75dd3ee
Merge pull request #2228 from folkertdev/better-simd-bitshift-tests
davidtwco Sep 23, 2026
4282aee
Merge pull request #2231 from Kobzol/sync
folkertdev Sep 23, 2026
603ca3f
Add regression tests for await macro suggestions
chenyukang Sep 24, 2026
3ea2995
Fix incorrect use of await in parser suggestion
chenyukang Sep 24, 2026
f8f1dc2
Enable EII tests for cg_gcc
AsakuraMizu Sep 23, 2026
5ed0180
Build a new incr comp session dir from scratch every time
bjorn3 Jul 8, 2026
ce2779d
Remove windows-targets dependency from the root workspace
bjorn3 Apr 17, 2026
0429bca
Rollup merge of #163218 - folkertdev:stdarch-sync-2026-09-23, r=folke…
JonathanBrouwer Sep 24, 2026
3366a8e
Rollup merge of #159287 - bjorn3:incr_comp_session_from_scratch, r=nn…
JonathanBrouwer Sep 24, 2026
1347d2d
Rollup merge of #163222 - AsakuraMizu:eii-gcc, r=BoxyUwU,GuillaumeGomez
JonathanBrouwer Sep 24, 2026
be4bbc5
Rollup merge of #163252 - bjorn3:reduce_windows_targets_deps, r=Mark-…
JonathanBrouwer Sep 24, 2026
631f504
Rollup merge of #162937 - khyperia:gca-fix-unreachable, r=BoxyUwU
JonathanBrouwer Sep 24, 2026
bf6e5bc
Rollup merge of #163238 - chenyukang:yukang-fix-await-macro-suggestio…
JonathanBrouwer Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 45 additions & 117 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion compiler/rustc_codegen_cranelift/src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ fn emit_module(
bytecode: None,
assembly: None,
llvm_ir: None,
links_from_incr_cache: Vec::new(),
})
}

Expand Down
36 changes: 21 additions & 15 deletions compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,23 +463,29 @@ fn thin_lto(

info!("thin LTO data created");

let (key_map_path, prev_key_map, curr_key_map) = if let Some(ref incr_comp_session_dir) =
cgcx.incr_comp_session_dir
let new_key_map_path = cgcx
.new_incr_comp_session_dir
.as_ref()
.map(|dir| dir.join(THIN_LTO_KEYS_INCR_COMP_FILE_NAME));

let prev_key_map = if let Some(ref old_incr_comp_session_dir) =
cgcx.old_incr_comp_session_dir
{
let path = incr_comp_session_dir.join(THIN_LTO_KEYS_INCR_COMP_FILE_NAME);
let old_path = old_incr_comp_session_dir.join(THIN_LTO_KEYS_INCR_COMP_FILE_NAME);

// If the previous file was deleted, or we get an IO error
// reading the file, then we'll just use `None` as the
// prev_key_map, which will force the code to be recompiled.
let prev =
if path.exists() { ThinLTOKeysMap::load_from_file(&path).ok() } else { None };
let curr = ThinLTOKeysMap::from_thin_lto_modules(&data, &thin_modules, &module_names);
(Some(path), prev, curr)
if old_path.exists() { ThinLTOKeysMap::load_from_file(&old_path).ok() } else { None }
} else {
assert!(green_modules.is_empty());
None
};
let curr_key_map = if cgcx.new_incr_comp_session_dir.is_some() {
ThinLTOKeysMap::from_thin_lto_modules(&data, &thin_modules, &module_names)
} else {
// If we don't compile incrementally, we don't need to load the
// import data from LLVM.
assert!(green_modules.is_empty());
let curr = ThinLTOKeysMap::default();
(None, None, curr)
ThinLTOKeysMap::default()
};
info!("thin LTO cache key map loaded");
info!("prev_key_map: {:#?}", prev_key_map);
Expand All @@ -500,15 +506,15 @@ fn thin_lto(
if let (Some(prev_key_map), true) =
(prev_key_map.as_ref(), green_modules.contains_key(module_name))
{
assert!(cgcx.incr_comp_session_dir.is_some());
assert!(cgcx.old_incr_comp_session_dir.is_some());
assert!(cgcx.new_incr_comp_session_dir.is_some());

// If a module exists in both the current and the previous session,
// and has the same LTO cache key in both sessions, then we can re-use it
if prev_key_map.keys.get(module_name) == curr_key_map.keys.get(module_name) {
let work_product = green_modules[module_name].clone();
copy_jobs.push(work_product);
info!(" - {}: re-used", module_name);
assert!(cgcx.incr_comp_session_dir.is_some());
continue;
}
}
Expand All @@ -518,8 +524,8 @@ fn thin_lto(
}

// Save the current ThinLTO import information for the next compilation
// session, overwriting the previous serialized data (if any).
if let Some(path) = key_map_path
// session.
if let Some(path) = new_key_map_path
&& let Err(err) = curr_key_map.save_to_file(&path)
{
write::llvm_err(dcx, LlvmError::WriteThinLtoKey { err });
Expand Down
50 changes: 34 additions & 16 deletions compiler/rustc_codegen_ssa/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ use rustc_errors::{
Level, MultiSpan, Style, Sublevel, Suggestions, catch_fatal_errors,
};
use rustc_fs_util::link_or_copy;
use rustc_incremental::{copy_cgu_workproduct_to_incr_comp_cache_dir, in_incr_comp_dir_sess};
use rustc_incremental::{
copy_cgu_workproduct_to_incr_comp_cache_dir, in_incr_comp_dir_sess, in_old_incr_comp_dir_sess,
};
use rustc_macros::{Decodable, Encodable};
use rustc_metadata::fs::copy_to_stdout;
use rustc_middle::dep_graph::{WorkProduct, WorkProductMap};
Expand Down Expand Up @@ -351,9 +353,12 @@ pub struct CodegenContext {
/// Directory into which should the LLVM optimization remarks be written.
/// If `None`, they will be written to stderr.
pub remark_dir: Option<PathBuf>,
/// The previous incremental compilation session directory, or None if we
/// are not compiling incrementally or there is no previous session.
pub old_incr_comp_session_dir: Option<PathBuf>,
/// The incremental compilation session directory, or None if we are not
/// compiling incrementally
pub incr_comp_session_dir: Option<PathBuf>,
pub new_incr_comp_session_dir: Option<PathBuf>,
/// `Some(limit)` if the codegen should be run in parallel.
///
/// Depends on [`WriteBackendMethods::supports_parallel()`] and `--jobs-backend`.
Expand Down Expand Up @@ -497,7 +502,6 @@ fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
incr_comp_session.unwrap(),
&module.name,
files.as_slice(),
&module.links_from_incr_cache,
);
work_products.insert(id, product);
}
Expand Down Expand Up @@ -839,7 +843,7 @@ fn execute_optimize_work_item<B: WriteBackendMethods>(
// save our module to disk first.
let bitcode = if cgcx.module_config.emit_pre_lto_bc {
let filename = pre_lto_bitcode_filename(&module.name);
cgcx.incr_comp_session_dir.as_ref().map(|path| path.join(&filename))
cgcx.new_incr_comp_session_dir.as_ref().map(|path| path.join(&filename))
} else {
None
};
Expand Down Expand Up @@ -886,11 +890,9 @@ fn execute_copy_from_cache_work_item(
let dcx = DiagCtxt::new(Box::new(shared_emitter));
let dcx = dcx.handle();

let incr_comp_session_dir = cgcx.incr_comp_session_dir.as_ref().unwrap();

let mut links_from_incr_cache = Vec::new();
let incr_comp_session_dir = cgcx.old_incr_comp_session_dir.as_ref().unwrap();

let mut load_from_incr_comp_dir = |output_path: PathBuf, saved_path: &str| {
let load_from_incr_comp_dir = |output_path: PathBuf, saved_path: &str| {
let source_file_in_incr_comp_dir = incr_comp_session_dir.join(saved_path);
debug!(
"copying preexisting module `{}` from {:?} to {}",
Expand All @@ -899,10 +901,7 @@ fn execute_copy_from_cache_work_item(
output_path.display()
);
match link_or_copy(&source_file_in_incr_comp_dir, &output_path) {
Ok(_) => {
links_from_incr_cache.push(source_file_in_incr_comp_dir);
Some(output_path)
}
Ok(_) => Some(output_path),
Err(error) => {
dcx.emit_err(diagnostics::CopyPathBuf {
source_file: source_file_in_incr_comp_dir,
Expand All @@ -925,7 +924,7 @@ fn execute_copy_from_cache_work_item(
load_from_incr_comp_dir(dwarf_obj_out, saved_dwarf_object_file)
});

let mut load_from_incr_cache = |perform, output_type: OutputType| {
let load_from_incr_cache = |perform, output_type: OutputType| {
if perform {
let saved_file = module.source.saved_files.get(output_type.extension())?;
let output_path = cgcx.output_filenames.temp_path_for_cgu(output_type, &module.name);
Expand Down Expand Up @@ -953,7 +952,6 @@ fn execute_copy_from_cache_work_item(
}

CompiledModule {
links_from_incr_cache,
kind: ModuleKind::Regular,
name: module.name,
object,
Expand Down Expand Up @@ -1293,10 +1291,15 @@ fn start_executing_work<B: WriteBackendMethods>(
time_trace: sess.opts.unstable_opts.llvm_time_trace,
remark: sess.opts.cg.remark.clone(),
remark_dir,
incr_comp_session_dir: tcx
old_incr_comp_session_dir: tcx
.incr_comp_session
.as_ref()
.and_then(|incr_comp_session| incr_comp_session.old_session_directory.as_deref())
.map(ToOwned::to_owned),
new_incr_comp_session_dir: tcx
.incr_comp_session
.as_ref()
.map(|incr_comp_session| (&*incr_comp_session.session_directory).to_owned()),
.map(|incr_comp_session| (&*incr_comp_session.new_session_directory).to_owned()),
output_filenames: Arc::clone(tcx.output_filenames(())),
module_config: regular_config,
opt_level,
Expand Down Expand Up @@ -2260,7 +2263,22 @@ pub(crate) fn submit_pre_lto_module_to_llvm<B: WriteBackendMethods>(
module: CachedModuleCodegen,
) {
let filename = pre_lto_bitcode_filename(&module.name);
let old_bitcode_path =
in_old_incr_comp_dir_sess(tcx.incr_comp_session.unwrap(), &filename).unwrap();
let bitcode_path = in_incr_comp_dir_sess(tcx.incr_comp_session.unwrap(), &filename);

match link_or_copy(&old_bitcode_path, &bitcode_path) {
Ok(_) => {}
Err(error) => {
tcx.sess.dcx().emit_err(diagnostics::CopyPathBuf {
source_file: old_bitcode_path,
output_path: bitcode_path,
error,
});
return;
}
}

// Schedule the module to be loaded
drop(
coordinator
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_codegen_ssa/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,10 @@ pub fn codegen_crate<
source: cgu.previous_work_product(tcx),
},
);
// This will unwind if there are errors, which triggers our `AbortCodegenOnDrop`
// guard. Unfortunately, just skipping the `submit_pre_lto_module_to_llvm` makes
// compilation hang on post-monomorphization errors.
tcx.dcx().abort_if_errors();
}
CguReuse::PostLto => {
submit_post_lto_module_to_llvm(
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ impl<M> ModuleCodegen<M> {
bytecode,
assembly,
llvm_ir,
links_from_incr_cache: Vec::new(),
}
}
}
Expand All @@ -129,7 +128,6 @@ pub struct CompiledModule {
pub bytecode: Option<PathBuf>,
pub assembly: Option<PathBuf>, // --emit=asm
pub llvm_ir: Option<PathBuf>, // --emit=llvm-ir, llvm-bc is in bytecode
pub links_from_incr_cache: Vec<PathBuf>,
}

impl CompiledModule {
Expand Down
22 changes: 0 additions & 22 deletions compiler/rustc_incremental/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,6 @@ pub(crate) struct DeleteLock<'a> {
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(
"hard linking files in the incremental compilation cache failed. copying files instead. consider moving the cache directory to a file system which supports hard linking in session dir `{$path}`"
)]
pub(crate) struct HardLinkFailed<'a> {
pub path: &'a Path,
}

#[derive(Diagnostic)]
#[diag("failed to delete partly initialized session dir `{$path}`: {$err}")]
pub(crate) struct DeletePartial<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag("did not finalize incremental compilation session directory `{$path}`: {$err}")]
#[help("the next build will not be able to reuse work from this compilation")]
Expand Down Expand Up @@ -266,13 +251,6 @@ pub(crate) struct CopyWorkProductToCache<'a> {
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag("file-system error deleting outdated file `{$path}`: {$err}")]
pub(crate) struct DeleteWorkProduct<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(
"corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant"
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_incremental/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// tidy-alphabetical-start
#![deny(missing_docs)]
#![feature(file_buffered)]
#![feature(try_blocks)]
// tidy-alphabetical-end

mod assert_dep_graph;
Expand All @@ -11,7 +12,7 @@ mod persist;

pub use persist::{
copy_cgu_workproduct_to_incr_comp_cache_dir, finalize_session_directory, in_incr_comp_dir_sess,
load_query_result_cache, save_work_product_index, setup_dep_graph,
in_old_incr_comp_dir_sess, load_query_result_cache, save_work_product_index, setup_dep_graph,
};
use rustc_middle::util::Providers;

Expand Down
Loading
Loading