]> granicus.if.org Git - llvm/commit
Add initial support for debug counting
authorDaniel Berlin <dberlin@dberlin.org>
Sun, 19 Feb 2017 04:28:56 +0000 (04:28 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Sun, 19 Feb 2017 04:28:56 +0000 (04:28 +0000)
commitad47702c6de77a82f071436f699bec6ab7275c2c
treedf6fe340f1d9c71993c44c8e5ad79d7309e2321a
parent7cca07f9d6a80f671e861ecd638f2b66dd91127f
Add initial support for debug counting

Summary:

We have support for bisection, and bugpoint can reduce testcases
often to a single pass. But that doesn't help reduce it to a single
transform by a single pass.  Which debug counting lets us do.

Debug counting lets you instrument a pass so that it only executes a
certain thing (rwhatever you want) after skipping it a certain time of
times, and then only does a certain number of executions before saying
"skip" again.

To make it concrete, for predicateinfo, if i instrument use renaming,
i can make it so it skips renaming the first N uses, renames the next
N, and then skips the rest.

This lets you narrow down a miscompilation to, often, a single
transformation, and then also debug it (by using the same command line
parameters).

Reviewers: chandlerc, davide, mehdi_amini

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D29998

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295593 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/CommandLine.h
lib/Support/CMakeLists.txt
lib/Support/CommandLine.cpp