Commit Graph

2716 Commits

Author SHA1 Message Date
bjorn3
3207c9faec Report an error on incompatible symbol definitions 2022-07-22 19:03:06 +00:00
bjorn3
a6b602dc32 Fix inline asm codegen for empty template 2022-07-22 18:59:16 +00:00
bjorn3
cd96988436 Don't crash when local variables are too big to store on the stack 2022-07-22 18:03:24 +00:00
bjorn3
5fcedf62df Update for changes to the rustc test suite 2022-07-18 11:57:22 +00:00
bjorn3
bc061fa319 Rustup to rustc 1.64.0-nightly (263edd43c 2022-07-17) 2022-07-18 12:59:55 +02:00
bjorn3
cff5eed8ef Sync from rust 880416180b 2022-07-18 12:10:52 +02:00
bors
33b297a525 Auto merge of #99033 - 5225225:interpreter-validity-checks, r=oli-obk
Use constant eval to do strict mem::uninit/zeroed validity checks

I'm not sure about the code organisation here, I just dumped the check in rustc_const_eval at the root. Not hard to move it elsewhere, in any case.

Also, this means cranelift codegen intrinsics lose the strict checks, since they don't seem to depend on rustc_const_eval, and I didn't see a point in keeping around two copies.

I also left comments in the is_zero_valid methods about "uhhh help how do i do this", those apply to both methods equally.

Also rustc_codegen_ssa now depends on rustc_const_eval... is this okay?

Pinging `@RalfJung` since you were the one who mentioned this to me, so I'm assuming you're interested.

Haven't had a chance to run full tests on this since it's really warm, and it's 1AM, I'll check out any failures/comments in the morning :)
2022-07-17 19:28:01 +00:00
Oli Scherer
9ea9c093e5 Introduce opaque type to hidden type projection 2022-07-15 15:49:22 +00:00
5225225
5a81bf7ad2 Use constant eval to do strict validity checks 2022-07-14 22:55:17 +01:00
Joshua Nelson
b2ae24e6a1 Rename debugging_opts to unstable_opts
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
2022-07-13 17:47:06 -05:00
bors
43388812a6 Auto merge of #99210 - Dylan-DPC:rollup-879cp1t, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #98574 (Lower let-else in MIR)
 - #99011 (`UnsafeCell` blocks niches inside its nested type from being available outside)
 - #99030 (diagnostics: error messages when struct literals fail to parse)
 - #99155 (Keep unstable target features for asm feature checking)
 - #99199 (Refactor: remove an unnecessary `span_to_snippet`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-07-13 17:13:27 +00:00
Dylan DPC
38c321a6f0 Rollup merge of #99155 - Amanieu:unstable-target-features, r=davidtwco
Keep unstable target features for asm feature checking

Inline assembly uses the target features to determine which registers
are available on the current target. However it needs to be able to
access unstable target features for this.

Fixes #99071
2022-07-13 19:32:36 +05:30
ouz-a
9efccc97e2 add new rval, pull deref early 2022-07-12 14:26:41 +03:00
Amanieu d'Antras
a7347a941b Keep unstable target features for asm feature checking
Inline assembly uses the target features to determine which registers
are available on the current target. However it needs to be able to
access unstable target features for this.

Fixes #99071
2022-07-11 14:26:58 +01:00
Konrad Borowski
743cee6ca9 Partially stabilize const_slice_from_raw_parts
This doesn't stabilize methods working on mutable pointers.
2022-07-09 23:20:02 +02:00
Ralf Jung
c78b43878f tweak names and output and bless 2022-07-09 07:43:56 -04:00
Ralf Jung
f44d5feb5b review feedback 2022-07-09 07:27:29 -04:00
Ralf Jung
e9442b60e0 fix cranelift and gcc backends 2022-07-09 07:27:29 -04:00
Dylan DPC
e151a095ab Rollup merge of #99070 - tamird:update-tracking-issue, r=RalfJung
Update integer_atomics tracking issue

Updates #32976.
Updates #99069.

r? ``@RalfJung``
2022-07-09 11:28:09 +05:30
Tamir Duberstein
c413617ca5 Update integer_atomics tracking issue
Updates #32976.
Updates #99069.
2022-07-08 17:52:04 -04:00
David Wood
69d0c1e9ac incr: cache dwarf objects in work products
Cache DWARF objects alongside object files in work products when those
exist so that DWARF object files are available for thorin in packed mode
in incremental scenarios.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-06 11:15:13 +01:00
Alan Egerton
44c2558504 Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
bors
96bdb398f9 Auto merge of #96862 - oli-obk:enum_cast_mir, r=RalfJung
Change enum->int casts to not go through MIR casts.

follow-up to https://github.com/rust-lang/rust/pull/96814

