diff options
author | Christoph Bumiller <[email protected]> | 2013-02-27 21:02:29 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-03-12 12:55:36 +0100 |
commit | d39169cb6dd25f92e62254aa3920c2add2b3ca25 (patch) | |
tree | 8a6cfa2f0084d3f85e1ab2960175fdfc05f3c3ce /src/gallium/drivers/nv50 | |
parent | 1b4faa2b1717225a0c7b08a227436091d5fdceaf (diff) |
nv50/ir: print function inputs and outputs
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
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<ValueRef>::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<ValueDef>::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; } |