This is an archive of the discontinued LLVM Phabricator instance.

Use comdats to avoid double initialization of weak data
ClosedPublic

Authored by rnk on May 16 2014, 2:47 PM.

Details

Summary

Initializers of global data that can appear multiple TUs (static data
members of class templates or __declspec(selectany) data) are now in a
comdat group keyed on the global variable being initialized. On
non-Windows platforms, this is a code size and startup time
optimization. On Windows, this is necessary for ABI compatibility with
MSVC.

Fixes PR16959.

Diff Detail

Event Timeline

rnk updated this revision to Diff 9497.May 16 2014, 2:47 PM
rnk retitled this revision from to Use comdats to avoid double initialization of weak data.
rnk updated this object.
rnk added a reviewer: rsmith.
rnk added a subscriber: Unknown Object (MLST).
rsmith accepted this revision.May 22 2014, 5:45 PM
rsmith edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 22 2014, 5:45 PM
rnk closed this revision.May 23 2014, 2:21 PM
rnk updated this revision to Diff 9779.

Closed by commit rL209555 (authored by @rnk).