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

Unified Diff: src/compiler/store-store-elimination.cc

Issue 2252283004: [turbofan] Allow for 32-bit field offsets in store elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/store-store-elimination.cc
diff --git a/src/compiler/store-store-elimination.cc b/src/compiler/store-store-elimination.cc
index 98904b05b5d045c561c2d045cb6e2ee151f8473a..bc6a3b2f31533fbbd98a82ae540fd0b4298a977f 100644
--- a/src/compiler/store-store-elimination.cc
+++ b/src/compiler/store-store-elimination.cc
@@ -72,9 +72,7 @@ namespace compiler {
namespace {
-// 16 bits was chosen fairly arbitrarily; it seems enough now. 8 bits is too
-// few.
-typedef uint16_t StoreOffset;
+typedef uint32_t StoreOffset;
struct UnobservableStore {
NodeId id_;
@@ -171,11 +169,11 @@ class RedundantStoreFinder final {
const UnobservablesSet unobservables_visited_empty_;
};
-// To safely cast an offset from a FieldAccess, which has a wider range
-// (namely int).
+// To safely cast an offset from a FieldAccess, which has a potentially wider
+// range (namely int).
StoreOffset ToOffset(int offset) {
- CHECK(0 <= offset && offset < (1 << 8 * sizeof(StoreOffset)));
- return (StoreOffset)offset;
+ CHECK(0 <= offset);
+ return static_cast<StoreOffset>(offset);
}
StoreOffset ToOffset(const FieldAccess& access) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698