[Beignet] [PATCH 6/7] check basicblock whether empty while add dgbinfo
Bai Yannan
yannan.bai at intel.com
Fri Sep 18 02:01:56 PDT 2015
Signed-off-by: Bai Yannan <yannan.bai at intel.com>
---
backend/src/llvm/llvm_gen_backend.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index b75da22..e3b6b13 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -203,7 +203,8 @@ if(OCL_PROFILING){ \
llvm::DebugLoc dg; \
GET_INSN_DBGLOC##FLAG(I); \
gbe::ir::BasicBlock * bb = ctx.getBlock(); \
- for(gbe::ir::Instruction *in = bb->getFirstInstruction(); in!=bb->getLastInstruction(); in=bb->getSuccessorInstruction(in) )\
+ if(bb)\
+ for(gbe::ir::Instruction *in = bb->getFirstInstruction(); in!=bb->getLastInstruction(); in=bb->getSuccessorInstruction(in) )\
if(!in->DBGInfo.hasDBGInfo) in->setDBGInfo(dg.getLine(), dg.getCol());\
}
// end define SET_GENIR_DBGINFO
--
1.9.1
More information about the Beignet
mailing list