diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-01 22:57:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-01 22:57:31 +0000 |
commit | 15df04472a6d9986276001e8c4be24d2880e22c5 (patch) | |
tree | a39ec30f7ccb5864081efb4d833f5d93e2f0a23d /lib/Target/README.txt | |
parent | 9c8fb9e8208d527fcb333792e0c634c816036b4b (diff) | |
download | llvm-15df04472a6d9986276001e8c4be24d2880e22c5.tar.gz llvm-15df04472a6d9986276001e8c4be24d2880e22c5.tar.bz2 llvm-15df04472a6d9986276001e8c4be24d2880e22c5.tar.xz |
a missed __builtin_object_size case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r-- | lib/Target/README.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index be0e6bb82e..4e374e59d6 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -2074,3 +2074,20 @@ define i1 @g(i32 a) nounwind readnone { } //===---------------------------------------------------------------------===// + +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. + +//===---------------------------------------------------------------------===// + + |