summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-04-14 18:07:55 +0100
committer Vladimir Marko <vmarko@google.com> 2016-04-14 18:45:01 +0100
commit27bb86edf60e2f9ca2c1075c0c86b9e79374f1d0 (patch)
tree5e2cb0caa0b4456fd55c93f6c863bb3b26d5cd31 /compiler/optimizing/nodes.h
parent0108f3d945cd5483217d7bf1df75ab5108d4555c (diff)
Use dex cache from compilation unit in RTP.
Avoid calling the costly ClassLinker::FindDexCache() from reference type propagation when the dex cache from the compilation unit will do, i.e. almost always. Compiling the Nexus 5 boot image on host under perf(1) shows that the FindDexCache() hits drop from about 0.2% to almost nothing, though enabling inlining for the boot image will increase it a bit to 0.03% due to unavoidable calls from the inliner. Also clean up the ScopedObjectAccess usage a bit. Change-Id: I426a5f9f5da9e64fad2ea57654240789a48d3871
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index dc5a8fa9cb..7fc39cbadd 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -169,7 +169,7 @@ class ReferenceTypeInfo : ValueObject {
return handle.GetReference() != nullptr;
}
- bool IsValid() const SHARED_REQUIRES(Locks::mutator_lock_) {
+ bool IsValid() const {
return IsValidHandle(type_handle_);
}
@@ -1933,7 +1933,7 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> {
ReferenceTypeInfo GetReferenceTypeInfo() const {
DCHECK_EQ(GetType(), Primitive::kPrimNot);
return ReferenceTypeInfo::CreateUnchecked(reference_type_handle_,
- GetPackedFlag<kFlagReferenceTypeIsExact>());;
+ GetPackedFlag<kFlagReferenceTypeIsExact>());
}
void AddUseAt(HInstruction* user, size_t index) {