From d39169cb6dd25f92e62254aa3920c2add2b3ca25 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Wed, 27 Feb 2013 21:02:29 +0100 Subject: [PATCH] nv50/ir: print function inputs and outputs --- .../drivers/nv50/codegen/nv50_ir_print.cpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp index a2b61104f6f..1c3b768259a 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp @@ -602,7 +602,28 @@ private: bool PrintPass::visit(Function *fn) { - INFO("\n%s:%i\n", fn->getName(), fn->getLabel()); + char str[16]; + + INFO("\n%s:%i (", fn->getName(), fn->getLabel()); + + if (!fn->outs.empty()) + INFO("out"); + for (std::deque::iterator it = fn->outs.begin(); + it != fn->outs.end(); + ++it) { + it->get()->print(str, sizeof(str), typeOfSize(it->get()->reg.size)); + INFO(" %s", str); + } + + if (!fn->ins.empty()) + INFO("%s%sin", colour[TXT_DEFAULT], fn->outs.empty() ? "" : ", "); + for (std::deque::iterator it = fn->ins.begin(); + it != fn->ins.end(); + ++it) { + it->get()->print(str, sizeof(str), typeOfSize(it->get()->reg.size)); + INFO(" %s", str); + } + INFO("%s)\n", colour[TXT_DEFAULT]); return true; } -- 2.30.2