-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Subtree sync for rustc_codegen_cranelift #123166
Conversation
…the few cases that used `None`
* Move the done hash set from ConstantCx to define_all_allocs. * Move check if alloc has already been defined to the start of the loop. * Extract helper function for vtables.
…kends implementing it
Avoid ICE when global_asm const operand fails to evaluate
…, r=pnkfelix "Handle" calls to upstream monomorphizations in compiler_builtins This is pretty cooked, but I think it works. compiler-builtins has a long-standing problem that at link time, its rlib cannot contain any calls to `core`. And yet, in codegen we _love_ inserting calls to symbols in `core`, generally from various panic entrypoints. I intend this PR to attack that problem as completely as possible. When we generate a function call, we now check if we are generating a function call from `compiler_builtins` and whether the callee is a function which was not lowered in the current crate, meaning we will have to link to it. If those conditions are met, actually generating the call is asking for a linker error. So we don't. If the callee diverges, we lower to an abort with the same behavior as `core::intrinsics::abort`. If the callee does not diverge, we produce an error. This means that compiler-builtins can contain panics, but they'll SIGILL instead of panicking. I made non-diverging calls a compile error because I'm guessing that they'd mostly get into compiler-builtins by someone making a mistake while working on the crate, and compile errors are better than linker errors. We could turn such calls into aborts as well if that's preferred.
Remove `TypeAndMut` from `ty::RawPtr` variant, make it take `Ty` and `Mutability` Pretty much mechanically converting `ty::RawPtr(ty::TypeAndMut { ty, mutbl })` to `ty::RawPtr(ty, mutbl)` and its fallout. r? lcnr cc rust-lang/types-team#124
These macros and functions are not intrinsics, after all.
Rustc gives a warning when compiling proc macros with panic=abort.
…rors Add a bunch of needs-unwind annotations to tests To filter out tests that fail with cg_clif due to missing panic=unwind support.
Most types are still unimplemented and get a placeholder byte array instead.
Add debuginfo for statics
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
@bors r+ p=1 subtree sync |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4ea92e3): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 670.635s -> 669.029s (-0.24%) |
The main highlight this time is debuginfo for statics. Not all types are supported yet. Those that aren't supported are represented as
[u8; mem::size_of::<T>()]
instead.r? @ghost
@rustbot label +A-codegen +A-cranelift +T-compiler