[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-19 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325478: [CodeGen] Initialize large arrays by copying from a global (authored by kosarev, committed by ). Changed prior to commit: https://reviews.llvm.org/D43181?vs=134590&id=134865#toc Repository: r

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-16 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks! https://reviews.llvm.org/D43181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-16 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 134590. kosarev added a comment. Updated to consider the total size of the explicit initializers instead of their number. The threshold value is adjusted respectively. https://reviews.llvm.org/D43181 Files: lib/CodeGen/CGExprAgg.cpp test/CodeGen/init.c

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:421 + // with explicit initializers should be large enough. + if (NumInitElements > 8 && elementType->isBuiltinType()) { +CodeGen::CodeGenModule &CGM = CGF.CGM; kosarev wrote: > rjmccall

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-13 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 134042. kosarev added a comment. Improved as suggested to cover all trivially-copyable types. https://reviews.llvm.org/D43181 Files: lib/CodeGen/CGExprAgg.cpp test/CodeGen/init.c Index: test/CodeGen/init.c ==

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-13 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:421 + // with explicit initializers should be large enough. + if (NumInitElements > 8 && elementType->isBuiltinType()) { +CodeGen::CodeGenModule &CGM = CGF.CGM; rjmccall wrote: > Is there

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:421 + // with explicit initializers should be large enough. + if (NumInitElements > 8 && elementType->isBuiltinType()) { +CodeGen::CodeGenModule &CGM = CGF.CGM; Is there a good reason to

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-12 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added a reviewer: rjmccall. kosarev added a project: clang. Herald added a subscriber: llvm-commits. Currently, clang compiles explicit initializers for array elements into series of store instructions. For large arrays of built-in types this results in blo