[PATCH] D31266: [sancov] fixing too aggressive instrumentation elimination

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 10:53:42 PDT 2017


kcc added a comment.

In https://reviews.llvm.org/D31266#759155, @george.karpenkov wrote:

> I think we can make a much simpler change: what if we just skip the optimization of not instrumenting post-dominators?


It's clearly very simple. 
The question is whether it's too pessimistic.

> We apply optimizations in order to instrument less blocks without loss of precision, thus we don't instrument blocks
>  the path through which is uniquely identifiable using other blocks.
>  The problems start once this reasoning gets circular, and to me it's not obvious how this patch would solve this problem
>  in general (it very well may, and maybe I'm not looking close enough, but at least it's not obvious).
> 
> However, if we just apply the optimization for full dominators (not instrumenting these nodes)
>  we'll never get circular arguments, as domination relation is never circular.
>  From a limited set of examples I've tried, the post-dominator optimization produced a very tiny benefit
>  after the dominator optimization was applied.

Can you get some exact numbers on real code? 
E.g. take https://github.com/google/fuzzer-test-suite/blob/master/sqlite-2016-11-14/sqlite3.c
(a single-file large chunk of code)

The numbers I remember were like DOM gives 30% saving, PDOM gives 20% more, which is a lot.

> Moreover, I could only see the benefit for a corner case of nodes with no successors (and if not instrumenting them
>  does speed fuzzing up, it might be easier to just check the is-strong-postdominator condition on those).




https://reviews.llvm.org/D31266





More information about the llvm-commits mailing list