Support GVN for HLoadClass::LoadKind::kJitTableAddress.
Fixes performance regressions seen in eg Dhrystone.
Also add comment on why a class may not be found when sharpening.
Test: manual Dhrystone run, performance recovers
Test: ART_TEST_JIT=true test-art-host-run-test-jit
Change-Id: I8e879f1c390f83e8bc930f343beb7b4a41c2f190
diff --git a/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc
index bbbb1a1..91efb80 100644
--- a/compiler/optimizing/sharpening.cc
+++ b/compiler/optimizing/sharpening.cc
@@ -197,7 +197,9 @@
// out which class loader to use.
address = reinterpret_cast<uint64_t>(handles_->NewHandle(klass).GetReference());
} else {
- // Class not loaded yet. Fallback to the dex cache.
+ // Class not loaded yet. This happens when the dex code requesting
+ // this `HLoadClass` hasn't been executed in the interpreter.
+ // Fallback to the dex cache.
// TODO(ngeoffray): Generate HDeoptimize instead.
desired_load_kind = HLoadClass::LoadKind::kDexCacheViaMethod;
}