@@ -1198,18 +1198,15 @@ void DwarfDebug::beginModule() {
1198
1198
// Prime section data.
1199
1199
SectionMap[Asm->GetTextSection ()];
1200
1200
1201
- if (DwarfFrameSectionNeeded ()) {
1202
- Asm->SwitchSection (Asm->GetDwarfFrameSection ());
1203
- if (m_pModule->hasOrIsStackCall (*VisaDbgInfo)) {
1204
- // First stack call CIE is written out,
1205
- // next subroutine CIE if required.
1206
- offsetCIEStackCall = 0 ;
1207
- offsetCIESubroutine = writeStackcallCIE ();
1208
- }
1209
-
1210
- if (!m_pModule->getSubroutines (*VisaDbgInfo)->empty ()) {
1211
- // writeSubroutineCIE();
1212
- }
1201
+ Asm->SwitchSection (Asm->GetDwarfFrameSection ());
1202
+ if (m_pModule->getSubroutines (*VisaDbgInfo)->empty ()) {
1203
+ // First stack call CIE is written out,
1204
+ // next subroutine CIE if required.
1205
+ offsetCIEStackCall = 0 ;
1206
+ offsetCIESubroutine = writeStackcallCIE ();
1207
+ } else {
1208
+ // TODO: .debug_frame for subrotuines is currently unsupported.
1209
+ // writeSubroutineCIE();
1213
1210
}
1214
1211
}
1215
1212
@@ -2408,16 +2405,14 @@ void DwarfDebug::endFunction(const Function *MF) {
2408
2405
constructScopeDIE (TheCU, FnScope);
2409
2406
LLVM_DEBUG (dbgs () << " [DwarfDebug] FnScope constructed ***\n " );
2410
2407
2411
- if (DwarfFrameSectionNeeded ()) {
2412
- Asm->SwitchSection (Asm->GetDwarfFrameSection ());
2413
- if (m_pModule->hasOrIsStackCall (*VisaDbgInfo)) {
2414
- LLVM_DEBUG (dbgs () << " [DwarfDebug] writing FDEStackCall start ---\n " );
2415
- writeFDEStackCall (m_pModule);
2416
- LLVM_DEBUG (dbgs () << " [DwarfDebug] writing FDEStackCall end ***\n " );
2417
- } else {
2418
- LLVM_DEBUG (dbgs () << " [DwarfDebug] FDESubproutine skipped ***\n " );
2419
- // writeFDESubroutine(m_pModule);
2420
- }
2408
+ Asm->SwitchSection (Asm->GetDwarfFrameSection ());
2409
+ if (m_pModule->getSubroutines (*VisaDbgInfo)->empty ()) {
2410
+ LLVM_DEBUG (dbgs () << " [DwarfDebug] writing FDEStackCall start ---\n " );
2411
+ writeFDEStackCall (m_pModule);
2412
+ LLVM_DEBUG (dbgs () << " [DwarfDebug] writing FDEStackCall end ***\n " );
2413
+ } else {
2414
+ LLVM_DEBUG (dbgs () << " [DwarfDebug] FDESubproutine skipped ***\n " );
2415
+ // writeFDESubroutine(m_pModule);
2421
2416
}
2422
2417
2423
2418
ScopeVariables.clear ();
@@ -3540,10 +3535,6 @@ void DwarfDebug::writeFDEStackCall(VISAModule *m) {
3540
3535
Asm->EmitInt8 (byte);
3541
3536
}
3542
3537
}
3543
- bool DwarfDebug::DwarfFrameSectionNeeded () const {
3544
- return (m_pModule->hasOrIsStackCall (*VisaDbgInfo) ||
3545
- (!m_pModule->getSubroutines (*VisaDbgInfo)->empty ()));
3546
- }
3547
3538
3548
3539
llvm::MCSymbol *DwarfDebug::GetLabelBeforeIp (unsigned int ip) {
3549
3540
auto it = LabelsBeforeIp.find (ip);
0 commit comments