Skip to content

Commit c048c8d

Browse files
aparshin-inteligcbot
authored andcommitted
extend VC shader dumps to include more DebugInfo-related information
visa mapping and decoded gen debug info are dumped
1 parent dc8bfbe commit c048c8d

File tree

2 files changed

+245
-53
lines changed

2 files changed

+245
-53
lines changed

IGC/DebugInfo/VISADebugDecoder.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ SPDX-License-Identifier: MIT
88

99
#include "VISADebugDecoder.hpp"
1010

11+
#include <llvm/ADT/Twine.h>
12+
1113
template <typename T>
1214
static void PrintItems(llvm::raw_ostream& OS, const T& Items,
1315
const char* Separator = " ") {
@@ -109,7 +111,7 @@ void IGC::DbgDecoder::LiveIntervalGenISA::dump() const
109111
void IGC::DbgDecoder::SubroutineInfo::print(llvm::raw_ostream& OS) const
110112
{
111113
OS << "Name=" << name << " [" << startVISAIndex << ";" << endVISAIndex <<
112-
"), retvals: ";
114+
"], retvals: ";
113115
PrintItems(OS, retval, ", ");
114116
}
115117

@@ -200,7 +202,8 @@ void IGC::DbgDecoder::DbgInfoFormat::print(llvm::raw_ostream& OS) const
200202
std::for_each(CISAIndexMap.begin(), CISAIndexMap.end(), [&OS](const auto& V) {
201203
auto VisaIndex = V.first;
202204
auto GenOff = V.second;
203-
OS << " GI: " << GenOff << " -> VI: " << VisaIndex << "\n";
205+
OS << " GI: 0x" << llvm::Twine::utohexstr(GenOff) << " -> VI: "
206+
<< VisaIndex << "\n";
204207
});
205208
OS << "</VISADebugInfo>";
206209
}

0 commit comments

Comments
 (0)