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

George Karpenkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 22:19:38 PDT 2017


george.karpenkov added a comment.

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

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.
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