[llvm-commits] [llvm] r122676 - /llvm/trunk/lib/Target/README.txt
Chris Lattner
sabre at nondot.org
Sat Jan 1 14:57:32 PST 2011
Author: lattner
Date: Sat Jan 1 16:57:31 2011
New Revision: 122676
URL: http://llvm.org/viewvc/llvm-project?rev=122676&view=rev
Log:
a missed __builtin_object_size 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=122676&r1=122675&r2=122676&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Sat Jan 1 16:57:31 2011
@@ -2074,3 +2074,20 @@
}
//===---------------------------------------------------------------------===//
+
+This code can be seen in viterbi:
+
+ %64 = call noalias i8* @malloc(i64 %62) nounwind
+...
+ %67 = call i64 @llvm.objectsize.i64(i8* %64, i1 false) nounwind
+ %68 = call i8* @__memset_chk(i8* %64, i32 0, i64 %62, i64 %67) nounwind
+
+llvm.objectsize.i64 should be taught about malloc/calloc, allowing it to
+fold to %62. This is a security win (overflows of malloc will get caught)
+and also a performance win by exposing more memsets to the optimizer.
+
+This occurs several times in viterbi.
+
+//===---------------------------------------------------------------------===//
+
+
More information about the llvm-commits
mailing list