From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- js/src/jit/MIRGraph.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/src/jit/MIRGraph.h') diff --git a/js/src/jit/MIRGraph.h b/js/src/jit/MIRGraph.h index 18c0bf68a4..4de20a36fa 100644 --- a/js/src/jit/MIRGraph.h +++ b/js/src/jit/MIRGraph.h @@ -61,6 +61,9 @@ class MBasicBlock : public TempObject, public InlineListNode { // This block will unconditionally bail out. bool alwaysBails_ = false; + // Will be used for branch hinting in wasm. + wasm::BranchHint branchHint_ = wasm::BranchHint::Invalid; + // Pushes a copy of a local variable or argument. void pushVariable(uint32_t slot) { push(slots_[slot]); } @@ -375,6 +378,15 @@ class MBasicBlock : public TempObject, public InlineListNode { uint32_t id() const { return id_; } uint32_t numPredecessors() const { return predecessors_.length(); } + bool branchHintingUnlikely() const { + return branchHint_ == wasm::BranchHint::Unlikely; + } + bool branchHintingLikely() const { + return branchHint_ == wasm::BranchHint::Likely; + } + + void setBranchHinting(wasm::BranchHint value) { branchHint_ = value; } + uint32_t domIndex() const { MOZ_ASSERT(!isDead()); return domIndex_; -- cgit v1.2.3