[Lldb-commits] [PATCH] D47791: Initial support for Hexagon target.

2018-06-05 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added inline comments. Comment at: ELF/Arch/Hexagon.cpp:46 + + for (size_t Bit = 0; Bit != sizeof(uint32_t) * 8; ++Bit) { +const bool ValBit = (Data >> Off) & 1; sizeof(uint32_t) * 8 is always 32. Comment at: ELF/Arch/Hexagon.cpp:77

[Lldb-commits] [PATCH] D47791: Initial support for Hexagon target.

2018-06-05 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added inline comments. Comment at: ELF/Arch/Hexagon.cpp:47 + for (size_t Bit = 0; Bit != 32; ++Bit) { +const bool ValBit = (Data >> Off) & 1; +const bool MaskBit = (Mask >> Bit) & 1; We normally don't add `const` if the variable's scope is narrow.

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-11-30 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. But 2GB is perhaps still too big and I guess a large part of it can be for dead sections. If we fix this, I'd like to fix it in a proper way so that we can completely eliminate debug info for dead sections. rocallahan, can I ask why Rust passes all object files to the

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-12-04 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. It seems to me that just adding `--start-lib` to his command line can fix the issue, so I'm waiting for Robert's response. If it doesn't work for some reason, we can analyze why it doesn't work and then discuss what we can do for his problem. Repository: rLLD LLVM

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-11-28 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. Thank you for the patch. What you are doing in this patch is not too complicated and makes sense to me. That said, if actual size saving is not significant as you said in https://github.com/rust-lang/rust/issues/56068#issuecomment-440160568, it may not be worth doing. It

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-25 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. I committed https://reviews.llvm.org/D59800 which I believe makes your change easier to follow once rebased. Could you rebase it and upload a patch? Thanks! Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-25 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added inline comments. Comment at: lld/ELF/MarkLive.cpp:190 +template static void setSectionLive(InputSectionBase *Sec) { + Sec->Live = true; Since this file is MarkLive, markSection is perhaps a better name. Comment at:

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-25 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added inline comments. Comment at: lld/ELF/MarkLive.cpp:192 + Sec->Live = true; + if (Sec->kind() != SectionBase::Kind::Regular && + Sec->kind() != SectionBase::Kind::Merge) rocallahan wrote: > ruiu wrote: > > rocallahan wrote: > > > MaskRay wrote: >

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-10 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM I'd write a comment explaining why we are handling debug sections in a special way, but that can be done later. Please submit. Thank you for doing this! CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-10 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. I will do that. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/ https://reviews.llvm.org/D54747 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-10 Thread Rui Ueyama via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358069: Discard debuginfo for object files empty after GC (authored by ruiu, committed by ). Changed prior to commit: https://reviews.llvm.org/D54747?vs=194255=194469#toc Repository: rL LLVM

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-08 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. Nice. One more thing you might want to try is to add `-O2` to the linker command line option. When that option is given, lld attempts to tail-merge strings in the string table. That's not very effective, but you might be able to shave off 0.2% or something like that.

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-09 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added inline comments. Comment at: lld/ELF/MarkLive.cpp:190-191 + // case we still need to mark the file. + if (S && !IsLSDA && Sec->File) +if (isa(Sec) || isa(Sec)) + Sec->getFile()->HasLiveCodeOrData = true; rocallahan wrote: > ruiu wrote: > >

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-08 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. Overall looking good. Comment at: lld/ELF/MarkLive.cpp:190 + // case we still need to mark the file. + if (S && !IsLSDA && Sec->File) +if (isa(Sec) || isa(Sec)) ruiu wrote: > S is true only when it is an InputSection, so you have

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-05-17 Thread Rui Ueyama via Phabricator via lldb-commits
ruiu added a comment. Bob, thank you for reverting this. So, Robert, looks like this idea didn't work well. We need a different solution. And perhaps a better approach is to use --start-lib and --end-lib. You found that these options didn't work well for your input, but I don't fully