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

Alex Rosenberg via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 13:31:15 PDT 2015


alexr added a subscriber: alexr.
alexr added a comment.

This makes me very nervous. We have fielded a lot of user complaints about canonicalizing loops into memcpy calls. strlen feels like a more dubious choice.

My past experience writing SIMD versions of string functions tells me that the typical string length that strlen is tuned for may be very different from the amount of data an open-coded loop is intended to handle.

I would want to see very tuned lowering code to go with this. I'd also very much like to see the lowering code pay attention to target-specific cost information such as the possible cost to cross a dynamic library boundary when weighing the lowering of a call vs expanding inline.


Repository:
  rL LLVM

http://reviews.llvm.org/D12139





More information about the llvm-commits mailing list