[llvm-commits] [llvm] r151852 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/X86/stringpool.ll
Eric Christopher
echristo at apple.com
Thu Mar 1 14:50:31 PST 2012
Author: echristo
Date: Thu Mar 1 16:50:31 2012
New Revision: 151852
URL: http://llvm.org/viewvc/llvm-project?rev=151852&view=rev
Log:
Reorder the sections being output to reduce the number of assembler
fixups that are being used to determine section offsets. Reduces
the total number of fixups by 50% for a non-trivial testcase.
Part of rdar://10413936
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/test/DebugInfo/X86/stringpool.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=151852&r1=151851&r2=151852&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Mar 1 16:50:31 2012
@@ -804,6 +804,9 @@
// Compute DIE offsets and sizes.
computeSizeAndOffsets();
+ // Emit info into a debug str section.
+ emitDebugStr();
+
// Emit all the DIEs into a debug info section
emitDebugInfo();
@@ -836,9 +839,6 @@
// Emit inline info.
emitDebugInlineInfo();
- // Emit info into a debug str section.
- emitDebugStr();
-
// clean up.
DeleteContainerSeconds(DeadFnScopeMap);
SPMap.clear();
Modified: llvm/trunk/test/DebugInfo/X86/stringpool.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stringpool.ll?rev=151852&r1=151851&r2=151852&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/stringpool.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/stringpool.ll Thu Mar 1 16:50:31 2012
@@ -14,6 +14,14 @@
!6 = metadata !{i32 720937, metadata !"z.c", metadata !"/home/nicholas", null} ; [ DW_TAG_file_type ]
!7 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+; Verify that "yyyy" ended up in the stringpool.
+; LINUX: .section .debug_str,"MS", at progbits,1
+; LINUX: yyyy
+; LINUX: .section .debug_info
+; DARWIN: .section __DWARF,__debug_str,regular,debug
+; DARWIN: yyyy
+; DARWIN: .section __DWARF,__debug_info
+
; Verify that we refer to 'yyyy' with a relocation.
; LINUX: .long .Lstring3 # DW_AT_name
; LINUX-NEXT: .long 39 # DW_AT_type
@@ -34,11 +42,3 @@
; DARWIN-NEXT: .byte 9 ## DW_AT_location
; DARWIN-NEXT: .byte 3
; DARWIN-NEXT: .quad _yyyy
-
-; Verify that "yyyy" ended up in the stringpool.
-; LINUX: .section .debug_str,"MS", at progbits,1
-; LINUX-NOT: .section
-; LINUX: yyyy
-; DARWIN: .section __DWARF,__debug_str,regular,debug
-; DARWIN-NOT: .section
-; DARWIN: yyyy
More information about the llvm-commits
mailing list