Commit Graph

4193 Commits

Author SHA1 Message Date
bjorn3
0634aedbb7 Implement debug_type for tuples 2024-03-27 20:29:50 +00:00
bjorn3
55a2446a53 Don't panic when layout can't be computed and fix generation of array type debuginfo 2024-03-27 20:07:36 +00:00
bjorn3
fee1204ffa Stop taking FunctionCx's fn_abi field 2024-03-27 19:49:20 +00:00
bjorn3
69363cf9e7
Merge pull request #1472 from rust-lang/debuginfo_improvements2
Add debuginfo for statics
2024-03-27 19:22:09 +01:00
bjorn3
4b80941ae3 Add debuginfo for statics
Most types are still unimplemented and get a placeholder byte array
instead.
2024-03-27 16:53:57 +00:00
bjorn3
f086e7abaf Allow debuginfo to reference global variables 2024-03-27 15:01:25 +00:00
bjorn3
1f75f0fcad Move FileId caching to DebugContext::add_source_file 2024-03-27 14:14:30 +00:00
bjorn3
68b59311fa
Merge pull request #1470 from rust-lang/debuginfo_improvements
Various small debuginfo improvements
2024-03-27 15:08:07 +01:00
bjorn3
41246b2cf6 Remove fixed todos 2024-03-27 13:35:32 +00:00
bjorn3
a64387bb6b Emit DW_AT_external if applicable 2024-03-27 13:28:40 +00:00
bjorn3
98eaaeda11 Match unit names with cg_llvm 2024-03-27 12:57:24 +00:00
bjorn3
e48d7d242f Emit namespace debuginfo 2024-03-27 12:43:47 +00:00
bjorn3
c76c269aa4 Reduce debuginfo divergence between cg_llvm and cg_clif 2024-03-27 11:04:35 +00:00
bjorn3
09ec683ae7 Emit DW_AT_frame_base debuginfo attribute 2024-03-27 10:57:13 +00:00
bjorn3
cfd7325f20
Merge pull request #1469 from rust-lang/fix_some_rustc_tests
Fix a bunch of rustc tests
2024-03-26 12:19:01 +01:00
bjorn3
34d0f6a1d4 Re-enable fixed rustc test 2024-03-26 11:03:50 +00:00
bjorn3
23868af850 Correctly implement --emit 2024-03-26 10:55:46 +00:00
bjorn3
ad1886a5f0 Fix rustdoc help message when no args are passed 2024-03-26 10:27:19 +00:00
bjorn3
dc6595ddbc Implement nearbyintf32 and nearbyintf64 and remove two test ignores 2024-03-26 10:18:44 +00:00
bjorn3
60921608f7 Rustup to rustc 1.79.0-nightly (5f2c7d2bf 2024-03-25) 2024-03-26 09:56:55 +00:00
bjorn3
d183a5186f Sync from rust 5f2c7d2bfd 2024-03-26 09:50:48 +00:00
Matthias Krüger
22e4175bd6 Rollup merge of #123034 - bjorn3:test_ignores, r=compiler-errors
Add a bunch of needs-unwind annotations to tests

To filter out tests that fail with cg_clif due to missing panic=unwind support.
2024-03-25 17:05:36 +01:00
bjorn3
49777c3bfa Add needs-unwind for proc macro tests
Rustc gives a warning when compiling proc macros with panic=abort.
2024-03-25 15:02:55 +00:00
bjorn3
654ce59f70 Remove ignore for fixed rustc test 2024-03-25 14:41:19 +00:00
bjorn3
187decaf18 Fix rustc test suite 2024-03-25 14:29:11 +00:00
bjorn3
c53025b45d Add needs-unwind annotations to a couple of tests 2024-03-25 14:19:07 +00:00
bjorn3
0231d65cec Rustup to rustc 1.79.0-nightly (0824b300e 2024-03-24) 2024-03-25 14:05:11 +00:00
bjorn3
28d480b881 Sync from rust 0824b300eb 2024-03-25 13:59:27 +00:00
Michael Goulet
4609a48d6a Add async-closures/once.rs back to cranelift tests 2024-03-24 21:42:32 -04:00
Scott McMurray
629a772585 Add+Use mir::BinOp::Cmp 2024-03-23 23:23:41 -07:00
Ralf Jung
905550149f also rename the SIMD intrinsic 2024-03-23 23:03:37 +01:00
Ralf Jung
a517adc66e move assert_unsafe_preconditions to its own file
These macros and functions are not intrinsics, after all.
2024-03-23 18:44:17 +01:00
Ralf Jung
c7ab6b5030 rename MIR int2ptr casts to match library name 2024-03-23 13:18:33 +01:00
bors
7f0f9f6580 Auto merge of #122852 - compiler-errors:raw-ptr, r=lcnr
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
2024-03-22 20:34:14 +00:00
bjorn3
593228373d Remove workaround for UB in cranelift-jit that has been fixed 2024-03-22 18:58:36 +00:00
bjorn3
e2cc8ebd87 Rustup to rustc 1.79.0-nightly (0ad927c0c 2024-03-21) 2024-03-22 18:51:59 +00:00
bjorn3
087385a1e7 Sync from rust 0ad927c0c0 2024-03-22 18:44:52 +00:00
bjorn3
ae0e6e22f0 Update to Cranelift 0.106 2024-03-22 18:34:00 +00:00
bors
9057355f50 Auto merge of #122580 - saethlin:compiler-builtins-can-panic, 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.
2024-03-22 16:55:11 +00:00
Michael Goulet
155b46aeb2 Programmatically convert some of the pat ctors 2024-03-22 11:13:29 -04:00
Michael Goulet
dfc1bd7516 Eagerly convert some ctors to use their specialized ctors 2024-03-22 11:12:01 -04:00
Mark Rousskov
05783c8ed6 Codegen const panic messages as function calls
This skips emitting extra arguments at every callsite (of which there
can be many). For a librustc_driver build with overflow checks enabled,
this cuts 0.7MB from the resulting binary.
2024-03-22 09:55:50 -04:00
bjorn3
9ddba16363
Merge pull request #1467 from BeetleFunk/global-asm-ice
Avoid ICE when global_asm const operand fails to evaluate
2024-03-21 23:06:33 +01:00
BeetleFunk
eb752bc6a7 Avoid ICE when global_asm const operand fails to evaluate 2024-03-21 11:59:03 -04:00
Oli Scherer
06ef32c862 Make ptr_guaranteed_cmp a rustc_intrinsic and favor its body over backends implementing it 2024-03-19 09:17:40 +00:00
bjorn3
c49f608062 Several refactorings to constant.rs
* 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.
2024-03-18 15:10:23 +00:00
bjorn3
b64079d631 Re-enable rmake.rs tests as a compiletest bug has been fixed 2024-03-18 14:08:59 +00:00
bjorn3
1aac27e6b6 Rustup to rustc 1.79.0-nightly (eb45c8444 2024-03-17) 2024-03-18 13:59:53 +00:00
Oli Scherer
eeca87b8c7 Avoid various uses of Option<Span> in favor of using DUMMY_SP in the few cases that used None 2024-03-18 09:34:08 +00:00
Ben Kimock
e46114fdc8 Handle calls to upstream monomorphizations in compiler_builtins 2024-03-16 15:22:05 -04:00