[PATCH] D29998: Add initial support for debug counting
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 10:31:43 PST 2017
dberlin created this revision.
Herald added a subscriber: mgorny.
(Note: I named it debug counting because that's what we called it in
GCC. I'm also mostly leaving this here until i get back to it because
i promised some folks who wanted to use it. I'll ping the review when
it's cleaned up a bit).
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).
https://reviews.llvm.org/D29998
Files:
include/llvm/Support/DebugCounter.h
lib/Support/CMakeLists.txt
lib/Support/DebugCounter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29998.88577.patch
Type: text/x-patch
Size: 6875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170215/fe194cb3/attachment.bin>
More information about the llvm-commits
mailing list