Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: src/compiler/register-allocator.cc

Issue 1280483002: [turbofan] Debug-time helpers for regalloc data structures (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/register-allocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator.cc
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
index 5bf858a86cf6e7551ce7a033603cc7c17990cbe2..7836970d84b4d75ce99ddece8c7f8d4d8314b082 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -1087,6 +1087,57 @@ bool RegisterAllocationData::IsBlockBoundary(LifetimePosition pos) const {
}
+void RegisterAllocationData::Print(
+ const InstructionSequence* instructionSequence) {
+ OFStream os(stdout);
+ PrintableInstructionSequence wrapper;
+ wrapper.register_configuration_ = config();
+ wrapper.sequence_ = instructionSequence;
+ os << wrapper << std::endl;
+}
+
+
+void RegisterAllocationData::Print(const Instruction* instruction) {
+ OFStream os(stdout);
+ PrintableInstruction wrapper;
+ wrapper.instr_ = instruction;
+ wrapper.register_configuration_ = config();
+ os << wrapper << std::endl;
+}
+
+
+void RegisterAllocationData::Print(const LiveRange* range, bool with_children) {
+ OFStream os(stdout);
+ PrintableLiveRange wrapper;
+ wrapper.register_configuration_ = config();
+ for (const LiveRange* i = range; i != nullptr; i = i->next()) {
+ wrapper.range_ = i;
+ os << wrapper << std::endl;
+ if (!with_children) break;
+ }
+}
+
+
+void RegisterAllocationData::Print(const InstructionOperand& op) {
+ OFStream os(stdout);
+ PrintableInstructionOperand wrapper;
+ wrapper.register_configuration_ = config();
+ wrapper.op_ = op;
+ os << wrapper << std::endl;
+}
+
+
+void RegisterAllocationData::Print(const MoveOperands* move) {
+ OFStream os(stdout);
+ PrintableInstructionOperand wrapper;
+ wrapper.register_configuration_ = config();
+ wrapper.op_ = move->destination();
+ os << wrapper << " = ";
+ wrapper.op_ = move->source();
+ os << wrapper << std::endl;
+}
+
+
ConstraintBuilder::ConstraintBuilder(RegisterAllocationData* data)
: data_(data) {}
« no previous file with comments | « src/compiler/register-allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698