[PATCH] D18230: [SimplifyLibCalls] Simplify strlen to a subtraction for certain cases

Li Huang via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 20:31:03 PDT 2016


lihuang updated this revision to Diff 53356.
lihuang added a comment.

Updated the changed. Added a helper function in ValueTracking.cpp/h to check if a given GEP is based on a pointer to string and is indexing into that string. This helper function can be used by both getConstantStringInfo() and optimizeStrlen().


http://reviews.llvm.org/D18230

Files:
  include/llvm/Analysis/ValueTracking.h
  lib/Analysis/ValueTracking.cpp
  lib/Transforms/Utils/SimplifyLibCalls.cpp
  test/Transforms/InstCombine/strlen-1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18230.53356.patch
Type: text/x-patch
Size: 7586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160412/9d1abff0/attachment.bin>


More information about the llvm-commits mailing list