summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/DebugCounter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove Support/Options.h, it is unusedReid Kleckner2019-11-151-1/+0
| | | | | | | | | | | | | | | | | It was added in 2014 in 732e0aa9fb84f1 with one use in Scalarizer.cpp. That one use was then removed when porting to the new pass manager in 2018 in b6f76002d9158628e78. While the RFC and the desire to get off of static initializers for cl::opt all still stand, this code is now dead, and I think we should delete this code until someone is ready to do the migration. There were many clients of CommandLine.h that were it transitively through LLVMContext.h, so I cleaned that up in 4c1a1d3cf97e1ede466. Reviewers: beanz Differential Revision: https://reviews.llvm.org/D70280
* Print out DebugCounter info with -print-debug-counterZhizhou Yang2018-10-231-4/+21
| | | | | | | | | | | | | | | | | | | Summary: This patch will print out {Counter, Skip, StopAfter} info of all passes which have DebugCounter set at destruction. It can be used to monitor how many times does certain transformation happen in a pass, and also help check if -debug-counter option is set correctly. Please refer to this [[ http://lists.llvm.org/pipermail/llvm-dev/2018-July/124722.html | thread ]] for motivation. Reviewers: george.burgess.iv, davide, greened Reviewed By: greened Subscribers: kristina, llozano, mgorny, llvm-commits, mgrang Differential Revision: https://reviews.llvm.org/D50031 llvm-svn: 345085
* [DebugCounters] don't do redundant map lookups; NFCGeorge Burgess IV2018-08-171-4/+8
| | | | llvm-svn: 340104
* [Support] Add an enable bit to our DebugCountersGeorge Burgess IV2018-08-021-0/+2
| | | | | | | | | | | | | | | | | r337748 made us start incrementing DebugCounters all of the time. This makes tsan unhappy in multithreaded environments. Since it doesn't make much sense to use DebugCounters with multiple threads, this patch makes us only count anything if the user passed a -debug-counter option or if some other piece of code explicitly asks for it (e.g. the pass in D50031). The amount of global state here makes writing a unittest for this behavior somewhat awkward. So, no test is provided. Differential Revision: https://reviews.llvm.org/D50150 llvm-svn: 338762
* [DebugCounters] Keep track of total countsGeorge Burgess IV2018-07-231-10/+9
| | | | | | | | | | | | | | This patch makes debug counters keep track of the total number of times we've called `shouldExecute` for each counter, so it's easier to build automated tooling on top of these. A patch to print these counts is coming soon. Patch by Zhizhou Yang! Differential Revision: https://reviews.llvm.org/D49560 llvm-svn: 337748
* [DebugCounter] Make -debug-counter cl::Hidden.Craig Topper2018-04-011-1/+1
| | | | llvm-svn: 328948
* Hide dbgs() stream for when built with -fmodules.Frederich Munch2017-06-141-1/+5
| | | | | | | | | | | | | | Summary: Make DebugCounter::print and dump methods to be const correct. Reviewers: aprantl Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34214 llvm-svn: 305408
* Make helper functions static. NFC.Benjamin Kramer2017-05-261-0/+2
| | | | llvm-svn: 304029
* DebugCounter: Initialize skip to 0, not -1Daniel Berlin2017-03-041-2/+2
| | | | llvm-svn: 296971
* Add two files lost in rebase, causing build breakDaniel Berlin2017-02-191-0/+108
llvm-svn: 295595
OpenPOWER on IntegriCloud