diff options
author | 2021-11-19 14:53:07 +0000 | |
---|---|---|
committer | 2021-11-29 11:22:25 +0000 | |
commit | 9e598907f28277b0f0e3dcd725d6ed9d71f8a958 (patch) | |
tree | 82a585f67b83fe937a47bf29b8c0397c18c10f60 /compiler/optimizing/code_generator.cc | |
parent | ac4e4a231f6438974f6d8adcfe91308e9d137ed4 (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/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index ced94f43f0..27eabafb8f 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -1081,6 +1081,11 @@ CodeGenerator::CodeGenerator(HGraph* graph, } } } + if (GetGraph()->IsCompilingBaseline()) { + // We need the current method in case we reach the hotness threshold. As a + // side effect this makes the frame non-empty. + SetRequiresCurrentMethod(); + } } CodeGenerator::~CodeGenerator() {} |