[PATCH] D44968: [ObjC] Generalize NRVO to cover C structs
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 28 12:21:06 PDT 2018
ahatanak updated this revision to Diff 140119.
ahatanak marked an inline comment as done.
ahatanak retitled this revision from "[ObjC] Generalize NRVO to cover non-trivial C structs" to "[ObjC] Generalize NRVO to cover C structs".
ahatanak added a comment.
Herald added subscribers: kbarton, aheejin, sbc100, javed.absar, nemanjai.
Yes, it's possible to do this for all C structs. It removes lots of alloca and memcpy instructions in the IR.
Repository:
rC Clang
https://reviews.llvm.org/D44968
Files:
lib/CodeGen/CGDecl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaStmt.cpp
test/CodeGen/64bit-swiftcall.c
test/CodeGen/aarch64-neon-perm.c
test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
test/CodeGen/aggregate-assign-call.c
test/CodeGen/arm-swiftcall.c
test/CodeGen/arm_neon_intrinsics.c
test/CodeGen/atomic-ops.c
test/CodeGen/ppc64-align-struct.c
test/CodeGen/wasm-varargs.c
test/CodeGen/windows-swiftcall.c
test/CodeGenObjC/objc-non-trivial-struct-nrvo.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44968.140119.patch
Type: text/x-patch
Size: 204962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180328/07a54641/attachment-0001.bin>
More information about the cfe-commits
mailing list