Commit 78613430 authored by bgeron's avatar bgeron Committed by Commit bot

[turbofan] Allow for 32-bit field offsets in store elimination.

R=jarin
BUG=chromium:637121

Review-Url: https://codereview.chromium.org/2252283004
Cr-Commit-Position: refs/heads/master@{#38899}
parent 6c744a97
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment