[llvm-commits] [llvm] r151097 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp test/DebugInfo/X86/DW_AT_specification.ll test/DebugInfo/X86/concrete_out_of_line.ll test/DebugInfo/X86/pr11300.ll

Eric Christopher echristo at apple.com
Tue Feb 21 14:25:54 PST 2012


Author: echristo
Date: Tue Feb 21 16:25:53 2012
New Revision: 151097

URL: http://llvm.org/viewvc/llvm-project?rev=151097&view=rev
Log:
There's no need for a DW_AT_byte_size on a pointer type.

Part of rdar://10493979 where it reduces by about .5% (10k)

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    llvm/trunk/test/DebugInfo/X86/DW_AT_specification.ll
    llvm/trunk/test/DebugInfo/X86/concrete_out_of_line.ll
    llvm/trunk/test/DebugInfo/X86/pr11300.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=151097&r1=151096&r2=151097&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Feb 21 16:25:53 2012
@@ -723,7 +723,7 @@
     addString(&Buffer, dwarf::DW_AT_name, Name);
 
   // Add size if non-zero (derived types might be zero-sized.)
-  if (Size)
+  if (Size && Tag != dwarf::DW_TAG_pointer_type)
     addUInt(&Buffer, dwarf::DW_AT_byte_size, 0, Size);
 
   // Add source line info if available and TyDesc is not a forward declaration.

Modified: llvm/trunk/test/DebugInfo/X86/DW_AT_specification.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/DW_AT_specification.ll?rev=151097&r1=151096&r2=151097&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/DW_AT_specification.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/DW_AT_specification.ll Tue Feb 21 16:25:53 2012
@@ -4,7 +4,7 @@
 ; test that the DW_AT_specification is a back edge in the file.
 
 ; CHECK: 0x00000038: DW_TAG_subprogram [5] *
-; CHECK: 0x00000060: DW_AT_specification [DW_FORM_ref4]      (cu + 0x0038 => {0x00000038})
+; CHECK: 0x0000005f: DW_AT_specification [DW_FORM_ref4]      (cu + 0x0038 => {0x00000038})
 
 
 @_ZZN3foo3barEvE1x = constant i32 0, align 4

Modified: llvm/trunk/test/DebugInfo/X86/concrete_out_of_line.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/concrete_out_of_line.ll?rev=151097&r1=151096&r2=151097&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/concrete_out_of_line.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/concrete_out_of_line.ll Tue Feb 21 16:25:53 2012
@@ -7,7 +7,7 @@
 ; first check that we have a TAG_subprogram at a given offset and it has
 ; AT_inline.
 
-; CHECK: 0x00000136:   DW_TAG_subprogram
+; CHECK: 0x00000134:   DW_TAG_subprogram
 ; CHECK-NEXT:     DW_AT_MIPS_linkage_name
 ; CHECK-NEXT:     DW_AT_specification
 ; CHECK-NEXT:     DW_AT_inline
@@ -15,8 +15,8 @@
 
 ; and then that a TAG_subprogram refers to it with AT_abstract_origin.
 
-; CHECK: 0x00000186:   DW_TAG_subprogram
-; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4]    (cu + 0x0136 => {0x00000136})
+; CHECK: 0x00000184:   DW_TAG_subprogram
+; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4]    (cu + 0x0134 => {0x00000134})
 
 define i32 @_ZN17nsAutoRefCnt7ReleaseEv() {
 entry:

Modified: llvm/trunk/test/DebugInfo/X86/pr11300.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr11300.ll?rev=151097&r1=151096&r2=151097&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/pr11300.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/pr11300.ll Tue Feb 21 16:25:53 2012
@@ -4,7 +4,7 @@
 ; test that the DW_AT_specification is a back edge in the file.
 
 ; CHECK: 0x0000005b:     DW_TAG_subprogram [5]
-; CHECK: 0x0000007d:     DW_AT_specification [DW_FORM_ref4]      (cu + 0x005b => {0x0000005b})
+; CHECK: 0x0000007c:     DW_AT_specification [DW_FORM_ref4]      (cu + 0x005b => {0x0000005b})
 
 %struct.foo = type { i8 }
 





More information about the llvm-commits mailing list