[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/+/3776675 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#81900}
This commit is contained in:
parent
51fc59a644
commit
594d229872
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user