summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/float16-declarations.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 /clang/test/CodeGenCXX/float16-declarations.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 'clang/test/CodeGenCXX/float16-declarations.cpp')
-rw-r--r--clang/test/CodeGenCXX/float16-declarations.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/float16-declarations.cpp b/clang/test/CodeGenCXX/float16-declarations.cpp
index e82c05ec8c8..1d6999fef07 100644
--- a/clang/test/CodeGenCXX/float16-declarations.cpp
+++ b/clang/test/CodeGenCXX/float16-declarations.cpp
@@ -103,7 +103,7 @@ int main(void) {
C1 c1(f1l);
// CHECK-DAG: [[F1L:%[a-z0-9]+]] = load half, half* %{{.*}}, align 2
-// CHECK-DAG: call void @_ZN2C1C2EDF16_(%class.C1* %{{.*}}, half %{{.*}})
+// CHECK-DAG: call void @_ZN2C1C1EDF16_(%class.C1* %{{.*}}, half %{{.*}})
S1<_Float16> s1 = { 132.f16 };
// CHECK-DAG: @_ZZ4mainE2s1 = private unnamed_addr constant %struct.S1 { half 0xH5820 }, align 2
OpenPOWER on IntegriCloud