Commit Graph

242 Commits

Author SHA1 Message Date
bors
656ee47db3 Auto merge of #114689 - m-ou-se:stabilize-thread-local-cell-methods, r=thomcc
Stabilize thread local cell methods.

Closes #92122.
2023-08-16 02:37:29 +00:00
Santiago Pastorino
826471e93b
Add trait related queries to SMIR's rustc_internal 2023-08-15 13:37:47 -03:00
Matthias Krüger
106d686e98
Rollup merge of #114745 - ouz-a:smir_const, r=spastorino
Make Const more useful in smir

Since https://github.com/rust-lang/rust/pull/114587 is merged, we can make use of what we built and make Const more useful by making it not `Opaque`

r? `@spastorino`
2023-08-14 21:57:51 +02:00
Matthias Krüger
1d0792bd80
Rollup merge of #114703 - ouz-a:smir_allocation, r=oli-obk
Cover ParamConst in smir

Others variants won't be useful for a while or ever(?), but we might need this one.

r? ````@oli-obk````
2023-08-12 12:06:37 +02:00
ouz-a
d5120d4a46 Make Const more useful in smir 2023-08-11 23:43:58 +03:00
ouz-a
c80281a861 cover ParamConst 2023-08-10 21:04:03 +03:00
Santiago Pastorino
5f0e662523
Add impl trait declarations to SMIR 2023-08-10 14:17:50 -03:00
Santiago Pastorino
8b29ad7215
Fix copy & paste doc error 2023-08-10 14:17:08 -03:00
Mara Bos
dc3cbc1e56 Stabilize thread local cell methods. 2023-08-10 17:33:40 +02:00
Matthias Krüger
bbc1109b79
Rollup merge of #114587 - ouz-a:smir_allocation, r=oli-obk
Convert Const to Allocation in smir

Continuation of previous pr https://github.com/rust-lang/rust/pull/114466

cc https://github.com/rust-lang/project-stable-mir/issues/15

r? `@oli-obk`
2023-08-09 23:00:00 +02:00
ouz-a
8f1ea576b7 only allocate bytes within AllocRange 2023-08-09 21:05:03 +03:00
ouz-a
c41339a52f Convert Const to Allocation in smir 2023-08-09 15:00:00 +03:00
Seth Pellegrino
d88ab223c5 fix: add RiscvInterrupt* cconv to smir
These new interrupt calling conventions are not themselves stabilized,
but there are other unstable calling conventions present in the SMIR
mapping (e.g. AVR interrupts) and the mapping appears to be "complete"
so far, with no obvious way to represent unstable conventions separately
from the stable ones.
2023-08-08 18:09:56 -07:00
Santiago Pastorino
6e4d7bd90e
Add TraitDef::trait_decl method 2023-08-07 10:24:12 -03:00
Santiago Pastorino
0e69a8ad20
Add all_trait_decls to SMIR 2023-08-07 10:24:11 -03:00
Santiago Pastorino
496faa857c
Convert trait declaration to SMIR 2023-08-07 10:24:08 -03:00
Santiago Pastorino
4199a3c13a
Convert unsafety using the stable method and reuse mir::Safety 2023-08-07 10:23:20 -03:00
ouz-a
b9a539e0a3 Add alocation to smir 2023-08-06 15:06:04 +03:00
ouz-a
2ff62fdfcc clean up, use opaque types 2023-08-01 17:48:20 +03:00
ouz-a
206bfc47ea Cover statements for stable_mir 2023-08-01 12:57:13 +03:00
Matthias Krüger
35ba616850
Rollup merge of #114165 - ouz-a:smir1, r=spastorino
Add missing rvalues to smir

Added few missing rvalues to smir, not entirely confident about changes to `Aggregate`

cc https://github.com/rust-lang/project-stable-mir/issues/13

r? `@oli-obk`
2023-07-31 22:51:14 +02:00
ouz-a
2a3da87c0e add missing rvalues to smir 2023-07-31 22:48:55 +03:00
Matthias Krüger
3ce90b1649 inline format!() args up to and including rustc_codegen_llvm 2023-07-30 14:22:50 +02:00
Matthias Krüger
17e4f80257
Rollup merge of #114082 - ericmarkmartin:smir-nullary-op, r=spastorino
add stable NullaryOp

