aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.h
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-07-17 17:20:02 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2020-07-30 18:01:33 +0200
commitab0edbcb371cce5f82136f20ad45155c003d4982 (patch)
tree2601487ec66c374c0560c25a47ce266cbbd7bc2b /gcc/builtins.h
parentdc60d67674dd809fd5d57390e1360436351ae7ae (diff)
downloadgcc-ab0edbcb371cce5f82136f20ad45155c003d4982.zip
gcc-ab0edbcb371cce5f82136f20ad45155c003d4982.tar.gz
gcc-ab0edbcb371cce5f82136f20ad45155c003d4982.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/builtins.h')
0 files changed, 0 insertions, 0 deletions