summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2021-11-19 14:53:07 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2021-11-29 11:22:25 +0000
commit9e598907f28277b0f0e3dcd725d6ed9d71f8a958 (patch)
tree82a585f67b83fe937a47bf29b8c0397c18c10f60 /compiler/optimizing/nodes.h
parentac4e4a231f6438974f6d8adcfe91308e9d137ed4 (diff)
Simplify hotness count in baseline compiled code.
- Always require the current ArtMethod, which also removes the need to handle empty frames. - Remove the use of some temporary registers. - Require a profiling info when compiling baseline. - Add a slow path for requiring an optimized compilation. - Make the counter decrement instead of increment. A next CL will make the hotness configurable through --jittreshold. Test: test.py Bug: 146423102 Change-Id: I1485f66401d6ed218456fe2849eb05fa77479668
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 16e26dc7bc..c50e04791d 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -75,6 +75,7 @@ class HTryBoundary;
class FieldInfo;
class LiveInterval;
class LocationSummary;
+class ProfilingInfo;
class SlowPathCode;
class SsaBuilder;
@@ -704,6 +705,9 @@ class HGraph : public ArenaObject<kArenaAllocGraph> {
ArtMethod* GetArtMethod() const { return art_method_; }
void SetArtMethod(ArtMethod* method) { art_method_ = method; }
+ void SetProfilingInfo(ProfilingInfo* info) { profiling_info_ = info; }
+ ProfilingInfo* GetProfilingInfo() const { return profiling_info_; }
+
// Returns an instruction with the opposite Boolean value from 'cond'.
// The instruction has been inserted into the graph, either as a constant, or
// before cursor.
@@ -870,6 +874,9 @@ class HGraph : public ArenaObject<kArenaAllocGraph> {
// (such as when the superclass could not be found).
ArtMethod* art_method_;
+ // The `ProfilingInfo` associated with the method being compiled.
+ ProfilingInfo* profiling_info_;
+
// How we are compiling the graph: either optimized, osr, or baseline.
// For osr, we will make all loops seen as irreducible and emit special
// stack maps to mark compiled code entries which the interpreter can