YJIT: remove unused `--yjit-greedy-versioning` command-line option (#8713)

This commit is contained in:
Maxime Chevalier-Boisvert 2023-10-19 15:29:31 -04:00 коммит произвёл GitHub
Родитель 9194f489c9
Коммит 3e65115cef
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 2 добавлений и 17 удалений

Просмотреть файл

@ -172,8 +172,7 @@ compiled, lower values mean less code is compiled (default 200000)
- `--yjit-stats=quiet`: gather statistics while running a program but don't print them. Stats are accessible through `RubyVM::YJIT.runtime_stats`. (incurs a run-time cost)
- `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats`
- `--yjit-max-versions=N`: maximum number of versions to generate per basic block (default 4)
- `--yjit-greedy-versioning`: greedy versioning mode (disabled by default, may increase code size)
- `--yjit-perf`: Enable frame pointers and perf profiling
- `--yjit-perf`: Enable frame pointers and profiling with the `perf` tool
Note that there is also an environment variable `RUBY_YJIT_ENABLE` which can be used to enable YJIT.
This can be useful for some deployment scripts where specifying an extra command-line option to Ruby is not practical.

Просмотреть файл

@ -1393,14 +1393,6 @@ fn find_block_version(blockid: BlockId, ctx: &Context) -> Option<BlockRef> {
}
}
// If greedy versioning is enabled
if get_option!(greedy_versioning) {
// If we're below the version limit, don't settle for an imperfect match
if versions.len() + 1 < get_option!(max_versions) && best_diff > 0 {
return None;
}
}
return best_version;
}

Просмотреть файл

@ -22,9 +22,6 @@ pub struct Options {
// Note that the command line argument is expressed in MiB and not bytes
pub exec_mem_size: usize,
// Generate versions greedily until the limit is hit
pub greedy_versioning: bool,
// Disable the propagation of type information
pub no_type_prop: bool,
@ -73,7 +70,6 @@ pub struct Options {
// Initialize the options to default values
pub static mut OPTIONS: Options = Options {
exec_mem_size: 128 * 1024 * 1024,
greedy_versioning: false,
no_type_prop: false,
max_versions: 4,
num_temp_regs: 5,
@ -91,7 +87,7 @@ pub static mut OPTIONS: Options = Options {
};
/// YJIT option descriptions for `ruby --help`.
static YJIT_OPTIONS: [(&str, &str); 9] = [
static YJIT_OPTIONS: [(&str, &str); 8] = [
("--yjit-stats", "Enable collecting YJIT statistics"),
("--yjit-trace-exits", "Record Ruby source location when exiting from generated code"),
("--yjit-trace-exits-sample-rate", "Trace exit locations only every Nth occurrence"),
@ -99,7 +95,6 @@ static YJIT_OPTIONS: [(&str, &str); 9] = [
("--yjit-call-threshold=num", "Number of calls to trigger JIT (default: 30)"),
("--yjit-cold-threshold=num", "Global call after which ISEQs not compiled (default: 200K)"),
("--yjit-max-versions=num", "Maximum number of versions per basic block (default: 4)"),
("--yjit-greedy-versioning", "Greedy versioning mode (default: disabled)"),
("--yjit-perf", "Enable frame pointers and perf profiling"),
];
@ -224,7 +219,6 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> {
OPTIONS.dump_iseq_disasm = Some(opt_val.to_string());
},
("greedy-versioning", "") => unsafe { OPTIONS.greedy_versioning = true },
("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true },
("stats", _) => match opt_val {
"" => unsafe { OPTIONS.gen_stats = true },