[llvm] r196394 - DebugInfo: Remove unused start/end labels for the debug_abbrevs section

David Blaikie dblaikie at gmail.com
Wed Dec 4 15:43:38 PST 2013


On Wed, Dec 4, 2013 at 3:31 PM, Robinson, Paul
<Paul_Robinson at playstation.sony.com> wrote:
>> -----Original Message-----
>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
>> bounces at cs.uiuc.edu] On Behalf Of David Blaikie
>> Sent: Wednesday, December 04, 2013 10:12 AM
>> To: llvm-commits at cs.uiuc.edu
>> Subject: [llvm] r196394 - DebugInfo: Remove unused start/end labels for
>> the debug_abbrevs section
>>
>> Author: dblaikie
>> Date: Wed Dec  4 12:12:28 2013
>> New Revision: 196394
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=196394&view=rev
>> Log:
>> DebugInfo: Remove unused start/end labels for the debug_abbrevs section
>>
>> Since we always emit only one abbrevation section (shared by all the
>> compilation units in this module) there's no need for a separate label
>> at the start of each one (and we weren't using the CU ID anyway, so
>> there really was only one label). Use the section label instead and drop
>> the wholely unused debug_abbrev_end label.
>>
>> Modified:
>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=196394&r1=1
>> 96393&r2=196394&view=diff
>> ========================================================================
>> ======
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Dec  4 12:12:28
>> 2013
>> @@ -2186,9 +2186,6 @@ void DwarfDebug::emitAbbrevs(const MCSec
>>      // Start the debug abbrev section.
>>      Asm->OutStreamer.SwitchSection(Section);
>>
>> -    MCSymbol *Begin = Asm->GetTempSymbol(Section->getLabelBeginName());
>> -    Asm->OutStreamer.EmitLabel(Begin);
>> -
>>      // For each abbrevation.
>>      for (unsigned i = 0, N = Abbrevs->size(); i < N; ++i) {
>>        // Get abbreviation data
>> @@ -2203,9 +2200,6 @@ void DwarfDebug::emitAbbrevs(const MCSec
>>
>>      // Mark end of abbreviations.
>>      Asm->EmitULEB128(0, "EOM(3)");
>> -
>> -    MCSymbol *End = Asm->GetTempSymbol(Section->getLabelEndName());
>> -    Asm->OutStreamer.EmitLabel(End);
>>    }
>>  }
>>
>>
>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=196394&r1=19
>> 6393&r2=196394&view=diff
>> ========================================================================
>> ======
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Wed Dec  4 12:12:28
>> 2013
>> @@ -1980,8 +1980,10 @@ void Unit::emitHeader(const MCSection *A
>>    Asm->OutStreamer.AddComment("DWARF version number");
>>    Asm->EmitInt16(DD->getDwarfVersion());
>>    Asm->OutStreamer.AddComment("Offset Into Abbrev. Section");
>> -  Asm->EmitSectionOffset(Asm->GetTempSymbol(ASection-
>> >getLabelBeginName()),
>> -                         ASectionSym);
>> +  // We share one abbreviations table across all compilation units so
>> it's
>
> Shared across all units, not just compilation units?
> (Unless comdat type units get their own abbrev tables...)

Right you are. Fixed in r196433.

Thanks!
- David



More information about the llvm-commits mailing list