Commit 899a8168 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Eliminate non-determinism in element access code gen

Replace a ZoneUnorderedMap with a ZoneMap in order to avoid
non-deterministic iteration order resulting in non-deterministic IR
and non-deterministic allocations during code assembly later. The
map in question is very small in practice so there should be no
performance regression.

Bug: v8:11894
Change-Id: Ic961102b45b3df28dafdece0cfb54ff5ef940d56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001348Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75529}
parent e90600df
...@@ -1001,9 +1001,12 @@ ElementAccessFeedback const& JSHeapBroker::ProcessFeedbackMapsForElementAccess( ...@@ -1001,9 +1001,12 @@ ElementAccessFeedback const& JSHeapBroker::ProcessFeedbackMapsForElementAccess(
} }
using TransitionGroup = ElementAccessFeedback::TransitionGroup; using TransitionGroup = ElementAccessFeedback::TransitionGroup;
ZoneUnorderedMap<Handle<Map>, TransitionGroup, Handle<Map>::hash, struct HandleLess {
Handle<Map>::equal_to> bool operator()(Handle<Map> x, Handle<Map> y) const {
transition_groups(zone()); return x.address() < y.address();
}
};
ZoneMap<Handle<Map>, TransitionGroup, HandleLess> transition_groups(zone());
// Separate the actual receiver maps and the possible transition sources. // Separate the actual receiver maps and the possible transition sources.
for (Handle<Map> map : maps) { for (Handle<Map> map : maps) {
......
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