Commit 824c0758 authored by mtrofin's avatar mtrofin Committed by Commit bot

[turbofan] Print API for verifier

A simple Print API for debugging assessments in the regalloc
verifier.

BUG=

Review-Url: https://codereview.chromium.org/2512943003
Cr-Commit-Position: refs/heads/master@{#41117}
parent 764548e2
......@@ -300,6 +300,27 @@ void BlockAssessments::DropRegisters() {
}
}
void BlockAssessments::Print() const {
OFStream os(stdout);
for (const auto pair : map()) {
const InstructionOperand op = pair.first;
const Assessment* assessment = pair.second;
// Use operator<< so we can write the assessment on the same
// line. Since we need a register configuration, just pick
// Turbofan for now.
PrintableInstructionOperand wrapper = {RegisterConfiguration::Turbofan(),
op};
os << wrapper << " : ";
if (assessment->kind() == AssessmentKind::Final) {
os << "v" << FinalAssessment::cast(assessment)->virtual_register();
} else {
os << "P";
}
os << std::endl;
}
os << std::endl;
}
BlockAssessments* RegisterAllocatorVerifier::CreateForBlock(
const InstructionBlock* block) {
RpoNumber current_block_id = block->rpo_number();
......
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