Michael Baikov
c8390cdbfa
Show files produced by --emit foo in json artifact notifications
2024-04-19 08:31:41 -04:00
Michael Baikov
691e953da6
Save/restore more items in cache with incremental compilation
2024-04-06 10:59:24 -04:00
bjorn3
987ed345af
Merge commit ' 09fae60a86
' into sync_cg_clif-2024-03-28
2024-03-28 11:43:35 +00:00
bjorn3
37018026f0
Merge commit ' 3e50cf6502
' into sync_cg_clif-2024-01-26
2024-01-26 18:33:45 +00:00
Nicholas Nethercote
8a9db25459
Remove more Session
methods that duplicate DiagCtxt
methods.
2023-12-24 08:17:47 +11:00
Nicholas Nethercote
99472c7049
Remove Session
methods that duplicate DiagCtxt
methods.
...
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier
access.
2023-12-24 08:05:28 +11:00
Nicholas Nethercote
09af8a667c
Rename Session::span_diagnostic
as Session::dcx
.
2023-12-18 16:06:21 +11:00
bjorn3
484bc7fc88
Merge commit ' 93a5433f17
' into sync_cg_clif-2023-10-24
2023-10-24 12:22:23 +00:00
bjorn3
e07f47b6c5
Merge commit ' c07d1e2f88
' into sync_cg_clif-2023-10-21
2023-10-21 19:54:51 +00:00
bjorn3
f0b5820fa5
Fix review comments
2023-10-09 18:39:43 +00:00
bjorn3
e9fa2ca6ad
Remove cgu_reuse_tracker from Session
...
This removes a bit of global mutable state
2023-10-09 18:39:41 +00:00
bjorn3
6b9ee90c2c
Reuse determine_cgu_reuse from cg_ssa in cg_clif
2023-10-09 18:38:50 +00:00
bjorn3
169055f2ff
Merge commit ' 81dc066758
' into sync_cg_clif-2023-10-09
2023-10-09 08:52:46 +00:00
John Kåre Alsaker
f742d88326
Remove verbose_generic_activity_with_arg
2023-09-10 17:47:16 +02:00
Andrew Xie
204e2bf5a4
Updated cranelift codegen to reflect modified trait signature
2023-06-04 21:54:38 -04:00
Nicholas Nethercote
6b62f37402
Restrict From<S>
for {D,Subd}iagnosticMessage
.
...
Currently a `{D,Subd}iagnosticMessage` can be created from any type that
impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static,
str>`, which are reasonable. It also includes `&String`, which is pretty
weird, and results in many places making unnecessary allocations for
patterns like this:
```
self.fatal(&format!(...))
```
This creates a string with `format!`, takes a reference, passes the
reference to `fatal`, which does an `into()`, which clones the
reference, doing a second allocation. Two allocations for a single
string, bleh.
This commit changes the `From` impls so that you can only create a
`{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static,
str>`. This requires changing all the places that currently create one
from a `&String`. Most of these are of the `&format!(...)` form
described above; each one removes an unnecessary static `&`, plus an
allocation when executed. There are also a few places where the existing
use of `&String` was more reasonable; these now just use `clone()` at
the call site.
As well as making the code nicer and more efficient, this is a step
towards possibly using `Cow<'static, str>` in
`{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing
the `From<&'a str>` impls to `From<&'static str>`, which is doable, but
I'm not yet sure if it's worthwhile.
2023-05-03 08:44:39 +10:00
bjorn3
a8697f9565
Merge commit ' ef07e8e60f
' into sync_cg_clif-2023-04-29
2023-04-29 12:00:43 +00:00
bjorn3
fce629d2e9
Merge commit ' dec0daa8f6
' into sync_cg_clif-2023-03-15
2023-03-15 14:41:48 +00:00
Maybe Waffle
8751fa1a9a
if $c:expr { Some($r:expr) } else { None }
=>> $c.then(|| $r)
2023-02-16 15:26:00 +00:00
bjorn3
e25566e20b
Merge commit ' 7d53619064
' into sync_cg_clif-2023-02-09
2023-02-09 12:38:16 +01:00
bjorn3
b829bb7431
Merge commit ' 598f090956
' into sync_cg_clif-2023-01-24
2023-01-24 18:56:42 +01:00
bjorn3
e54a13f18b
Merge commit ' 266e96785a
' into sync_cg_clif-2022-10-23
2022-10-23 16:22:55 +02:00
bjorn3
7b9c8c8781
Merge commit ' e9d1a0a7b0
' into sync_cg_clif-2022-08-24
2022-08-24 18:40:58 +02:00
Joshua Nelson
3c9765cff1
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
David Wood
8371a036ea
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
bjorn3
e16c3b4a44
Make saved_file field of WorkProduct non-optional
...
A WorkProduct without a saved file is useless
2022-06-06 12:39:32 +00:00
bjorn3
906b85157c
Factor Option out of copy_cgu_workproduct_to_incr_comp_cache_dir call
...
This improves clarity of the code a bit
2022-06-06 12:38:38 +00:00
bjorn3
065e202b56
Avoid an unnecessary clone for copy_cgu_workproduct_to_incr_comp_cache_dir calls
2022-06-06 12:32:08 +00:00
bjorn3
02162c4163
Rename CodegenUnit::work_product to previous_work_product
...
It returns the previous work product or panics if there is none. This rename
makes the purpose of this method clearer.
2022-06-06 12:30:10 +00:00
Loïc BRANSTETT
1a1f5b89a4
Cleanup after some refactoring in rustc_target
2022-04-03 21:29:57 +02:00
bjorn3
f596dce542
Merge commit ' 35d9c6bf25
' into sync_cg_clif-2022-02-23
2022-02-23 11:49:34 +01:00
bjorn3
a8e6d5b04d
Merge commit ' 40b00f4200
' into sync_cg_clif-2021-12-30
2021-12-30 14:53:41 +01:00
bjorn3
3426a730ff
Merge commit ' 97e5045493
' into sync_cg_clif-2021-12-20
2021-12-20 18:56:35 +01:00
Nicholas Nethercote
056d48a2c9
Remove unnecessary sigils around Symbol::as_str()
calls.
2021-12-15 17:32:14 +11:00
Camille GILLOT
aa404c24dd
Make hash_result an Option.
2021-10-20 18:29:18 +02:00
Camille GILLOT
b244b98e7c
Move EncodedMetadata to rustc_metadata.
2021-09-30 19:41:32 +02:00
bjorn3
86f9bcfb8e
Merge commit ' 61667dedf5
' into sync_cg_clif-2021-09-19
2021-09-19 13:56:58 +02:00
bjorn3
b86a2ee036
Use in_incr_comp_dir_sess in cg_clif
2021-09-02 12:29:12 +02:00
bjorn3
d531f3d6ee
Merge commit ' 3a31c6d827
' into sync_cg_clif-2021-07-07
2021-07-07 11:14:20 +02:00
bjorn3
323a74779f
Move LinkerInfo into CrateInfo
2021-07-06 15:31:38 +02:00
bjorn3
e30490d5b2
Move crate_name field from OngoingCodegen to CrateInfo
2021-06-04 13:20:05 +02:00
bjorn3
96247017fa
Move windows_subsystem field from CodegenResults to CrateInfo
2021-06-04 13:20:04 +02:00
bjorn3
fa702d0d2b
Merge commit ' 40dd3e2b70
' into sync_cg_clif-2021-05-27
2021-05-27 13:08:14 +02:00
bors
3396a383bb
Auto merge of #85178 - cjgillot:local-crate, r=oli-obk
...
Remove CrateNum parameter for queries that only work on local crate
The pervasive `CrateNum` parameter is a remnant of the multi-crate rustc idea.
Using `()` as query key in those cases avoids having to worry about the validity of the query key.
2021-05-17 01:42:03 +00:00
Amanieu d'Antras
5918ee4317
Add support for const operands and options to global_asm!
...
On x86, the default syntax is also switched to Intel to match asm!
2021-05-13 22:31:57 +01:00
Camille GILLOT
0bde3b1f80
Use () for codegen queries.
2021-05-12 13:58:46 +02:00
bors
ac923d94f8
Auto merge of #83610 - bjorn3:driver_cleanup, r=cjgillot
...
rustc_driver cleanup
Best reviewed one commit at a time.
2021-05-12 08:38:03 +00:00
bjorn3
808090eb07
Pass target_cpu to LinkerInfo::new instead of link_binary
...
This is one step towards separating the linking code from codegen backends
2021-05-02 18:00:20 +02:00
Erin Power
505aa48f24
Sync rustc_codegen_cranelift ' ddd4ce2553
'
2021-04-30 14:49:58 +02:00
bjorn3
5444b46234
Merge commit ' 0969bc6dde
' into sync_cg_clif-2021-03-29
2021-03-29 10:45:09 +02:00