Skip to content

Commit ba1ad9b

Browse files
fangliu2020sys_zuul
authored andcommitted
Add option to disable instruction debug information.
Change-Id: I3faf6b1afe63ef206b58d550adeaab1fddad9bb0
1 parent 193d811 commit ba1ad9b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

visa/FlowGraph.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4091,7 +4091,10 @@ void G4_Kernel::emit_asm(std::ostream& output, bool beforeRegAlloc, void * binar
40914091
continue;
40924092
}
40934093

4094-
(*itBB)->emitInstructionInfo(output, itInst);
4094+
if (!(getOptions()->getOption(vISA_disableInstDebugInfo)))
4095+
{
4096+
(*itBB)->emitInstructionInfo(output, itInst);
4097+
}
40954098
output << std::endl;
40964099

40974100
auto errString = errorToStringMap.find(pc);
@@ -5337,7 +5340,10 @@ void G4_BB::emitBasicInstruction(std::ostream& output, INST_LIST_ITER &it)
53375340
void G4_BB::emitInstruction(std::ostream& output, INST_LIST_ITER &it)
53385341
{
53395342
//prints out instruction line
5340-
emitInstructionInfo(output, it);
5343+
if (!(parent->getKernel()->getOptions()->getOption(vISA_disableInstDebugInfo)))
5344+
{
5345+
emitInstructionInfo(output, it);
5346+
}
53415347

53425348
emitBasicInstruction(output, it);
53435349

visa/include/VISAOptions.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ DEF_VISA_OPTION(vISA_Gtpin, ET_BOOL, "-gtpin", UNUSED,
3030
DEF_VISA_OPTION(vISA_EmitLocation, ET_BOOL, "-emitLocation", UNUSED, false)
3131
DEF_VISA_OPTION(vISA_dumpRPE, ET_BOOL, "-dumpRPE", UNUSED, false)
3232
DEF_VISA_OPTION(vISA_dumpLiveness, ET_BOOL, "-dumpLiveness", UNUSED, false)
33+
DEF_VISA_OPTION(vISA_disableInstDebugInfo, ET_BOOL, "-disableInstDebugInfo", UNUSED, false)
3334

3435
//=== Optimization options ===
3536
DEF_VISA_OPTION(vISA_EnableAlways, ET_BOOL, NULLSTR, UNUSED, true)

0 commit comments

Comments
 (0)