[PATCH] D55309: ThinLTO: Do not import debug info for imported global constants

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 08:27:00 PST 2018


dblaikie added a comment.

In D55309#1319764 <https://reviews.llvm.org/D55309#1319764>, @evgeny777 wrote:

> Hello David,
>
> This is an example of importing read-only GV:
>
>   // main.c
>   extern int foo;
>   int main() { return foo; }
>
>
>   // foo.c
>   int foo = 42;
>
>
> The variable `foo` is imported to main TU and internalized.


Could you tell me the commands I need to run to test this? (I guess in this case I'd have to pass some whitelist of exported functions, so llvm could prove the variable wasn't modified/queried elsewhere)

Will this optimization result in the variable not being emitted into for.c's object file? Or will it still be emitted there, but possibly go unused?

> I don't know if/how importing variable list from `DICompileUnit` improves debugging experience.  What's your concern? Executable size?

I'm investigating/trying to address significant regressions in object size, executable size, dwp size, symbolizing performance Caused by this change in thinlto debug info.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55309/new/

https://reviews.llvm.org/D55309





More information about the llvm-commits mailing list