diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-07-17 17:20:02 +0200 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:20:17 -0300 |
commit | aa68ce4e740c2c579fb778d6c2f39ca7307fc1d1 (patch) | |
tree | 6dbb3de931155331185247ec9b8a27b6eee1cb95 /gcc/cp/constexpr.c | |
parent | f1e8a2d8ba017163213f25ac2caacc112e372530 (diff) | |
download | gcc-aa68ce4e740c2c579fb778d6c2f39ca7307fc1d1.zip gcc-aa68ce4e740c2c579fb778d6c2f39ca7307fc1d1.tar.gz gcc-aa68ce4e740c2c579fb778d6c2f39ca7307fc1d1.tar.bz2 |
d: Refactor use of built-in memcmp/memcpy/memset into helper functions.
Generating calls to memset, memcpy, and memcmp is frequent enough that
it becomes beneficial to put them into their own routine. All parts of
the front-end have been updated to call the new helper functions instead
of doing it themselves.
gcc/d/ChangeLog:
* d-codegen.cc (build_memcmp_call): New function.
(build_memcpy_call): New function.
(build_memset_call): New function.
(build_float_identity): Call build_memcmp_call.
(lower_struct_comparison): Likewise.
(build_struct_comparison): Likewise.
* d-tree.h (build_memcmp_call): Declare.
(build_memcpy_call): Declare.
(build_memset_call): Declare.
* expr.cc (ExprVisitor::visit (EqualExp *)): Call build_memcmp_call.
(ExprVisitor::visit (AssignExp *)): Call build_memset_call.
(ExprVisitor::visit (ArrayLiteralExp *)): Call build_memcpy_call.
(ExprVisitor::visit (StructLiteralExp *)): Call build_memset_call.
Diffstat (limited to 'gcc/cp/constexpr.c')
0 files changed, 0 insertions, 0 deletions