Commit Graph

4179 Commits

Author SHA1 Message Date
bjorn3
9b855a9f61 Add missing with_no_trimmed_paths to CommentWriter::new() 2023-09-19 12:44:31 +00:00
bjorn3
baee5ce1fc Rustup to rustc 1.74.0-nightly (65ea825f4 2023-09-18) 2023-09-19 12:34:26 +00:00
bjorn3
5f3b867831 Sync from rust 65ea825f40 2023-09-19 12:25:47 +00:00
Ralf Jung
247d38d174 move ConstValue into mir
this way we have mir::ConstValue and ty::ValTree as reasonably parallel
2023-09-19 11:11:02 +02:00
bors
46b55ae176 Auto merge of #115748 - RalfJung:post-mono, r=oli-obk
move required_consts check to general post-mono-check function

This factors some code that is common between the interpreter and the codegen backends into shared helper functions. Also as a side-effect the interpreter now uses the same `eval` functions as everyone else to get the evaluated MIR constants.

Also this is in preparation for another post-mono check that will be needed for (the current hackfix for) https://github.com/rust-lang/rust/issues/115709: ensuring that all locals are dynamically sized.

I didn't expect this to change diagnostics, but it's just cycle errors that change.

r? `@oli-obk`
2023-09-18 19:41:21 +00:00
Oli Scherer
6fd5dc8860 Prototype using const generic for simd_shuffle IDX array 2023-09-18 15:10:28 +00:00
bjorn3
fbb276e933 Update some dependencies 2023-09-16 10:12:33 +00:00
Ralf Jung
f9f8bffaec fix gcc, cranelift build 2023-09-15 10:43:44 +02:00
Ralf Jung
89f0d18bc8 clarify PassMode::Indirect as well 2023-09-15 10:43:44 +02:00
Ralf Jung
b7cc765b60 don't point at const usage site for resolution-time errors
also share the code that emits the actual error
2023-09-14 22:34:05 +02:00
Ralf Jung
3113fef3a3 move required_consts check to general post-mono-check function 2023-09-14 22:30:42 +02:00
bjorn3
5c7a87c9ba
Merge pull request #1393 from onur-ozkan/rustfmt-group-imports
organize import sections with rustfmt `group_imports`
2023-09-14 21:05:03 +02:00
onur-ozkan
e048674ea5 organize import sections with rustfmt group_imports
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-14 18:45:33 +00:00
bjorn3
02e5f387fa Add debug tracing for failed commands 2023-09-14 18:42:55 +00:00
bjorn3
d8c1393557 Avoid mir_operand_get_const_val for simd_shuffle and cmpps and cmppd 2023-09-14 18:35:34 +00:00
bjorn3
aab17ccd19 Fix rustc test suite 2023-09-14 17:58:00 +00:00
bjorn3
b67a1c4ea7 Rustup to rustc 1.74.0-nightly (8142a319e 2023-09-13) 2023-09-14 16:51:24 +00:00
bjorn3
214d474a85 Sync from rust 8142a319ed 2023-09-14 16:48:54 +00:00
Ralf Jung
90d894e122 make it more clear which functions create fresh AllocId 2023-09-14 07:27:31 +02:00
Ralf Jung
a5b81faef0 cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect 2023-09-14 07:27:30 +02:00
Ralf Jung
d1ea6997e8 use AllocId instead of Allocation in ConstValue::ByRef 2023-09-14 07:26:24 +02:00
Matthias Krüger
1956fb84f3 Rollup merge of #115798 - RalfJung:non_1zst_field, r=wesleywiser
add helper method for finding the one non-1-ZST field
2023-09-13 18:37:42 +02:00
Matthias Krüger
9475cdb02d Rollup merge of #115736 - Zoxc:time-cleanup, r=wesleywiser
Remove `verbose_generic_activity_with_arg`

This removes `verbose_generic_activity_with_arg` and changes users to `generic_activity_with_arg`. This keeps the output of `-Z time` readable while these repeated events are still available with the self profiling mechanism.
2023-09-13 18:37:41 +02:00
Ralf Jung
8e6f68be39 make the eval() functions on our const types return the resulting value 2023-09-13 07:29:34 +02:00
Ralf Jung
72fb4b8f31 add helper method for finding the one non-1-ZST field 2023-09-12 20:52:05 +02:00
John Kåre Alsaker
4f6e9fd8d3 Remove verbose_generic_activity_with_arg 2023-09-10 17:47:16 +02:00
bors
c41e7794cd Auto merge of #115418 - Zoxc:freeze-source, r=oli-obk
Use `Freeze` for `SourceFile`

This uses the `Freeze` type in `SourceFile` to let accessing `external_src` and `lines` be lock-free.

Behavior of `add_external_src` is changed to set `ExternalSourceKind::AbsentErr` on a hash mismatch which matches the documentation. `ExternalSourceKind::Unneeded` was removed as it's unused.

