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

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: 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..73efb5bd0ee9fbb8f9221f1c0b96220efeab062b 100644
--- a/src/compiler/store-store-elimination.cc
+++ b/src/compiler/store-store-elimination.cc
@@ -72,9 +72,8 @@ namespace compiler {
namespace {
-// 16 bits was chosen fairly arbitrarily; it seems enough now. 8 bits is too
-// few.
-typedef uint16_t StoreOffset;
+// 4GiB ought to be enough for anybody.
Jarin 2016/08/19 09:30:35 Just remove the comment.
bgeron 2016/08/19 10:42:10 Done.
+typedef uint32_t StoreOffset;
struct UnobservableStore {
NodeId id_;
@@ -171,10 +170,10 @@ 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)));
+ CHECK(0 <= offset && (int64_t)offset < (1ll << 8 * sizeof(StoreOffset)));
Jarin 2016/08/19 09:30:35 At this point, the upper bound check is useless, j
bgeron 2016/08/19 10:42:10 Done.
return (StoreOffset)offset;
Jarin 2016/08/19 09:30:35 static_cast, please.
bgeron 2016/08/19 10:42:10 Done.
}
« 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