about summary refs log tree commit diff
path: root/src/librustc_session
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-25 18:52:11 +0000
committerbors <bors@rust-lang.org>2020-08-25 18:52:11 +0000
commit8ba22504e8e5dcbbe136d97f63c1280dabc523d0 (patch)
tree29a5eca62b3f61c36570f5701fc89378ac8fef08 /src/librustc_session
parentba4c4468f5e77a46369968631677b5436f342c86 (diff)
parent98b943e7d821aff17fefbf1a094503f9ae172a4a (diff)
Auto merge of #74275 - wesleywiser:break_up_partitioning_rs, r=pnkfelix
Refactor the partitioning module to make it easier to introduce new algorithms

I've split the `librustc_mir::monomorphize::partitioning` module into a few files and introduced a `Partitioner` trait which allows us to decouple the partitioning algorithm from the code which integrates it into the query system. This should allow us to introduce new partitioning algorithms much more easily. I've also gone ahead and added a `-Z` flag to control which algorithm is used (currently there is only the `default`).

I left a few comments in places where things might be improved further.

r? @pnkfelix cc @rust-lang/wg-incr-comp
Diffstat (limited to 'src/librustc_session')
-rw-r--r--src/librustc_session/options.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs
index 80164840334..d05f1a3f34b 100644
--- a/src/librustc_session/options.rs
+++ b/src/librustc_session/options.rs
@@ -807,6 +807,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "select which borrowck is used (`mir` or `migrate`) (default: `migrate`)"),
     borrowck_stats: bool = (false, parse_bool, [UNTRACKED],
         "gather borrowck statistics (default: no)"),
+    cgu_partitioning_strategy: Option<String> = (None, parse_opt_string, [TRACKED],
+        "the codegen unit partitioning strategy to use"),
     chalk: bool = (false, parse_bool, [TRACKED],
         "enable the experimental Chalk-based trait solving engine"),
     codegen_backend: Option<String> = (None, parse_opt_string, [TRACKED],