OSDN Git Service

Disable coverage opt-out for strong postdominator blocks.
authorGeorge Karpenkov <ekarpenkov@apple.com>
Tue, 23 May 2017 21:58:54 +0000 (21:58 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Tue, 23 May 2017 21:58:54 +0000 (21:58 +0000)
commitfe601fedc172b5fe6ef3d62af85c119263f55d2e
tree726b9afef7764fc8a64d23e95c19deefdd923b07
parentf226a627f970838c6bf980b3e83b1792a071472d
Disable coverage opt-out for strong postdominator blocks.

Coverage instrumentation has an optimization not to instrument extra
blocks, if the pass is already "accounted for" by a
successor/predecessor basic block.
However (https://github.com/google/sanitizers/issues/783) this
reasoning may become circular, which stops valid paths from having
coverage.
In the worst case this can cause fuzzing to stop working entirely.

This change simplifies logic to something which trivially can not have
such circular reasoning, as losing valid paths does not seem like a
good trade-off for a ~15% decrease in the # of instrumented basic blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303698 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
test/Instrumentation/SanitizerCoverage/chains.ll [new file with mode: 0644]