r? `@spastorino`
2023-07-27 06:04:14 +02:00
Santiago Pastorino
7af1697138
Add Bound ty to SMIR 2023-07-26 09:26:39 -03:00
Santiago Pastorino
648cf070eb
Add Param ty to SMIR 2023-07-26 09:26:39 -03:00
Eric Mark Martin
933fc180bd add stable NullaryOp 2023-07-26 00:22:38 -04:00
Eric Mark Martin
0a0ce4905d factor out more stable impls 2023-07-25 00:49:49 -04:00
Eric Mark Martin
badb617eb5 Dynamic for smir 2023-07-24 00:17:45 -04:00
Eric Mark Martin
c2158a44e1 generic smir stable impl for Binder 2023-07-24 00:06:29 -04:00
Eric Mark Martin
aa33e8945c add Alias for smir 2023-07-22 15:38:41 -04:00
Santiago Pastorino
634db101ec
Implement Stable for ty::Ty 2023-07-21 11:56:49 -03:00
Santiago Pastorino
17b8977f9b
Add FnPtr ty to SMIR 2023-07-20 23:18:40 -03:00
Santiago Pastorino
93bcc2ef98
Implement Stable for ty::GenericArgs 2023-07-20 23:18:33 -03:00
Santiago Pastorino
cbabd00c12
Add tables to Stable::stable 2023-07-20 22:20:53 -03:00
Santiago Pastorino
c5819b2b9b
Remove FIXMEs a lot of things need fixes 2023-07-19 11:05:21 -03:00
Santiago Pastorino
db35f1de2f
Extract generic_args function 2023-07-19 11:05:14 -03:00
Santiago Pastorino
ed32347689
Add Generator to SMIR 2023-07-19 11:02:38 -03:00
Santiago Pastorino
c5c38cdee8
Add Closure ty to SMIR 2023-07-19 11:02:37 -03:00
Santiago Pastorino
e5c0b96e24
Add FnDef ty to SMIR 2023-07-19 11:02:37 -03:00
Santiago Pastorino
68077d5827
Rename SMIR AdtSubsts to GenericArgs 2023-07-19 11:02:34 -03:00
Santiago Pastorino
caa01adbd0
Add Never to SMIR 2023-07-18 13:58:41 -03:00
Santiago Pastorino
9b32319205
Add Foreign to SMIR 2023-07-18 13:58:41 -03:00
Eric Mark Martin
c8ee46be75 conversions to smir RawPtr and Ref 2023-07-17 21:08:49 -04:00
Eric Mark Martin
08e89acd2e add RawPtr 2023-07-17 20:47:27 -04:00
Eric Mark Martin
285920ea2d move const definition 2023-07-17 20:47:27 -04:00
bors
bacf5bcbc7 Auto merge of #112982 - lukas-code:bootstrap-alias-default-crates, r=albertlarsan68
bootstrap: update defaults for `compiler` and `library` aliases

* `x doc compiler` now documents all of compiler, not just `rustc_driver`.
* `x doc` with compiler docs enabled now includes `rustc-main` and `rustc_smir`. `rustc_codegen_llvm` is only included if the LLVM backend is enabled, which is the default.
* `x doc library` now excludes `sysroot`.
* `x check compiler` and `x check library` now properly check tests/benches/examples of all compiler or library crates, respectively. Note that `x check compiler` will check the library artifacts, but not tests.

fixes the fallout from https://github.com/rust-lang/rust/pull/111955, cc `@jyn514`
2023-07-14 12:09:27 +00:00
Lukas Markeffsky
9d6bfc281d fix docs for rustc_smir 2023-07-14 09:41:42 +00:00
Eric Mark Martin
fd5553ffea add str, slice, and array to smir types 2023-07-13 20:59:44 -04:00
Matthias Krüger
017112f834
Rollup merge of #113629 - spastorino:smir-types-3, r=oli-obk
Add Adt to SMIR

r? ````@oli-obk````
2023-07-13 22:33:25 +02:00
Santiago Pastorino
c80a0f3178
Add Adt to SMIR 2023-07-13 12:00:46 -03:00
Matthias Krüger
66233fbb32
Rollup merge of #113553 - spastorino:smir-types-2, r=oli-obk
Make Placeholder, GeneratorWitness*, Infer and Error unreachable on SMIR rustc_ty_to_ty

Let's remove these todos to not confuse ``@ericmarkmartin`` if they pick some conversion up.

r? ``@oli-obk``
2023-07-13 12:19:22 +02:00
Santiago Pastorino
5cf570f325
DefIds are not only about CrateItem 2023-07-12 16:26:05 -03:00
Santiago Pastorino
715cd99450
Make Placeholder, GeneratorWitness*, Infer and Error unreachable on SMIR rustc_ty_to_ty 2023-07-11 12:59:38 -03:00
Celina G. Val
b9f378b19b Implement a few more rvalue translation to smir
- Introduce an Opaque type for adding information that is still
   internal to the compiler.
2023-07-10 11:47:48 -07:00
Celina G. Val
697563289d Implement Stable for AssertMessage 2023-07-10 10:06:18 -07:00
Celina G. Val
44d0fce150 Fix standalone build
Add extern declarations and optional dependencies to fix build done
directly via `cargo build`.
2023-07-10 10:06:18 -07:00
Matthias Krüger
39f558f8cf
Rollup merge of #113412 - spastorino:smir-types-1, r=oli-obk
Add basic types to SMIR