Based on https://github.com/rust-lang/rust/pull/115401.
2023-09-08 17:20:23 +00:00
bjorn3
d72f7109ed Update steps to testing rustc changes for upstream changes 2023-09-07 12:03:27 +00:00
bjorn3
5ae94e91f0 Rustup to rustc 1.74.0-nightly (e3abbd499 2023-09-06) 2023-09-07 11:54:01 +00:00
bjorn3
28f12f057d Merge branch 'sync_from_rust' 2023-09-07 11:45:29 +00:00
John Kåre Alsaker
4ecfd30a86 Use Freeze for SourceFile.lines 2023-09-07 13:05:05 +02:00
bors
6285086ead Auto merge of #115616 - bjorn3:sync_cg_clif-2023-09-06, r=bjorn3
Sync rustc_codegen_cranelift

Not much changed this time. Mostly doing this sync to make it easier to run the entire test suite on the in-tree version.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-09-07 03:56:43 +00:00
bors
d4f12a5ed3 Auto merge of #115580 - eduardosm:stdarch-intrinsics, r=davidtwco,bjorn3
Update stdarch submodule and remove special handling in cranelift codegen for some AVX and SSE2 LLVM intrinsics

https://github.com/rust-lang/stdarch/pull/1463 reimplemented some x86 intrinsics to avoid using some x86-specific LLVM intrinsics:

* Store unaligned (`_mm*_storeu_*`) use `<*mut _>::write_unaligned` instead of `llvm.x86.*.storeu.*`.
* Shift by immediate (`_mm*_s{ll,rl,ra}i_epi*`) use `if` (srl, sll) or `min` (sra) to simulate the behaviour when the RHS is out of range. RHS is constant, so the `if`/`min` will be optimized away.

This PR updates the stdarch submodule to pull these changes and removes special handling for those LLVM intrinsics from cranelift codegen. I left gcc codegen untouched because there are some autogenerated lists.
2023-09-06 22:26:37 +00:00
bjorn3
f2211c5242 Merge commit 'dda103b1e33c4902deca8bccf614991ada781fa6' into sync_cg_clif-2023-09-06 2023-09-06 18:51:03 +00:00
bjorn3
dda103b1e3 Rustup to rustc 1.74.0-nightly (a991861ec 2023-09-05) 2023-09-06 18:33:08 +00:00
bjorn3
5920ae5e7b Sync from rust a991861ec9 2023-09-06 18:28:02 +00:00
Eduardo Sánchez Muñoz
4cd5177015 Remove special handling in codegen for some AVX and SSE2 shift by immediate intrinsics
Those were removed from stdarch in https://github.com/rust-lang/stdarch/pull/1463 (`simd_shl` and `simd_shr` are used instead)
2023-09-05 20:17:01 +02:00
Eduardo Sánchez Muñoz
9f562f290d Remove special handling in codegen for some SSE2 "storeu" intrinsics
Those were removed from stdarch in https://github.com/rust-lang/stdarch/pull/1463 (`<*mut _>::write_unaligned` is used instead)
2023-09-05 20:06:50 +02:00
Camille GILLOT
61a0b77e17 Use relative positions inside a SourceFile. 2023-09-03 12:56:10 +00:00
bjorn3
0559de6567 Fix rustc test suite 2023-09-01 13:08:16 +00:00
bjorn3
a756bae8ca Rustup to rustc 1.74.0-nightly (2f5df8a94 2023-08-31) 2023-09-01 13:07:46 +00:00
bjorn3
832422832a Sync from rust 2f5df8a94b 2023-09-01 12:44:06 +00:00
Matthias Krüger
65d75fdc38 Rollup merge of #111580 - atsuzaki:layout-ice, r=oli-obk
Don't ICE on layout computation failure

Fixes #111176 regression.

r? `@oli-obk`
2023-08-29 20:49:02 +02:00
Ralf Jung
833592766f const_eval and codegen: audit uses of is_zst 2023-08-29 09:03:46 +02:00
Katherine Philip
b88dfcfcd5 Don't ICE on layout computation failure 2023-08-28 12:40:39 -07:00
Scott McMurray
25a2ba2ee4 Use preserve_mostcc for extern "rust-cold"
As experimentation in 115242 has shown looks better than `coldcc`.

And *don't* use a different convention for cold on Windows, because that actually ends up making things worse.

cc tracking issue 97544
2023-08-26 17:42:59 -07:00
Ralf Jung
3f4145e169 when terminating during unwinding, show the reason why 2023-08-24 13:28:26 +02:00
Ralf Jung
18658cb0c9 give some unwind-related terminators a more clear name 2023-08-20 15:52:38 +02:00
bjorn3
9aa5fbf79c Fix shell helpers in usage docs 2023-08-18 13:15:36 +02:00
dirreke
8c6590a99b reverse change in rustc_codegen_cranelift 2023-08-15 00:09:20 +08:00