summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-03-17 16:16:17 -0400
committerGitHub <noreply@github.com>2023-03-17 16:16:17 -0400
commit7fc796f92af6ddb26df8f1258d3a864a8c6e388d (patch)
treebbed7e5b5682aca3078c85f9335648e6b130fdab /yjit
parent2a26a5e677de61cdba04fc8df63c00d3c3e612a9 (diff)
YJIT: Delete --yjit-global-constant-state (#7559)
It was useful for evaluating 6068da8937d7e4358943f95e7450dae7179a7763 but I think we should remove it now to make the logic around invalidation more straight forward.
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/invariants.rs32
-rw-r--r--yjit/src/options.rs8
2 files changed, 5 insertions, 35 deletions
diff --git a/yjit/src/invariants.rs b/yjit/src/invariants.rs
index 0a969905dc..5156ca6a26 100644
--- a/yjit/src/invariants.rs
+++ b/yjit/src/invariants.rs
@@ -5,7 +5,6 @@ use crate::asm::OutlinedCb;
use crate::codegen::*;
use crate::core::*;
use crate::cruby::*;
-use crate::options::*;
use crate::stats::*;
use crate::utils::IntoUsize;
use crate::yjit::yjit_enabled_p;
@@ -273,32 +272,11 @@ pub extern "C" fn rb_yjit_constant_state_changed(id: ID) {
}
with_vm_lock(src_loc!(), || {
- if get_option!(global_constant_state) {
- // If the global-constant-state option is set, then we're going to
- // invalidate every block that depends on any constant.
-
- Invariants::get_instance()
- .constant_state_blocks
- .keys()
- .for_each(|id| {
- if let Some(blocks) =
- Invariants::get_instance().constant_state_blocks.remove(&id)
- {
- for block in &blocks {
- invalidate_block_version(block);
- incr_counter!(invalidate_constant_state_bump);
- }
- }
- });
- } else {
- // If the global-constant-state option is not set, then we're only going
- // to invalidate the blocks that are associated with the given ID.
-
- if let Some(blocks) = Invariants::get_instance().constant_state_blocks.remove(&id) {
- for block in &blocks {
- invalidate_block_version(block);
- incr_counter!(invalidate_constant_state_bump);
- }
+ // Invalidate the blocks that are associated with the given ID.
+ if let Some(blocks) = Invariants::get_instance().constant_state_blocks.remove(&id) {
+ for block in &blocks {
+ invalidate_block_version(block);
+ incr_counter!(invalidate_constant_state_bump);
}
}
});
diff --git a/yjit/src/options.rs b/yjit/src/options.rs
index e720c33b0b..9a8205d933 100644
--- a/yjit/src/options.rs
+++ b/yjit/src/options.rs
@@ -39,12 +39,6 @@ pub struct Options {
/// Verify context objects (debug mode only)
pub verify_ctx: bool,
-
- /// Whether or not to assume a global constant state (and therefore
- /// invalidating code whenever any constant changes) versus assuming
- /// constant name components (and therefore invalidating code whenever a
- /// matching name component changes)
- pub global_constant_state: bool,
}
// Initialize the options to default values
@@ -59,7 +53,6 @@ pub static mut OPTIONS: Options = Options {
dump_insns: false,
dump_disasm: None,
verify_ctx: false,
- global_constant_state: false,
dump_iseq_disasm: None,
};
@@ -159,7 +152,6 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> {
("trace-exits", "") => unsafe { OPTIONS.gen_trace_exits = true; OPTIONS.gen_stats = true },
("dump-insns", "") => unsafe { OPTIONS.dump_insns = true },
("verify-ctx", "") => unsafe { OPTIONS.verify_ctx = true },
- ("global-constant-state", "") => unsafe { OPTIONS.global_constant_state = true },
// Option name not recognized
_ => {