Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: src/compiler/simplified-operator.cc

Issue 1938993002: [turbofan] Restore basic write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.cc
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index f383ace587470e46ea00dd5055bfdc1c55e0e196..707bf098bc4c32aef532c914c89c36ea4bf48bfc 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -13,6 +13,10 @@ namespace v8 {
namespace internal {
namespace compiler {
+size_t hash_value(BaseTaggedness base_taggedness) {
+ return static_cast<uint8_t>(base_taggedness);
+}
+
std::ostream& operator<<(std::ostream& os, BaseTaggedness base_taggedness) {
switch (base_taggedness) {
case kUntaggedBase:
@@ -84,6 +88,9 @@ BufferAccess const BufferAccessOf(const Operator* op) {
bool operator==(FieldAccess const& lhs, FieldAccess const& rhs) {
+ // On purpose we don't include the write barrier kind here, as this method is
+ // really only relevant for eliminating loads and they don't care about the
+ // write barrier mode.
return lhs.base_is_tagged == rhs.base_is_tagged && lhs.offset == rhs.offset &&
lhs.machine_type == rhs.machine_type;
}
@@ -95,6 +102,9 @@ bool operator!=(FieldAccess const& lhs, FieldAccess const& rhs) {
size_t hash_value(FieldAccess const& access) {
+ // On purpose we don't include the write barrier kind here, as this method is
+ // really only relevant for eliminating loads and they don't care about the
+ // write barrier mode.
return base::hash_combine(access.base_is_tagged, access.offset,
access.machine_type);
}
@@ -110,12 +120,15 @@ std::ostream& operator<<(std::ostream& os, FieldAccess const& access) {
}
#endif
access.type->PrintTo(os);
- os << ", " << access.machine_type << "]";
+ os << ", " << access.machine_type << ", " << access.write_barrier_kind << "]";
return os;
}
bool operator==(ElementAccess const& lhs, ElementAccess const& rhs) {
+ // On purpose we don't include the write barrier kind here, as this method is
+ // really only relevant for eliminating loads and they don't care about the
+ // write barrier mode.
return lhs.base_is_tagged == rhs.base_is_tagged &&
lhs.header_size == rhs.header_size &&
lhs.machine_type == rhs.machine_type;
@@ -128,6 +141,9 @@ bool operator!=(ElementAccess const& lhs, ElementAccess const& rhs) {
size_t hash_value(ElementAccess const& access) {
+ // On purpose we don't include the write barrier kind here, as this method is
+ // really only relevant for eliminating loads and they don't care about the
+ // write barrier mode.
return base::hash_combine(access.base_is_tagged, access.header_size,
access.machine_type);
}
@@ -136,7 +152,7 @@ size_t hash_value(ElementAccess const& access) {
std::ostream& operator<<(std::ostream& os, ElementAccess const& access) {
os << access.base_is_tagged << ", " << access.header_size << ", ";
access.type->PrintTo(os);
- os << ", " << access.machine_type;
+ os << ", " << access.machine_type << ", " << access.write_barrier_kind;
return os;
}
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698