diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-05-16 01:32:26 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-05-16 01:32:26 +0000 |
commit | f8fa3b8d4bf52469849cce574134c903ea58ed7d (patch) | |
tree | 5d558a7588426cebd1ec9fa8cbad7ee4d6e22f9c /clang/lib/Lex/ModuleMap.cpp | |
parent | f956a49e6da306c9ec3ac805822035043626481c (diff) | |
download | bcm5719-llvm-f8fa3b8d4bf52469849cce574134c903ea58ed7d.tar.gz bcm5719-llvm-f8fa3b8d4bf52469849cce574134c903ea58ed7d.zip |
[MemCpyOpt] Turn memcpy from just-memset'd source into memset.
There's no point in copying around constants, so, when all else fails,
we can still transform memcpy of memset into two independent memsets.
To quote the example, we can turn:
memset(dst1, c, dst1_size);
memcpy(dst2, dst1, dst2_size);
into:
memset(dst1, c, dst1_size);
memset(dst2, c, dst2_size);
When dst2_size <= dst1_size.
Like r235232 for copy constructors, this can occur in move constructors.
Differential Revision: http://reviews.llvm.org/D9682
llvm-svn: 237506
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions