summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-04-17 22:20:57 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-04-17 22:20:57 +0000
commit83f78a459a28705a2df8181d68cbfeaf4a30c0e0 (patch)
treea6a88e4905113d7d24eae675bbee33e689ceff9e /llvm/lib/MC/MCStreamer.cpp
parent635b509dee6aa29a1524fa76aacf418a44448c77 (diff)
downloadbcm5719-llvm-83f78a459a28705a2df8181d68cbfeaf4a30c0e0.tar.gz
bcm5719-llvm-83f78a459a28705a2df8181d68cbfeaf4a30c0e0.zip
[MemCpyOpt] Optimize double-storing by memset+memcpy.
A common idiom in some code is to do the following: memset(dst, 0, dst_size); memcpy(dst, src, src_size); Some of the memset is redundant; instead, we can do: memcpy(dst, src, src_size); memset(dst + src_size, 0, dst_size <= src_size ? 0 : dst_size - src_size); Original patch by: Joel Jones Differential Revision: http://reviews.llvm.org/D498 llvm-svn: 235232
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud