Skip to content

Commit bcab9bd

Browse files
committed
Add uniform/vector decoration to debug info
Change-Id: I5e022d965342931d719d8975369e6b174a30cc23
1 parent 3a2caa7 commit bcab9bd

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

IGC/Compiler/DebugInfo/DwarfCompileUnit.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,10 @@ DIE *CompileUnit::constructVariableDIE(DbgVariable &DV, bool isScopeAbstract)
14221422
// Copy over references ranges to DotLocDebugEntries
14231423
Offset = DD->CopyDebugLoc(Offset);
14241424
addUInt(VariableDie, dwarf::DW_AT_location, dwarf::DW_FORM_sec_offset, Offset);
1425+
if (DV.getDecorations().size() > 0)
1426+
{
1427+
addString(VariableDie, dwarf::DW_AT_description, DV.getDecorations());
1428+
}
14251429
}
14261430
else
14271431
{

IGC/Compiler/DebugInfo/DwarfDebug.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,7 @@ void DwarfDebug::collectVariableInfo(const Function *MF, SmallPtrSet<const MDNod
13231323
write(dotLoc.loc, (unsigned char*)&constValue, lebSize);
13241324
}
13251325
}
1326+
RegVar->getDecorations().append("u ");
13261327
}
13271328
else if (Loc.IsRegister())
13281329
{
@@ -1420,6 +1421,10 @@ void DwarfDebug::collectVariableInfo(const Function *MF, SmallPtrSet<const MDNod
14201421
op = llvm::dwarf::DW_OP_deref;
14211422
write(dotLoc.loc, (uint8_t)op);
14221423
}
1424+
if (Loc.IsVectorized())
1425+
RegVar->getDecorations().append("v ");
1426+
else
1427+
RegVar->getDecorations().append("u ");
14231428
}
14241429
}
14251430
offset += dotLoc.loc.size();

IGC/Compiler/DebugInfo/DwarfDebug.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ namespace IGC
147147
unsigned DotDebugLocOffset; // Offset in DotDebugLocEntries.
148148
DbgVariable *AbsVar = nullptr; // Corresponding Abstract variable, if any.
149149
const llvm::Instruction *m_pDbgInst; // DBG_VALUE instruction of the variable.
150+
std::string decorations;
150151

151152
public:
152153
// AbsVar may be NULL.
@@ -213,6 +214,11 @@ namespace IGC
213214
#endif
214215
llvm::DIType* getType() const;
215216

217+
std::string& getDecorations()
218+
{
219+
return decorations;
220+
}
221+
216222
private:
217223
/// resolve - Look in the DwarfDebug map for the MDNode that
218224
/// corresponds to the reference.

0 commit comments

Comments
 (0)