JIT baseline: trigger optimized compilation on hotness threshold.
- Add a new hotness count in the ProfilingInfo to not conflict with
interpreter hotness which may use it for OSR.
- Add a baseline flag in the OatQuickMethodHeader to identify baseline
compiled methods.
- Add a -Xusetieredjit flag to experiment and test.
Bug: 119800099
Test: test.py with Xusetieredjit to true
Change-Id: I8512853f869f1312e3edc60bf64413dee9143c52
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 09ae6fa..0433384 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -322,6 +322,7 @@
bool debuggable = false,
bool osr = false,
bool is_shared_jit_code = false,
+ bool baseline = false,
int start_instruction_id = 0)
: allocator_(allocator),
arena_stack_(arena_stack),
@@ -358,6 +359,7 @@
art_method_(nullptr),
inexact_object_rti_(ReferenceTypeInfo::CreateInvalid()),
osr_(osr),
+ baseline_(baseline),
cha_single_implementation_list_(allocator->Adapter(kArenaAllocCHA)),
is_shared_jit_code_(is_shared_jit_code) {
blocks_.reserve(kDefaultNumberOfBlocks);
@@ -589,6 +591,8 @@
bool IsCompilingOsr() const { return osr_; }
+ bool IsCompilingBaseline() const { return baseline_; }
+
bool IsCompilingForSharedJitCode() const {
return is_shared_jit_code_;
}
@@ -786,6 +790,10 @@
// compiled code entries which the interpreter can directly jump to.
const bool osr_;
+ // Whether we are compiling baseline (not running optimizations). This affects
+ // the code being generated.
+ const bool baseline_;
+
// List of methods that are assumed to have single implementation.
ArenaSet<ArtMethod*> cha_single_implementation_list_;