Skip to content

Commit fdabae1

Browse files
aparshin-inteligcbot
authored andcommitted
sanitization workarounds for VC debug
1 parent 04921ef commit fdabae1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXCisaBuilder.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ static cl::opt<bool>
109109

110110
static cl::opt<bool> SkipNoWiden("skip-widen", cl::init(false), cl::Hidden,
111111
cl::desc("Do new emit NoWiden hint"));
112+
static cl::opt<bool>
113+
EnableOptimizedDebug("vc-experimental-finalizer-optimizes-debug",
114+
cl::init(false), cl::Hidden,
115+
cl::desc("Finalizer shall produce optimized code if "
116+
"debug info is requested"));
112117

113118
/// For VISA_PREDICATE_CONTROL & VISA_PREDICATE_STATE
114119
template <class T> T &operator^=(T &a, T b) {
@@ -6279,10 +6284,11 @@ collectFinalizerArgs(StringSaver &Saver, const GenXSubtarget &ST,
62796284

62806285
if (EmitDebugInformation) {
62816286
addArgument("-generateDebugInfo");
6282-
addArgument("-addKernelID");
6283-
addArgument("-debug");
6287+
if (!EnableOptimizedDebug)
6288+
addArgument("-debug");
62846289
}
62856290
if (EmitDebuggableKernels) {
6291+
addArgument("-addKernelID");
62866292
addArgument("-setstartbp");
62876293
}
62886294
if (AsmDumpsEnabled) {

0 commit comments

Comments
 (0)