Skip to content
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

Rollup of 8 pull requests #121011

Closed
wants to merge 28 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
656a388
Add `A: 'static` bound for `Arc/Rc::pin_in`
zetanumbers Jan 18, 2024
24e2cf0
Make `NonZero::get` generic.
reitermarkus Feb 1, 2024
9ddcbca
Use generic `NonZero` internally.
reitermarkus Jan 29, 2024
4d30eca
Replace `NonZero::<_>::new` with `NonZero::new`.
reitermarkus Feb 8, 2024
29fd82b
Be less confident when `dyn` suggestion is not checked for object safety
trevyn Jan 20, 2024
0eee945
Make `is_intrinsic` query return the intrinsic name
oli-obk Jan 30, 2024
92281c7
Implement intrinsics with fallback bodies
oli-obk Jan 30, 2024
79daf61
Make the signature of equate_intrinsic_type support items other than …
oli-obk Jan 31, 2024
6c70bf6
Continue compilation after check_mod_type_wf errors
oli-obk Feb 9, 2024
09fd556
Make check_intrinsic_type not require ForeignItems anymore
oli-obk Jan 31, 2024
0dac617
support adding const generic params to intrinsics
oli-obk Jan 31, 2024
531505f
Check signature of intrinsics with fallback bodies
oli-obk Jan 31, 2024
8549c0a
Add intrinsic body fallback to cranelift and use it
oli-obk Jan 31, 2024
55200e7
Do the entire ReturnDest computation within make_return_dest
oli-obk Jan 31, 2024
432635a
Create ret_dest as late as possible in all code paths
oli-obk Jan 31, 2024
9a07437
Teach llvm backend how to fall back to default bodies
oli-obk Jan 31, 2024
6b73fe2
Give const_deallocate a default body
oli-obk Jan 31, 2024
f35a2bd
Support safe intrinsics with fallback bodies
oli-obk Feb 2, 2024
164b9c3
Add more tests
oli-obk Feb 2, 2024
173dbc9
Remove `TypeErrCtxt::drop`.
nnethercote Feb 12, 2024
9f2aa09
Remove `good_path_delayed_bug`.
nnethercote Feb 12, 2024
1b577bd
Rollup merge of #120092 - zetanumbers:pin_in_static_allocator, r=Amanieu
oli-obk Feb 13, 2024
c28066a
Rollup merge of #120486 - reitermarkus:use-generic-nonzero, r=dtolnay
oli-obk Feb 13, 2024
60a1bdf
Rollup merge of #120500 - oli-obk:intrinsics2.0, r=WaffleLapkin
oli-obk Feb 13, 2024
6e2c002
Rollup merge of #120530 - trevyn:issue-116434, r=compiler-errors
oli-obk Feb 13, 2024
10a5d53
Rollup merge of #120563 - reitermarkus:generic-nonzero-get, r=dtolnay
oli-obk Feb 13, 2024
4bbe53b
Rollup merge of #120847 - oli-obk:track_errors9, r=compiler-errors
oli-obk Feb 13, 2024
767518a
Rollup merge of #120959 - nnethercote:rm-good_path, r=oli-obk
oli-obk Feb 13, 2024
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
Prev Previous commit
Next Next commit
Do the entire ReturnDest computation within make_return_dest
  • Loading branch information
oli-obk committed Feb 12, 2024
commit 55200e75da337a17e0daa333e1f3e70b5aa18e8a
18 changes: 12 additions & 6 deletions compiler/rustc_codegen_ssa/src/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,12 +820,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
let mut llargs = Vec::with_capacity(arg_count);

// Prepare the return value destination
let ret_dest = if target.is_some() {
let is_intrinsic = intrinsic.is_some();
self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, is_intrinsic)
} else {
ReturnDest::Nothing
};
let ret_dest = self.make_return_dest(
bx,
destination,
&fn_abi.ret,
&mut llargs,
intrinsic.is_some(),
target.is_some(),
);

if intrinsic == Some(sym::caller_location) {
return if let Some(target) = target {
Expand Down Expand Up @@ -1632,7 +1634,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
fn_ret: &ArgAbi<'tcx, Ty<'tcx>>,
llargs: &mut Vec<Bx::Value>,
is_intrinsic: bool,
has_target: bool,
) -> ReturnDest<'tcx, Bx::Value> {
if !has_target {
return ReturnDest::Nothing;
}
// If the return is ignored, we can just return a do-nothing `ReturnDest`.
if fn_ret.is_ignore() {
return ReturnDest::Nothing;
Expand Down