[Beignet] [PATCH V2 5/5] GBE/DebugInfo: Print line and column NO. with ASM
Bai Yannan
yannan.bai at intel.com
Tue Nov 17 18:43:05 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 b3aacc9..25ad6d4 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -2471,6 +2471,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) {
@@ -2502,6 +2505,10 @@ namespace gbe
curLabel = (ir::LabelIndex)(curLabel + 1);
}
}
+
+ if (OCL_DEBUGINFO)
+ fprintf(file, "[%3i,%3i]", p->storedbg[insnID].line, p->storedbg[insnID].col);
+
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