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

Li Huang via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 17:03:19 PDT 2016


lihuang added a comment.

We only do this optimization when s is a string literal, so that strlen(s) could be computed at compile time. The motivation is, this could save some function calls, and gcc has this optimization.


http://reviews.llvm.org/D18230





More information about the llvm-commits mailing list