[Beignet] [PATCH 5/5] GBE/DebugInfo: Print line and column NO. with ASM
Bai Yannan
yannan.bai at intel.com
Mon Nov 16 23:53:13 PST 2015
Print line and column numbers with ASM, if OCL_DEBUGINFO is true.
Signed-off-by: Yannan Bai <yannan.bai at intel.com>
---
backend/src/backend/gen_context.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index 7a122b5..cad9ecc 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -2473,6 +2473,9 @@ namespace gbe
if (OCL_OUTPUT_ASM)
outputAssembly(stdout, genKernel);
+ if (OCL_DEBUGINFO)
+ outputAssembly(stdout, genKernel);
+
if (this->asmFileName) {
FILE *asmDumpStream = fopen(this->asmFileName, "a");
if (asmDumpStream) {
@@ -2504,6 +2507,10 @@ namespace gbe
curLabel = (ir::LabelIndex)(curLabel + 1);
}
}
+
+ if (OCL_DEBUGINFO)
+ fprintf(file, "[%3i,%3i]", p->storedbg[insnID].srcline, p->storedbg[insnID].srccol);
+
fprintf(file, " (%8i) ", insnID);
pCom = (GenCompactInstruction*)&p->store[insnID];
if(pCom->bits1.cmpt_control == 1) {
--
1.9.1
More information about the Beignet
mailing list