From: Christoph Bumiller Date: Wed, 27 Feb 2013 20:02:29 +0000 (+0100) Subject: nv50/ir: print function inputs and outputs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d39169cb6dd25f92e62254aa3920c2add2b3ca25;p=mesa.git nv50/ir: print function inputs and outputs --- 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; }