[llvm-commits] [llvm] r126103 - /llvm/trunk/lib/Target/README.txt

Chris Lattner sabre at nondot.org
Sun Feb 20 18:13:39 PST 2011


Author: lattner
Date: Sun Feb 20 20:13:39 2011
New Revision: 126103

URL: http://llvm.org/viewvc/llvm-project?rev=126103&view=rev
Log:
add a missed loop deletion case.

Modified:
    llvm/trunk/lib/Target/README.txt

Modified: llvm/trunk/lib/Target/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=126103&r1=126102&r2=126103&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Sun Feb 20 20:13:39 2011
@@ -254,6 +254,20 @@
 
 //===---------------------------------------------------------------------===//
 
+[LOOP DELETION]
+
+We don't delete this output free loop, because trip count analysis doesn't
+realize that it is finite (if it were infinite, it would be undefined).  Not
+having this blocks Loop Idiom from matching strlen and friends.  
+
+void foo(char *C) {
+  int x = 0;
+  while (*C)
+    ++x,++C;
+}
+
+//===---------------------------------------------------------------------===//
+
 [LOOP RECOGNITION]
 
 These idioms should be recognized as popcount (see PR1488):





More information about the llvm-commits mailing list