diff options
author | Kostya Serebryany <kcc@google.com> | 2013-10-16 14:06:14 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-10-16 14:06:14 +0000 |
commit | 3386d252579ea00d0fc26a3ba7874bec25ce4516 (patch) | |
tree | c7d6ce42f1c7ff9409df701e97ed4c54d22eeda3 /test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll | |
parent | d77a7669ec1a6bba7e45791b1aa1e65a603dda92 (diff) | |
download | llvm-3386d252579ea00d0fc26a3ba7874bec25ce4516.tar.gz llvm-3386d252579ea00d0fc26a3ba7874bec25ce4516.tar.bz2 llvm-3386d252579ea00d0fc26a3ba7874bec25ce4516.tar.xz |
[asan] Optimize accesses to global arrays with constant index
Summary:
Given a global array G[N], which is declared in this CU and has static initializer
avoid instrumenting accesses like G[i], where 'i' is a constant and 0<=i<N.
Also add a bit of stats.
This eliminates ~1% of instrumentations on SPEC2006
and also partially helps when asan is being run together with coverage.
Reviewers: samsonov
Reviewed By: samsonov
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll')
-rw-r--r-- | test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll b/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll index da8f541375..1087c9a58f 100644 --- a/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll +++ b/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll @@ -9,7 +9,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3 %struct_of_7_bytes_4_aligned = type { i32, i8, i8, i8} -@f = global %struct_of_7_bytes_4_aligned zeroinitializer, align 4 +@f = external global %struct_of_7_bytes_4_aligned , align 4 ; Accessing bytes 4 and 6, not ok to widen to i32 if sanitize_address is set. |