summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-03-08 21:15:26 +0000
committerVedant Kumar <vsk@apple.com>2018-03-08 21:15:26 +0000
commitfb36d079e57cf56819bfbc1a1c2c8282accb58d5 (patch)
treee6c0479098c548f7401804fc5f5580c7573ea0ee /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent145bc6e0d35cc456d5f0239d22566190780b057e (diff)
downloadbcm5719-llvm-fb36d079e57cf56819bfbc1a1c2c8282accb58d5.tar.gz
bcm5719-llvm-fb36d079e57cf56819bfbc1a1c2c8282accb58d5.zip
Low-hanging fruit optimization in string::__move_assign().
shrink_to_fit() ends up doing a lot work to get information that we already know since we just called clear(). This change seems concise enough to be worth the couple extra lines and my benchmarks show that it is indeed a pretty decent win. It looks like the same thing is going on twice in __copy_assign_alloc(), but I didn't want to go overboard since this is my first contribution to llvm/libc++. Patch by Timothy VanSlyke! Differential Revision: https://reviews.llvm.org/D41976 llvm-svn: 327064
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud