[maglev] Show root constant name in BranchIf

Bug: v8:7700
Change-Id: I83ba4baff9b014a6f0bc6b91bb1ad3f66622e2ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878168
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83015}
This commit is contained in:
Victor Gomes 2022-09-07 09:40:27 +02:00 committed by V8 LUCI CQ
parent cfd951e030
commit 30821ad65b
2 changed files with 5 additions and 1 deletions

View File

@ -3585,6 +3585,10 @@ void BranchIfRootConstant::GenerateCode(MaglevCodeGenState* code_gen_state,
__ CompareRoot(ToRegister(condition_input()), root_index());
Branch(code_gen_state, equal, if_true(), if_false(), state.next_block());
}
void BranchIfRootConstant::PrintParams(
std::ostream& os, MaglevGraphLabeller* graph_labeller) const {
os << "(" << RootsTable::name(root_index_) << ")";
}
void BranchIfUndefinedOrNull::AllocateVreg(
MaglevVregAllocationState* vreg_state) {

View File

@ -3928,7 +3928,7 @@ class BranchIfRootConstant
void AllocateVreg(MaglevVregAllocationState*);
void GenerateCode(MaglevCodeGenState*, const ProcessingState&);
void PrintParams(std::ostream&, MaglevGraphLabeller*) const {}
void PrintParams(std::ostream&, MaglevGraphLabeller*) const;
private:
RootIndex root_index_;