This is an archive of the discontinued LLVM Phabricator instance.

[lld][test][ELF] Expand a couple of test cases for LTO behaviour
ClosedPublic

Authored by jhenderson on Sep 22 2020, 6:41 AM.

Details

Summary

This patch expands two LTO test cases to check other aspects.

  1. weak.ll has been expanded to show that it doesn't matter whether the first appearance of a weak symbol appears in a bitcode file or native object - that one is picked.
  2. reproduce-lto.ll has been expanded to show that the bitcode files are stored in the reproduce package and that intermediate files (such as the LTO-compiled object) are not.

Diff Detail

Event Timeline

jhenderson created this revision.Sep 22 2020, 6:41 AM
jhenderson requested review of this revision.Sep 22 2020, 6:41 AM
grimar accepted this revision.Sep 22 2020, 7:33 AM

LGTM with a comment added. Please wait for @MaskRay.

lld/test/ELF/lto/weak.ll
10

nit: I was a bit confused looking at these names at first. I searched for 3.ll for some time until realized the naming rule used.
Perhaps, size1.ll, size2.ll and size4.ll names (and the same for *.bc) could be a bit clearer. Though, now I am fine with original naming too, so up to you.

lld/test/ELF/reproduce-lto.s
6

I'd suggest adding a comment about what exactly is tested while are you here.
Like is said in the description probably:
"Show that the bitcode files are stored in the reproduce package and that intermediate files (such as the LTO-compiled object) are not".

This revision is now accepted and ready to land.Sep 22 2020, 7:33 AM
jhenderson marked an inline comment as done.

Rename test inputs and add comment.

MaskRay accepted this revision.Sep 23 2020, 8:25 AM

LGTM.