Repository navigation
rustc 1.100 #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
+187
−398
Open
rustc 1.100 #664
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e3a757e
update to nightly-2026-09-05, compiletest infra broken
Firestar99 72d0815
fix cargo warnings on inheriting workspace lints
Firestar99 5e57c5c
ignore or remove as many unused dependencies as possible
Firestar99 6b27eb4
allow `cargo::unused_dependencies` lint due to `rustc_codegen_spirv` …
Firestar99 812439c
fix compiletest infra
Firestar99 3faa988
update to nightly-2026-09-25
Firestar99 8cc47ed
fix clippy
Firestar99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,13 +23,13 @@ use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; | |
| use rustc_codegen_ssa::mir::place::PlaceRef; | ||
| use rustc_codegen_ssa::traits::{ | ||
| BackendTypes, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods, | ||
| LayoutTypeCodegenMethods, OverflowOp, | ||
| LayoutTypeCodegenMethods, OverflowOp, ReturnSlot, | ||
| }; | ||
| use rustc_middle::bug; | ||
| use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs; | ||
| use rustc_middle::ty::layout::TyAndLayout; | ||
| use rustc_middle::ty::{self, AtomicOrdering, Ty}; | ||
| use rustc_span::Span; | ||
| use rustc_span::bug; | ||
| use rustc_target::callconv::FnAbi; | ||
| use smallvec::SmallVec; | ||
| use std::iter::{self, empty}; | ||
|
|
@@ -1560,18 +1560,28 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
|
|
||
| fn invoke( | ||
| &mut self, | ||
| llty: Self::Type, | ||
| llty: Self::FunctionSignature, | ||
| fn_attrs: Option<&CodegenFnAttrs>, | ||
| fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, | ||
| llfn: Self::Value, | ||
| return_slot: ReturnSlot<Self::Value>, | ||
| args: &[Self::Value], | ||
| then: Self::BasicBlock, | ||
| _catch: Self::BasicBlock, | ||
| funclet: Option<&Self::Funclet>, | ||
| instance: Option<ty::Instance<'tcx>>, | ||
| ) -> Self::Value { | ||
| // Exceptions don't exist, jump directly to then block | ||
| let result = self.call(llty, fn_attrs, fn_abi, llfn, args, funclet, instance); | ||
| let result = self.call( | ||
| llty, | ||
| fn_attrs, | ||
| fn_abi, | ||
| llfn, | ||
| return_slot, | ||
| args, | ||
| funclet, | ||
| instance, | ||
| ); | ||
| self.emit().branch(then.id).unwrap(); | ||
| result | ||
| } | ||
|
|
@@ -1886,6 +1896,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
| ty: Self::Type, | ||
| ptr: Self::Value, | ||
| order: AtomicOrdering, | ||
| _volatile: bool, | ||
| _size: Size, | ||
| ) -> Self::Value { | ||
| let (ptr, access_ty) = self.adjust_pointer_for_typed_access(ptr, ty); | ||
|
|
@@ -2025,6 +2036,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
| val: Self::Value, | ||
| ptr: Self::Value, | ||
| order: AtomicOrdering, | ||
| _volatile: bool, | ||
| _size: Size, | ||
| ) { | ||
| let (ptr, access_ty) = self.adjust_pointer_for_typed_access(ptr, val.ty); | ||
|
|
@@ -2069,14 +2081,14 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
|
|
||
| self.maybe_inbounds_gep(ty, ptr, indices, true) | ||
| } | ||
|
|
||
| // intcast has the logic for dealing with bools, so use that | ||
| fn trunc(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value { | ||
| self.intcast(val, dest_ty, false) | ||
| } | ||
| fn sext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value { | ||
| self.intcast(val, dest_ty, true) | ||
| } | ||
|
|
||
| fn fptoui_sat(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value { | ||
| self.fptoint_sat(false, val, dest_ty) | ||
| } | ||
|
|
@@ -3297,14 +3309,15 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
|
|
||
| #[tracing::instrument( | ||
| level = "debug", | ||
| skip(self, callee_ty, _fn_attrs, fn_abi, callee, args, funclet) | ||
| skip(self, callee_ty, _fn_attrs, fn_abi, fn_val, args, funclet) | ||
| )] | ||
| fn call( | ||
| &mut self, | ||
| callee_ty: Self::Type, | ||
| _fn_attrs: Option<&CodegenFnAttrs>, | ||
| fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, | ||
| callee: Self::Value, | ||
| fn_val: Self::Value, | ||
| _return_slot: ReturnSlot<Self::Value>, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't ignore this, and instead assert that it is |
||
| args: &[Self::Value], | ||
| funclet: Option<&Self::Funclet>, | ||
| instance: Option<ty::Instance<'tcx>>, | ||
|
|
@@ -3316,7 +3329,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
| // NOTE(eddyb) see the comment on `SpirvValueKind::FnAddr`, this should | ||
| // be fixed upstream, so we never see any "function pointer" values being | ||
| // created just to perform direct calls. | ||
| let (callee_val, result_type, argument_types) = match self.lookup_type(callee.ty) { | ||
| let (callee_val, result_type, argument_types) = match self.lookup_type(fn_val.ty) { | ||
| SpirvType::Pointer { pointee } => { | ||
| let (pointee_is_function, result_type, argument_types) = match self | ||
| .lookup_type(pointee) | ||
|
|
@@ -3353,15 +3366,15 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
| } | ||
| }; | ||
|
|
||
| let callee_val = if let SpirvValueKind::FnAddr { function } = callee.kind { | ||
| let callee_val = if let SpirvValueKind::FnAddr { function } = fn_val.kind { | ||
| if pointee_is_function { | ||
| assert_ty_eq!(self, callee_ty, pointee); | ||
| } | ||
| function | ||
| } | ||
| // Truly indirect call. | ||
| else { | ||
| let fn_ptr_val = callee.def(self); | ||
| let fn_ptr_val = fn_val.def(self); | ||
| self.zombie(fn_ptr_val, "indirect calls are not supported in SPIR-V"); | ||
| fn_ptr_val | ||
| }; | ||
|
|
@@ -3371,7 +3384,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
|
|
||
| _ => bug!( | ||
| "call expected `fn` pointer type, got `{}`", | ||
| self.debug_type(callee.ty) | ||
| self.debug_type(fn_val.ty) | ||
| ), | ||
| }; | ||
|
|
||
|
|
@@ -3481,6 +3494,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { | |
| _fn_attrs: Option<&CodegenFnAttrs>, | ||
| _fn_abi: &FnAbi<'tcx, Ty<'tcx>>, | ||
| _llfn: Self::Value, | ||
| _return_slot: ReturnSlot<Self::Value>, | ||
| _args: &[Self::Value], | ||
| _funclet: Option<&Self::Funclet>, | ||
| _instance: Option<ty::Instance<'tcx>>, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this cause a regression in build times? I don't remember the exact combination of build commands that would cause a rebuild without this, wish I had automated it.