summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-05-21 11:47:45 +0000
committerPavel Labath <labath@google.com>2018-05-21 11:47:45 +0000
commitb3b0255df97c28731eb000c766bf79c30b760b49 (patch)
tree4ae7eda8e907f17962084d69166d65fe24a5c5ec /llvm/lib/Support/CommandLine.cpp
parente4a12cfa2fa77bfe2bca79823d75f2f4ddcecb8c (diff)
downloadbcm5719-llvm-b3b0255df97c28731eb000c766bf79c30b760b49.tar.gz
bcm5719-llvm-b3b0255df97c28731eb000c766bf79c30b760b49.zip
[CodeGen] Disable aggressive structor optimizations at -O0, take 2
The first version of the patch (r332228) was flawed because it was putting structors into C5/D5 comdats very eagerly. This is correct only if we can ensure the comdat contains all required versions of the structor (which wasn't the case). This version uses a more nuanced approach: - for local structor symbols we use an alias because we don't have to worry about comdats or other compilation units. - linkonce symbols are emitted separately, as we cannot guarantee we will have all symbols we need to form a comdat (they are emitted lazily, only when referenced). - available_externally symbols are also emitted separately, as the code seemed to be worried about emitting an alias in this case. - other linkage types are not affected by the optimization level. They either get put into a comdat (weak) or get aliased (external). Reviewers: rjmccall, aprantl Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46685 llvm-svn: 332839
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud