ART: Change GenPCUseDefEncoding(), turn on Load Hoisting for ARM64
This defines the PC resource mask as empty, as the PC is not
accessible on ARM64.
Unify code paths with x86 in LoadStoreElimination and LoadHoisting.
Change-Id: Iea8b9e666f306c7a6ff52b6c5bf7e05b35346b2c
diff --git a/compiler/dex/quick/resource_mask.h b/compiler/dex/quick/resource_mask.h
index 12ce98a..436cdb5 100644
--- a/compiler/dex/quick/resource_mask.h
+++ b/compiler/dex/quick/resource_mask.h
@@ -63,6 +63,11 @@
ResourceMask(const ResourceMask& other) = default;
ResourceMask& operator=(const ResourceMask& other) = default;
+ // Comparable by content.
+ bool operator==(const ResourceMask& other) {
+ return masks_[0] == other.masks_[0] && masks_[1] == other.masks_[1];
+ }
+
static constexpr ResourceMask RawMask(uint64_t mask1, uint64_t mask2) {
return ResourceMask(mask1, mask2);
}