[PATCH] D12139: Add 'strlen' formation to LoopIdiomRecognize

Nick Lewycky via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 23:56:54 PDT 2015


nlewycky created this revision.
nlewycky added a subscriber: llvm-commits.
nlewycky set the repository for this revision to rL LLVM.

This recognizer finds loops of the form:
    for (const char *ptr = p; *ptr; ++ptr, ++len)
      /*empty*/ ;
and converts them into calls to strlen().


Repository:
  rL LLVM

http://reviews.llvm.org/D12139

Files:
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  test/Transforms/LoopIdiom/strlen.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12139.32510.patch
Type: text/x-patch
Size: 9252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150819/62af9ffd/attachment.bin>


More information about the llvm-commits mailing list