Commit 2f48fa11 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Disable escape analysis for double elements accesses

See the issue for details.

Bug: chromium:1237821
Change-Id: I847229c3d0a5435f956c97a621991915aafdd4e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3171156Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76937}
parent 85897428
......@@ -510,12 +510,15 @@ int OffsetOfFieldAccess(const Operator* op) {
return access.offset;
}
int OffsetOfElementAt(ElementAccess const& access, int index) {
Maybe<int> OffsetOfElementAt(ElementAccess const& access, int index) {
MachineRepresentation representation = access.machine_type.representation();
// Double elements accesses are not yet supported. See chromium:1237821.
if (representation == MachineRepresentation::kFloat64) return Nothing<int>();
DCHECK_GE(index, 0);
DCHECK_GE(ElementSizeLog2Of(access.machine_type.representation()),
kTaggedSizeLog2);
return access.header_size +
(index << ElementSizeLog2Of(access.machine_type.representation()));
DCHECK_GE(ElementSizeLog2Of(representation), kTaggedSizeLog2);
return Just(access.header_size +
(index << ElementSizeLog2Of(representation)));
}
Maybe<int> OffsetOfElementsAccess(const Operator* op, Node* index_node) {
......@@ -527,7 +530,7 @@ Maybe<int> OffsetOfElementsAccess(const Operator* op, Node* index_node) {
double min = index_type.Min();
int index = static_cast<int>(min);
if (index < 0 || index != min || index != max) return Nothing<int>();
return Just(OffsetOfElementAt(ElementAccessOf(op), index));
return OffsetOfElementAt(ElementAccessOf(op), index);
}
Node* LowerCompareMapsWithoutLoad(Node* checked_map,
......
......@@ -139,6 +139,11 @@ class VirtualObject : public Dependable {
}
return Just(fields_.at(offset / kTaggedSize));
}
Maybe<Variable> FieldAt(Maybe<int> maybe_offset) const {
int offset;
if (!maybe_offset.To(&offset)) return Nothing<Variable>();
return FieldAt(offset);
}
Id id() const { return id_; }
int size() const { return static_cast<int>(kTaggedSize * fields_.size()); }
// Escaped might mean that the object escaped to untracked memory or that it
......
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