Commit 594d2298 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[safepoint] Avoid unconditional store after std::{min,max}

Instead of cmov + unconditional store, do a conditional store. At least
on Intel CPUs, this turns out to be significantly faster.

R=jkummerow@chromium.org

Bug: v8:13063
Change-Id: Ib5a89b9b9dbc88ca408a4bafc152d91407bf8d1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776675Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81900}
parent 51fc59a6
......@@ -238,9 +238,9 @@ class SafepointTableBuilder : public SafepointTableBuilderBase {
void UpdateMinMaxStackIndex(int index) {
#ifdef DEBUG
max_stack_index_ = std::max(max_stack_index_, index);
if (index > max_stack_index_) max_stack_index_ = index;
#endif // DEBUG
min_stack_index_ = std::min(min_stack_index_, index);
if (index < min_stack_index_) min_stack_index_ = index;
}
int min_stack_index() const {
......
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