Skip to content

Commit 535aaae

Browse files
pratikasharigcbot
authored andcommitted
Add IGC option to make it use VISA variable id when constructing name of VISA
variables. This helps map each VISA variable with corresponding entry in dbg file when debugging.
1 parent 55c24ed commit 535aaae

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

IGC/Compiler/CISACodeGen/CVariable.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ namespace IGC {
269269
// This accesses the name via a const char *. This will return
270270
// nullptr if names are not tracked (e.g. release build).
271271
const char *getVisaCString() const {
272+
if (IGC_IS_FLAG_ENABLED(UseVISAVarNames))
273+
return nullptr;
272274
return m_llvmName.getVisaCString();
273275
}
274276

IGC/common/igc_flags.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ DECLARE_IGC_REGKEY(bool, EnableRelocations, false, "Setting this to
273273
DECLARE_IGC_REGKEY(bool, EnableWriteOldFPToStack, true, "Setting this to 1 (true) writes the caller frame's frame-pointer to the start of callee's frame on stack, to support stack walk", false)
274274
DECLARE_IGC_REGKEY(debugString, ExtraOCLOptions, 0, "Extra options for OpenCL", true)
275275
DECLARE_IGC_REGKEY(debugString, ExtraOCLInternalOptions, 0, "Extra internal options for OpenCL", true)
276+
DECLARE_IGC_REGKEY(bool, UseVISAVarNames, false, "Make VISA generate names for virtual variables so they match with dbg file", true)
276277

277278
DECLARE_IGC_GROUP("IGC Features")
278279
DECLARE_IGC_REGKEY(bool, EnableOCLSIMD16, true, "Enable OCL SIMD16 mode", true)

0 commit comments

Comments
 (0)