Revert "Prevent overflow for AOT hotness counters"
This reverts commit 79e6eb8b79be6249358b7801bc511290dacf10d0.
Bug: 139883463
Reason for revert: 674-hotness-compiled fails on target.
Change-Id: I02fce74d70a4ae69dd5b4ae3924aa11728d9e16f
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index 797fe32..4ab398e 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -1078,15 +1078,8 @@
DCHECK(GetCompilerOptions().GetImplicitStackOverflowChecks());
if (GetCompilerOptions().CountHotnessInCompiledCode()) {
- NearLabel overflow;
- __ cmpw(Address(kMethodRegisterArgument,
- ArtMethod::HotnessCountOffset().Int32Value()),
- Immediate(ArtMethod::MaxCounter()));
- __ j(kEqual, &overflow);
- __ addw(Address(kMethodRegisterArgument,
- ArtMethod::HotnessCountOffset().Int32Value()),
+ __ addw(Address(kMethodRegisterArgument, ArtMethod::HotnessCountOffset().Int32Value()),
Immediate(1));
- __ Bind(&overflow);
}
if (!skip_overflow_check) {
@@ -1392,13 +1385,7 @@
if (codegen_->GetCompilerOptions().CountHotnessInCompiledCode()) {
__ pushl(EAX);
__ movl(EAX, Address(ESP, kX86WordSize));
- NearLabel overflow;
- __ cmpw(Address(EAX, ArtMethod::HotnessCountOffset().Int32Value()),
- Immediate(ArtMethod::MaxCounter()));
- __ j(kEqual, &overflow);
- __ addw(Address(EAX, ArtMethod::HotnessCountOffset().Int32Value()),
- Immediate(1));
- __ Bind(&overflow);
+ __ addw(Address(EAX, ArtMethod::HotnessCountOffset().Int32Value()), Immediate(1));
__ popl(EAX);
}
GenerateSuspendCheck(info->GetSuspendCheck(), successor);