diff options
author | Qin Zhao <zhaoqin@google.com> | 2016-06-10 00:48:53 +0000 |
---|---|---|
committer | Qin Zhao <zhaoqin@google.com> | 2016-06-10 00:48:53 +0000 |
commit | d677d888677bccd0dfc12527c8f40b2c9903c70c (patch) | |
tree | a2be5cf5dde6ae0475e75ed3bc0d73406f73a8d8 /llvm/test | |
parent | c481c7eeb432c3e5e17e0d1834cd75ae12909887 (diff) | |
download | bcm5719-llvm-d677d888677bccd0dfc12527c8f40b2c9903c70c.tar.gz bcm5719-llvm-d677d888677bccd0dfc12527c8f40b2c9903c70c.zip |
[esan|cfrag] Disable load/store instrumentation for cfrag
Summary:
Adds ClInstrumentFastpath option to control fastpath instrumentation.
Avoids the load/store instrumentation for the cache fragmentation tool.
Renames cache_frag_basic.ll to working_set_slow.ll for slowpath
instrumentation test.
Adds the __esan_init check in struct_field_count_basic.ll.
Reviewers: aizatsky
Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka
Differential Revision: http://reviews.llvm.org/D21079
llvm-svn: 272355
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Instrumentation/EfficiencySanitizer/struct_field_count_basic.ll | 10 | ||||
-rw-r--r-- | llvm/test/Instrumentation/EfficiencySanitizer/working_set_slow.ll (renamed from llvm/test/Instrumentation/EfficiencySanitizer/cache_frag_basic.ll) | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/llvm/test/Instrumentation/EfficiencySanitizer/struct_field_count_basic.ll b/llvm/test/Instrumentation/EfficiencySanitizer/struct_field_count_basic.ll index 158a79ed752..5cc5f062230 100644 --- a/llvm/test/Instrumentation/EfficiencySanitizer/struct_field_count_basic.ll +++ b/llvm/test/Instrumentation/EfficiencySanitizer/struct_field_count_basic.ll @@ -1,6 +1,6 @@ ; Test basic EfficiencySanitizer struct field count instrumentation. ; -; RUN: opt < %s -esan -esan-cache-frag -esan-instrument-loads-and-stores=false -esan-instrument-memintrinsics=false -S | FileCheck %s +; RUN: opt < %s -esan -esan-cache-frag -S | FileCheck %s %struct.A = type { i32, i32 } %union.U = type { double } @@ -93,3 +93,11 @@ entry: ; CHECK-NEXT: %k1 = load %struct.A*, %struct.A** %k, align 8 ; CHECK-NEXT: %arrayidx13 = getelementptr inbounds %struct.A, %struct.A* %k1, i64 0 ; CHECK-NEXT: ret i32 0 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Top-level: + +; CHECK: define internal void @esan.module_ctor() +; CHECK: call void @__esan_init(i32 1, i8* bitcast ({ i8*, i32, { i8*, i32, i64*, i8** }* }* @21 to i8*)) +; CHECK: define internal void @esan.module_dtor() +; CHECK: call void @__esan_exit(i8* bitcast ({ i8*, i32, { i8*, i32, i64*, i8** }* }* @21 to i8*)) diff --git a/llvm/test/Instrumentation/EfficiencySanitizer/cache_frag_basic.ll b/llvm/test/Instrumentation/EfficiencySanitizer/working_set_slow.ll index 4cd22690cb8..1c5978e5286 100644 --- a/llvm/test/Instrumentation/EfficiencySanitizer/cache_frag_basic.ll +++ b/llvm/test/Instrumentation/EfficiencySanitizer/working_set_slow.ll @@ -1,6 +1,6 @@ -; Test basic EfficiencySanitizer cache frag instrumentation. +; Test basic EfficiencySanitizer slowpath instrumentation. ; -; RUN: opt < %s -esan -esan-cache-frag -S | FileCheck %s +; RUN: opt < %s -esan -esan-working-set -esan-instrument-fastpath=false -S | FileCheck %s ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Aligned loads: @@ -254,6 +254,6 @@ entry: ; Top-level: ; CHECK: define internal void @esan.module_ctor() -; CHECK: call void @__esan_init(i32 1, i8* bitcast ({ i8*, i32, { i8*, i32, i64*, i8** }* }* @1 to i8*)) +; CHECK: call void @__esan_init(i32 2, i8* null) ; CHECK: define internal void @esan.module_dtor() -; CHECK: call void @__esan_exit(i8* bitcast ({ i8*, i32, { i8*, i32, i64*, i8** }* }* @1 to i8*)) +; CHECK: call void @__esan_exit(i8* null) |