this simplifies all backends and even gives LLVM more information about the return value of `Rvalue::Discriminant`, enabling optimizations in more cases.
2022-07-05 09:36:29 +00:00
bjorn3
b8aab37464 Update for changes to the rustc test suite 2022-07-03 13:41:29 +00:00
bjorn3
8720683936 Rustup to rustc 1.64.0-nightly (f2d93935f 2022-07-02) 2022-07-03 15:07:25 +02:00
bjorn3
b344691522 Sync from rust f99f9e48ed 2022-07-03 14:51:45 +02:00
bjorn3
14b2f8f98d Add code to print clif ir on panics during define_function 2022-07-02 19:38:50 +02:00
Camille GILLOT
a71e691e74 Recover when failing to normalize closure signature. 2022-06-30 21:45:29 +02:00
Oli Scherer
846eecb1a4 Change enum->int casts to not go through MIR casts.
Instead we generate a discriminant rvalue and cast the result of that.
2022-06-30 07:47:07 +00:00
bjorn3
45b6cd6a8a Fix a crash for 11 single byte fields passed through the C abi
Fixes #1234
2022-06-28 14:32:31 +00:00
bjorn3
c1ac2df0c3 Allow building the sysroot with --emit llvm-ir 2022-06-28 11:55:37 +02:00
bjorn3
56c5c09618 Run regalloc checker on CI
This would have caught the issue that required releasing Cranelift 0.85.1
2022-06-28 11:53:40 +02:00
bjorn3
f060ae9d3d Update to Cranelift 0.85.1
This fixes a miscompilation
2022-06-28 11:52:21 +02:00
Nicholas Nethercote
f516ba2240 Update smallvec to 1.8.1.
This pulls in https://github.com/servo/rust-smallvec/pull/282, which
gives some small wins for rustc.
2022-06-27 08:48:55 +10:00
bjorn3
8a4557e01c Update for changes to the rustc test suite 2022-06-23 14:32:08 +00:00
bjorn3
439c323f9c Disable DWARF debuginfo on Windows
Windows uses PDB instead of DWARF and using DWARF debuginfo causes the linker to give an error
2022-06-23 16:06:46 +02:00
bjorn3
7c5fbacaf9 Update Cranelift to 0.85.0 2022-06-23 15:19:54 +02:00
bjorn3
6d5e8f3843 Adopt for "Remove dereferencing of Box from codegen" 2022-06-23 15:01:46 +02:00
bjorn3
c58a11e935 Rustup to rustc 1.63.0-nightly (10f4ce324 2022-06-22) 2022-06-23 14:58:55 +02:00
bjorn3
473e80eb28 Sync from rust 10f4ce324b 2022-06-23 14:52:31 +02:00
bors
92749f04c6 Auto merge of #98098 - bjorn3:archive_refactor, r=michaelwoerister
Remove the source archive functionality of ArchiveWriter

We now build archives through strictly additive means rather than taking an existing archive and potentially substracting parts. This is simpler and makes it easier to swap out the archive writer in https://github.com/rust-lang/rust/pull/97485.
2022-06-21 16:24:56 +00:00
bjorn3
73b3ae0b8a Remove the source archive functionality of ArchiveWriter
We now build archives through strictly additive means rather than taking
an existing archive and potentially substracting parts.
2022-06-19 12:56:31 +00:00
bjorn3
abb9b60f09 Fix "Remove src_files and remove_file" 2022-06-19 12:56:31 +00:00
Matthias Krüger
5543d22de2 Rollup merge of #98165 - WaffleLapkin:once_things_renamings, r=m-ou-se
once cell renamings

This PR does the renamings proposed in https://github.com/rust-lang/rust/issues/74465#issuecomment-1153703128

- Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`
- Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}`

(I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc)

```@rustbot``` label +T-libs-api -T-libs
2022-06-19 00:17:13 +02:00
Yuki Okushi
449b309f2b Rollup merge of #97675 - nvzqz:unsized-needs-drop, r=dtolnay
Make `std::mem::needs_drop` accept `?Sized`

This change attempts to make `needs_drop` work with types like `[u8]` and `str`.

This enables code in types like `Arc<T>` that was not possible before, such as https://github.com/rust-lang/rust/pull/97676.
2022-06-17 07:16:55 +09:00
Maybe Waffle
6d8c45064b Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
bjorn3
fc0c753c2d Remove src_files and remove_file
They only apply to the main source archive and their role can be
fulfilled through the skip argument of add_archive too.
2022-06-14 15:11:14 +00:00
b-naber
9096b3e44f implement valtrees as the type-system representation for constant values 2022-06-14 16:07:11 +02:00
bjorn3
c431540544 Rustup to rustc 1.63.0-nightly (ca122c7eb 2022-06-13) 2022-06-14 12:34:26 +02:00
Nicholas Nethercote
ce2b3a9b4c Rename the ConstS::val field as kind.
And likewise for the `Const::val` method.

Because its type is called `ConstKind`. Also `val` is a confusing name
because `ConstKind` is an enum with seven variants, one of which is
called `Value`. Also, this gives consistency with `TyS` and `PredicateS`
which have `kind` fields.

The commit also renames a few `Const` variables from `val` to `c`, to
avoid confusion with the `ConstKind::Value` variant.
2022-06-14 13:06:44 +10:00