Recommit r348806: DebugInfo: Use symbol difference for CU length to simplify...
Recommit r348806: DebugInfo: Use symbol difference for CU length to simplify assembly reading/editing Mucking about simplifying a test case ( https://reviews.llvm.org/D55261 ) I stumbled across something I've hit before - that LLVM's (GCC's does too, FWIW) assembly output includes a hardcode length for a DWARF unit in its header. Instead we could emit a label difference - making the assembly easier to read/edit (though potentially at a slight (I haven't tried to observe it) performance cost of delaying/sinking the length computation into the MC layer). Fix: Predicated all the changes (including creating the labels, even if they aren't used/needed) behind the NVPTX useSectionsAsReferences, avoiding emitting labels in NVPTX where ptxas can't parse them. Reviewers: JDevlieghere, probinson, ABataev Differential Revision: https://reviews.llvm.org/D55281 llvm-svn: 349430
Showing
- llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp 3 additions, 0 deletionsllvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
- llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp 8 additions, 1 deletionllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
- llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h 4 additions, 0 deletionsllvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
- llvm/test/DebugInfo/X86/length_symbol_difference.ll 30 additions, 0 deletionsllvm/test/DebugInfo/X86/length_symbol_difference.ll
Please register or sign in to comment