summaryrefslogtreecommitdiff
path: root/yjit.h
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maximechevalierb@gmail.com>2021-04-24 00:16:48 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:34 -0400
commit96f4f918b04fad1401d4f41cd11d97d9d4d28c7d (patch)
tree27959163baee644317499d709913c12fc683890b /yjit.h
parent4c7afa64b49d792da586709b2bbc1aa2f04b5712 (diff)
Implement greedy versioning. Refactor versioning logic. (#10)
* Implement eager versioning. Refactor versioning logic. * Add --version-limit and --greedy-versioning command-line args
Diffstat (limited to 'yjit.h')
-rw-r--r--yjit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/yjit.h b/yjit.h
index 00ed486054..3359a51435 100644
--- a/yjit.h
+++ b/yjit.h
@@ -30,12 +30,20 @@ typedef struct rb_iseq_struct rb_iseq_t;
#endif
struct rb_yjit_options {
+ // Enable compilation with YJIT
bool yjit_enabled;
// Number of method calls after which to start generating code
// Threshold==1 means compile on first execution
unsigned call_threshold;
+ // Generate versions greedily until the limit is hit
+ bool greedy_versioning;
+
+ // Maximum number of versions per block
+ // 1 means always create generic versions
+ unsigned version_limit;
+
// Capture and print out stats
bool gen_stats;
};