[PATCH] D32839: SimplifyLibCalls: Optimize wcslen
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 16:45:16 PDT 2017
MatzeB created this revision.
Herald added a subscriber: mcrosier.
Refactor the strlen optimization code to work for both strlen and wcslen.
This especially helps with programs in the wild where people pass `L"string"`s to `const std::wstring&` function parameters and the wstring constructor gets inlined.
Repository:
rL LLVM
https://reviews.llvm.org/D32839
Files:
include/llvm/Analysis/ValueTracking.h
include/llvm/IR/Constants.h
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Analysis/ValueTracking.cpp
lib/IR/Constants.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/wcslen.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32839.97748.patch
Type: text/x-patch
Size: 22562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170503/593ba78e/attachment.bin>
More information about the llvm-commits
mailing list