This is an archive of the discontinued LLVM Phabricator instance.

Make internal/private GVs implicitly dso_local
ClosedPublic

Authored by espindola on Jan 8 2018, 7:26 PM.

Details

Summary

While updating the tests for https://reviews.llvm.org/D41318 I noticed that:

  • There are *a lot* of tests to update.
  • Many of the updates are redundant.

They are redundant because a GV is "obviously dso_local". This patch starts formalizing that a bit by requiring that internal and private GVs be dso_local too. Since they all are, we don't have to print dso_local to the textual representation, making it a bit more compact and easier to read.

Diff Detail

Event Timeline

espindola created this revision.Jan 8 2018, 7:26 PM

Rebased. Remove a case that is now redundant from TargetMachine::shouldAssumeDSOLocal.

This is a really good idea, LGTM.

llvm/lib/AsmParser/LLParser.cpp
829

We should probably add a short comment explaining why we only set this when its true now, since from here its not obvious that setting the linkage may have already set it to local.

llvm/test/Bitcode/thinlto-summary-section.ll
7

This should say `Flags should be 0x57 (87) for ...,

espindola accepted this revision.Jan 11 2018, 2:20 PM

r322317 and r322318.

This revision is now accepted and ready to land.Jan 11 2018, 2:20 PM
espindola closed this revision.Jan 11 2018, 2:21 PM