summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMike Aizatsky <aizatsky@chromium.org>2016-02-26 01:17:22 +0000
committerMike Aizatsky <aizatsky@chromium.org>2016-02-26 01:17:22 +0000
commit5971f18133cbdece6012b3e0f54ae85877e4306f (patch)
tree912fc289155fc921de7eef6bce3d6c75db4bc894 /llvm/test
parent7ed93618969f53d4d2f6414e5c89d3a029a10304 (diff)
downloadbcm5719-llvm-5971f18133cbdece6012b3e0f54ae85877e4306f.tar.gz
bcm5719-llvm-5971f18133cbdece6012b3e0f54ae85877e4306f.zip
[sancov] Pruning full dominator blocks from instrumentation.
Summary: This is the first simple attempt to reduce number of coverage- instrumented blocks. If a basic block dominates all its successors, then its coverage information is useless to us. Ingore such blocks if santizer-coverage-prune-tree option is set. Differential Revision: http://reviews.llvm.org/D17626 llvm-svn: 261949
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Instrumentation/SanitizerCoverage/coverage.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll b/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
index f7fa983a002..71177eb33a1 100644
--- a/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
+++ b/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
@@ -13,6 +13,7 @@
; RUN: -S | FileCheck %s --check-prefix=CHECK2
; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-block-threshold=1 \
; RUN: -S | FileCheck %s --check-prefix=CHECK_WITH_CHECK
+; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-prune-blocks=1 -S | FileCheck %s --check-prefix=CHECKPRUNE
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
@@ -134,3 +135,11 @@ entry:
; CHECK4-LABEL: define void @call_unreachable
; CHECK4-NOT: __sanitizer_cov
; CHECK4: unreachable
+
+; CHECKPRUNE-LABEL: define void @foo
+; CHECKPRUNE: call void @__sanitizer_cov
+; CHECKPRUNE: call void asm sideeffect "", ""()
+; CHECKPRUNE: call void @__sanitizer_cov
+; CHECKPRUNE: call void asm sideeffect "", ""()
+; CHECKPRUNE-NOT: call void @__sanitizer_cov
+; CHECKPRUNE: ret void
OpenPOWER on IntegriCloud