New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm-gcc emits twice as much debug info when compiling instcombine at -O0 -g than GCC #2854
Comments
Too much info is bad? :) Ok, I have no idea for this bug, but I guess, that we're just not using abbrevs everywhere. |
It seems this is only true for c++ code. |
Ok, looks like we are emitting debug info for symbols that are not used: @llvm.dbg.subprogram1045 = internal constant %llvm.dbg.subprogram.type { => |
The real problem is there are a ton of duplicates. @llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { @llvm.dbg.global_variable189 = internal constant %llvm.dbg.global_variable.type { |
g++ does like to output an initial form of a global variable |
After this patch: I got: Segment : 1796897 My gcc-4.2 numbers are different from Chris': Segment : 1751265 We are now generating less debug info than gcc 4.2. |
I'll close this now. There are additional refinements to be made but they are no as critical as this one. |
Extended Description
When compiling instcombine at -O0 -g with llvm-g++ we get almost twice as much debug info as GCC produces:
gcc 4.2:
Section (__DWARF, __debug_info): 671478
Section (__DWARF, __debug_line): 126106
llvm-gcc 4.2:
Section (__DWARF, __debug_info): 1240778
Section (__DWARF, __debug_line): 149797
The text was updated successfully, but these errors were encountered: