[llvm] r265615 - [sancov] enabling coverage edge pruning by default.
Mike Aizatsky via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 16:24:37 PDT 2016
Author: aizatsky
Date: Wed Apr 6 18:24:37 2016
New Revision: 265615
URL: http://llvm.org/viewvc/llvm-project?rev=265615&view=rev
Log:
[sancov] enabling coverage edge pruning by default.
Differential Revision: http://reviews.llvm.org/D18844
Modified:
llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll
llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
llvm/trunk/test/Instrumentation/SanitizerCoverage/tracing.ll
Modified: llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp?rev=265615&r1=265614&r2=265615&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp Wed Apr 6 18:24:37 2016
@@ -101,10 +101,10 @@ static cl::opt<bool>
"instructions"),
cl::Hidden, cl::init(false));
-static cl::opt<bool> ClPruneBlocks(
- "sanitizer-coverage-prune-blocks",
- cl::desc("Reduce the number of instrumented blocks (experimental)"),
- cl::Hidden, cl::init(false));
+static cl::opt<bool>
+ ClPruneBlocks("sanitizer-coverage-prune-blocks",
+ cl::desc("Reduce the number of instrumented blocks"),
+ cl::Hidden, cl::init(true));
// Experimental 8-bit counters used as an additional search heuristic during
// coverage-guided fuzzing.
Modified: llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll?rev=265615&r1=265614&r2=265615&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll (original)
+++ llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll Wed Apr 6 18:24:37 2016
@@ -56,7 +56,7 @@ entry:
; CHECK_WITH_CHECK: ret void
; CHECK_WITH_CHECK-LABEL: define internal void @sancov.module_ctor
; CHECK_WITH_CHECK-NOT: ret
-; CHECK_WITH_CHECK: call void @__sanitizer_cov_module_init({{.*}}, i64 4,
+; CHECK_WITH_CHECK: call void @__sanitizer_cov_module_init({{.*}}, i64 3,
; CHECK_WITH_CHECK: ret
; CHECK2-LABEL: define void @foo
@@ -64,20 +64,18 @@ entry:
; CHECK2: call void asm sideeffect "", ""()
; CHECK2: call void @__sanitizer_cov
; CHECK2: call void asm sideeffect "", ""()
-; CHECK2: call void @__sanitizer_cov
; CHECK2: call void asm sideeffect "", ""()
; CHECK2-NOT: call void @__sanitizer_cov
; CHECK2: ret void
; CHECK2-LABEL: define internal void @sancov.module_ctor
; CHECK2-NOT: ret
-; CHECK2: call void @__sanitizer_cov_module_init({{.*}}, i64 4,
+; CHECK2: call void @__sanitizer_cov_module_init({{.*}}, i64 3,
; CHECK2: ret
; CHECK3-LABEL: define void @foo
; CHECK3: call void @__sanitizer_cov
; CHECK3: call void @__sanitizer_cov
-; CHECK3: call void @__sanitizer_cov
; CHECK3-NOT: ret void
; CHECK3: call void @__sanitizer_cov
; CHECK3-NOT: call void @__sanitizer_cov
Modified: llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll?rev=265615&r1=265614&r2=265615&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll (original)
+++ llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll Wed Apr 6 18:24:37 2016
@@ -19,11 +19,9 @@ target triple = "x86_64-unknown-linux-gn
; CHECK-LABEL:_Z3fooPi
; CHECK: call void @__sanitizer_cov(i32*{{.*}}), !dbg [[A:!.*]]
; CHECK: call void @__sanitizer_cov(i32*{{.*}}), !dbg [[B:!.*]]
-; CHECK: call void @__sanitizer_cov(i32*{{.*}}), !dbg [[C:!.*]]
; CHECK: ret void
; CHECK: [[A]] = !DILocation(line: 1, scope: !{{.*}})
; CHECK: [[B]] = !DILocation(line: 3, column: 5, scope: !{{.*}})
-; CHECK: [[C]] = !DILocation(line: 4, column: 1, scope: !{{.*}})
define void @_Z3fooPi(i32* %a) #0 !dbg !4 {
entry:
Modified: llvm/trunk/test/Instrumentation/SanitizerCoverage/tracing.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/SanitizerCoverage/tracing.ll?rev=265615&r1=265614&r2=265615&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/SanitizerCoverage/tracing.ll (original)
+++ llvm/trunk/test/Instrumentation/SanitizerCoverage/tracing.ll Wed Apr 6 18:24:37 2016
@@ -21,7 +21,6 @@ entry:
; CHECK1-LABEL: define void @foo
; CHECK1: call void @__sanitizer_cov_trace_func_enter
; CHECK1: call void @__sanitizer_cov_trace_basic_block
-; CHECK1: call void @__sanitizer_cov_trace_basic_block
; CHECK1-NOT: call void @__sanitizer_cov_trace_basic_block
; CHECK1: ret void
@@ -29,7 +28,6 @@ entry:
; CHECK3: call void @__sanitizer_cov_trace_func_enter
; CHECK3: call void @__sanitizer_cov_trace_basic_block
; CHECK3: call void @__sanitizer_cov_trace_basic_block
-; CHECK3: call void @__sanitizer_cov_trace_basic_block
; CHECK3-NOT: call void @__sanitizer_cov_trace_basic_block
; CHECK3: ret void
@@ -37,7 +35,6 @@ entry:
; CHECK_PC: call void @__sanitizer_cov_trace_pc
; CHECK_PC: call void @__sanitizer_cov_trace_pc
; CHECK_PC: call void @__sanitizer_cov_trace_pc
-; CHECK_PC: call void @__sanitizer_cov_trace_pc
; CHECK_PC-NOT: call void @__sanitizer_cov_trace_pc
; CHECK_PC: ret void
; CHECK_PC-NOT: call void @__sanitizer_cov_module_init
More information about the llvm-commits
mailing list