diff options
author | Lang Hames <lhames@gmail.com> | 2013-02-11 23:44:11 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2013-02-11 23:44:11 +0000 |
commit | 5824a4f1b0962bfe7a80d382d0ed9ce2050d3d88 (patch) | |
tree | 3e8c7035e7476cda708d7f8f5d0bf184aebd6d32 /clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp | |
parent | d7fe06f274a6cf19f30e9cad88f5b7e62df1fce6 (diff) | |
download | bcm5719-llvm-5824a4f1b0962bfe7a80d382d0ed9ce2050d3d88.tar.gz bcm5719-llvm-5824a4f1b0962bfe7a80d382d0ed9ce2050d3d88.zip |
When generating IR for default copy-constructors, copy-assignment operators,
move-constructors and move-assignment operators, use memcpy to copy adjacent
POD members.
Previously, classes with one or more Non-POD members would fall back on
element-wise copies for all members, including POD members. This often
generated a lot of IR. Without padding metadata, it wasn't often possible
for the LLVM optimizers to turn the element-wise copies into a memcpy.
This code hasn't yet received any serious tuning. I didn't see any serious
regressions on a self-hosted clang build, or any of the nightly tests, but
I think it's important to get this out in the wild to get more testing.
Insights, feedback and comments welcome.
Many thanks to David Blaikie, Richard Smith, and especially John McCall for
their help and feedback on this work.
llvm-svn: 174919
Diffstat (limited to 'clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp b/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp index 0ec89fceec5..79586fba9af 100644 --- a/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp +++ b/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp @@ -44,7 +44,7 @@ void test_D(D d1, D d2) { // CHECK: {{call.*_ZN1AaSERS_}} // CHECK: {{call.*_ZN1BaSERS_}} // CHECK: {{call.*_ZN1CaSERKS_}} -// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 24}} +// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 28}} // CHECK: {{call.*_ZN1BaSERS_}} // CHECK: br // CHECK: {{call.*_ZN1CaSERKS_}} |