[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-09 Thread Matt Davis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324776: [CodeGen] Use the zero initializer instead of storing an all zero… (authored by mattd, committed by ). Repository: rC Clang https://reviews.llvm.org/D42549 Files:

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-08 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. No worries. LGTM! https://reviews.llvm.org/D42549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-08 Thread Matt Davis via Phabricator via cfe-commits
mattd updated this revision to Diff 133540. mattd added a comment. Thanks for the test tips. I realize the original was a bit carried away, my apologies for that. This updated test visits the same code path that we're trying to test, and is much more concise.

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh. It's not a good idea to try to match exact local IR names like this for two reasons: - First, many IR names are different in builds with and without assertions. - Second, it's pretty susceptible to innocuous changes in output. You should use FileCheck patterns

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-08 Thread Matt Davis via Phabricator via cfe-commits
mattd updated this revision to Diff 133497. mattd added a comment. Thanks for the look @rjmccall . I tossed in the shortcut as you suggested. I also had to fix the instruction numbering in the test case. https://reviews.llvm.org/D42549 Files: lib/CodeGen/CGExprConstant.cpp

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm somewhat surprised LLVM doesn't already canonicalize this, but ok. Should we also do this when building a constant struct? Comment at: lib/CodeGen/CGExprConstant.cpp:873 Elts.push_back(C); + if (!C->isNullValue()) +

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-02-01 Thread Matt Davis via Phabricator via cfe-commits
mattd added a comment. Ping :) https://reviews.llvm.org/D42549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42549: [CodeGen] Use the zero initializer instead of storing an all zero representation.

2018-01-25 Thread Matt Davis via Phabricator via cfe-commits
mattd created this revision. mattd added a reviewer: majnemer. This change avoids the overhead of storing, and later crawling, an initializer list of all zeros for arrays. When LLVM visits this (llvm/IR/Constants.cpp) ConstantArray::getImpl() it will scan the list looking for an array of all