YJIT: remove unused --yjit-greedy-versioning
command-line option (#8713)
This commit is contained in:
parent
9194f489c9
commit
3e65115cef
@ -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-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-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-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 profiling with the `perf` tool
|
||||||
- `--yjit-perf`: Enable frame pointers and perf profiling
|
|
||||||
|
|
||||||
Note that there is also an environment variable `RUBY_YJIT_ENABLE` which can be used to enable YJIT.
|
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.
|
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;
|
return best_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,9 +22,6 @@ pub struct Options {
|
|||||||
// Note that the command line argument is expressed in MiB and not bytes
|
// Note that the command line argument is expressed in MiB and not bytes
|
||||||
pub exec_mem_size: usize,
|
pub exec_mem_size: usize,
|
||||||
|
|
||||||
// Generate versions greedily until the limit is hit
|
|
||||||
pub greedy_versioning: bool,
|
|
||||||
|
|
||||||
// Disable the propagation of type information
|
// Disable the propagation of type information
|
||||||
pub no_type_prop: bool,
|
pub no_type_prop: bool,
|
||||||
|
|
||||||
@ -73,7 +70,6 @@ pub struct Options {
|
|||||||
// Initialize the options to default values
|
// Initialize the options to default values
|
||||||
pub static mut OPTIONS: Options = Options {
|
pub static mut OPTIONS: Options = Options {
|
||||||
exec_mem_size: 128 * 1024 * 1024,
|
exec_mem_size: 128 * 1024 * 1024,
|
||||||
greedy_versioning: false,
|
|
||||||
no_type_prop: false,
|
no_type_prop: false,
|
||||||
max_versions: 4,
|
max_versions: 4,
|
||||||
num_temp_regs: 5,
|
num_temp_regs: 5,
|
||||||
@ -91,7 +87,7 @@ pub static mut OPTIONS: Options = Options {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// YJIT option descriptions for `ruby --help`.
|
/// 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-stats", "Enable collecting YJIT statistics"),
|
||||||
("--yjit-trace-exits", "Record Ruby source location when exiting from generated code"),
|
("--yjit-trace-exits", "Record Ruby source location when exiting from generated code"),
|
||||||
("--yjit-trace-exits-sample-rate", "Trace exit locations only every Nth occurrence"),
|
("--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-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-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-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"),
|
("--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());
|
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 },
|
("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true },
|
||||||
("stats", _) => match opt_val {
|
("stats", _) => match opt_val {
|
||||||
"" => unsafe { OPTIONS.gen_stats = true },
|
"" => unsafe { OPTIONS.gen_stats = true },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user