diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2023-10-19 15:29:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-19 19:29:31 +0000 |
commit | 3e65115cef8dec7d280784fdd7324ede529051be (patch) | |
tree | 5cd6e1e0fac13897d318cf2463df41bf604ebe20 /yjit | |
parent | 9194f489c94a4498bcfa1e858a31ecdef833b4c9 (diff) |
YJIT: remove unused `--yjit-greedy-versioning` command-line option (#8713)
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/core.rs | 8 | ||||
-rw-r--r-- | yjit/src/options.rs | 8 |
2 files changed, 1 insertions, 15 deletions
diff --git a/yjit/src/core.rs b/yjit/src/core.rs index b75b809d26..e58475a3aa 100644 --- a/yjit/src/core.rs +++ b/yjit/src/core.rs @@ -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; } diff --git a/yjit/src/options.rs b/yjit/src/options.rs index c4f3e8df3a..fe0a7ec9cc 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -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 }, |