Still incomplete but I think this can be merged and we can keep iterating over it.

r? ``@oli-obk``
2023-07-08 15:49:47 +02:00
Santiago Pastorino
9ca51b92d4
Add Float ty to SMIR 2023-07-07 13:47:55 -03:00
Santiago Pastorino
42eccffce3
Add Uint ty to SMIR 2023-07-07 13:47:33 -03:00
Santiago Pastorino
458ead41d6
Add Int ty to SMIR 2023-07-07 13:47:09 -03:00
Santiago Pastorino
73e816e37c
Add Char ty to SMIR 2023-07-07 13:46:40 -03:00
Santiago Pastorino
61adcaf87b
Add rustc_ty_to_ty basic tests 2023-07-07 13:45:54 -03:00
Santiago Pastorino
284df9fc34
Wrap SMIR bool and tuple into a Rigid variant 2023-07-06 15:34:42 -03:00
yukang
361df86a8d Use scoped-tls for SMIR to map between TyCtxt and SMIR datastructures 2023-07-02 07:48:41 +08:00
Michael Goulet
31d1fbf8d2
Rollup merge of #112232 - fee1-dead-contrib:match-eq-const-msg, r=b-naber
Better error for non const `PartialEq` call generated by `match`

Resolves #90237
2023-06-19 17:53:33 -07:00
Scott McMurray
39788e07ba Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
Deadbeef
89c24af133 Better error for non const PartialEq call generated by match 2023-06-18 05:24:38 +00:00
Celina G. Val
af4040a5c1 Use a Stable trait to translate mir -> smir
I was wondering if this would be a bit cleaner.
2023-06-13 15:17:01 -07:00
Santiago Pastorino
313143b6a3
Add Terminator::InlineAsm conversion from MIR to SMIR 2023-06-08 16:53:41 -03:00
Matthias Krüger
1788d49789
Rollup merge of #111250 - spastorino:smir-terminator-2, r=oli-obk
Add Terminator conversion from MIR to SMIR, part #2

r? `@oli-obk`
2023-06-06 22:00:18 +02:00
Camille GILLOT
844c1cc5fe Remove DesugaringKind::Replace. 2023-05-25 17:40:46 +00:00
Santiago Pastorino
5749bd08e8
Add unreachable cases to Terminator 2023-05-11 14:44:53 +02:00
Oli Scherer
5c6e2342f6 Encode types in SMIR 2023-05-08 14:23:19 +00:00
Oli Scherer
7f74ae57e8 Create a trait to abstract over the smir API 2023-05-08 14:23:04 +00:00
Santiago Pastorino
698acc645e
Add GeneratorDrop terminator to SMIR 2023-05-05 10:34:55 -03:00
Santiago Pastorino
4b85bea4ae
Add Assert terminator to SMIR 2023-05-05 10:34:52 -03:00
Santiago Pastorino
7dd59fceef
Add Drop terminator to SMIR 2023-05-03 18:38:15 -03:00
Santiago Pastorino
2f503345b4
Add Call terminator to SMIR 2023-04-20 12:00:41 -03:00
Oli Scherer
e404e77c0b Add a stable MIR way to get the main function 2023-04-14 07:28:56 +00:00
Gary Guo
bf6b84b10a Fix new usage of old api 2023-04-06 09:34:16 +01:00
Oli Scherer
480e042097 Add Debug and Clone derives for stable mir datastructures 2023-03-16 16:17:25 +00:00
Oli Scherer
942cac1b8d Implement a minimal subset of MIR statements and terminators for smir 2023-03-16 16:06:12 +00:00
Oli Scherer
6fe982283d Remove DefId from CrateItem in favor of a lookup table 2023-03-16 14:53:57 +00:00
Celina G. Val
5eaeb71b9f Change item collection to be on demand 2023-03-07 12:47:25 -08:00
Celina G. Val
b66db7e4e0 Create new rustc_smir struct to map future crates
+ Add some information to the README.md
2023-03-06 21:57:46 -08:00
Celina G. Val
40185dba54 Delete old re-exports from rustc_smir
This approach didn't seem to work well.
2023-03-03 16:56:07 -08:00
Camille GILLOT
ffe20d61d6 Only keep one version of ImplicitSelfKind. 2022-09-13 19:18:23 +02:00
5225225
09ea9f0a87 Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
Oli Scherer
7cba9ed4f7 Rustfmt 2022-06-02 10:29:00 +00:00
Oli Scherer
0324ac8ae0 List all crates used in crate source in Cargo.toml 2022-06-02 10:15:07 +00:00
Oli Scherer
bec75389a3 Add 'compiler/rustc_smir/' from commit '9abcb5c7b574cf316eb23d3f469187bb86ba3019'
git-subtree-dir: compiler/rustc_smir
git-subtree-mainline: fb1976011e
git-subtree-split: 9abcb5c7b5
2022-06-02 10:07:25 +00:00