Skip to content

Commit 89c67a8

Browse files
committed
Remove option to select regalloc algorithm
The main branch of Cranelift has switched to a new register allocator. This register allocator doesn't have any alternative regalloc algorithms unlike the old register allocator.
1 parent 83d470d commit 89c67a8

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/config.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ pub struct BackendConfig {
4848
/// Can be set using `-Cllvm-args=display_cg_time=...`.
4949
pub display_cg_time: bool,
5050

51-
/// The register allocator to use.
52-
///
53-
/// Defaults to the value of `CG_CLIF_REGALLOC` or `backtracking` otherwise. Can be set using
54-
/// `-Cllvm-args=regalloc=...`.
55-
pub regalloc: String,
56-
5751
/// Enable the Cranelift ir verifier for all compilation passes. If not set it will only run
5852
/// once before passing the clif ir to Cranelift for compilation.
5953
///
@@ -80,8 +74,6 @@ impl Default for BackendConfig {
8074
args.split(' ').map(|arg| arg.to_string()).collect()
8175
},
8276
display_cg_time: bool_env_var("CG_CLIF_DISPLAY_CG_TIME"),
83-
regalloc: std::env::var("CG_CLIF_REGALLOC")
84-
.unwrap_or_else(|_| "backtracking".to_string()),
8577
enable_verifier: cfg!(debug_assertions) || bool_env_var("CG_CLIF_ENABLE_VERIFIER"),
8678
disable_incr_cache: bool_env_var("CG_CLIF_DISABLE_INCR_CACHE"),
8779
}
@@ -101,7 +93,6 @@ impl BackendConfig {
10193
match name {
10294
"mode" => config.codegen_mode = value.parse()?,
10395
"display_cg_time" => config.display_cg_time = parse_bool(name, value)?,
104-
"regalloc" => config.regalloc = value.to_string(),
10596
"enable_verifier" => config.enable_verifier = parse_bool(name, value)?,
10697
"disable_incr_cache" => config.disable_incr_cache = parse_bool(name, value)?,
10798
_ => return Err(format!("Unknown option `{}`", name)),

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Box<dyn isa::Tar
256256

257257
flags_builder.set("enable_llvm_abi_extensions", "true").unwrap();
258258

259-
flags_builder.set("regalloc", &backend_config.regalloc).unwrap();
260-
261259
use rustc_session::config::OptLevel;
262260
match sess.opts.optimize {
263261
OptLevel::No => {

0 commit comments

Comments
 (0)