summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/IRPrintingPasses.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Debugify] Add -debugify-each for testing each pass in a pipelineVedant Kumar2018-05-151-0/+8
| | | | | | | | | | | | | | | | This adds a -debugify-each mode to opt which, when enabled, wraps each {Module,Function}Pass in a pipeline with logic to add, check, and strip synthetic debug info for testing purposes. This mode can be used to test complex pipelines for debug info bugs, or to collect statistics about the number of debug values & locations lost throughout various stages of a pipeline. Patch by Son Tuan Vu! Differential Revision: https://reviews.llvm.org/D46525 llvm-svn: 332312
* [IR] Avoid dangling else warning. NFC.Benjamin Kramer2017-12-011-1/+2
| | | | llvm-svn: 319567
* IR printing improvement for function passes - introducing -print-module-scopeFedor Sergeev2017-12-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When debugging function passes it happens to be rather useful to dump the whole module before the transformation and then use this dump to analyze this single transformation by running it separately on that particular module state. Introducing -print-module-scope debugging option that forces all the function-level IR dumps to become whole-module dumps. This option builds on top of normal dumping controls like -print-before/after -filter-print-funcs The plan is to eventually extend this option to cover other local passes (at least loop passes) but that should go as a separate change. Reviewers: sanjoy, weimingz, silvas, fedor.sergeev Reviewed By: weimingz Subscribers: apilipenko, skatkov, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D40245 llvm-svn: 319561
* Normlize to LF line endings.Michael Kruse2017-08-251-2/+2
| | | | | | | Commit r297442 introduced mixed CRLF/LF line endings to two files. Normalize to to LF-only line endings. llvm-svn: 311774
* Implement getPassName() for IR printing passes.Yaron Keren2017-03-101-0/+6
| | | | llvm-svn: 297442
* Consistently use ModuleAnalysisManagerSean Silva2016-08-091-1/+1
| | | | | | | | | | | Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278078
* Consistently use FunctionAnalysisManagerSean Silva2016-08-091-1/+1
| | | | | | | | | | | Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278077
* [PM] Remove support for omitting the AnalysisManager argument to newChandler Carruth2016-06-171-4/+7
| | | | | | | | | | | | | | | | | | | | pass manager passes' `run` methods. This removes a bunch of SFINAE goop from the pass manager and just requires pass authors to accept `AnalysisManager<IRUnitT> &` as a dead argument. This is a small price to pay for the simplicity of the system as a whole, despite the noise that changing it causes at this stage. This will also helpfull allow us to make the signature of the run methods much more flexible for different kinds af passes to support things like intelligently updating the pass's progression over IR units. While this touches many, many, files, the changes are really boring. Mostly made with the help of my trusty perl one liners. Thanks to Sean and Hal for bouncing ideas for this with me in IRC. llvm-svn: 272978
* Recommit r256952 "Filtering IR printing for print-after-all/print-before-all"Weiming Zhao2016-01-061-2/+9
| | | | | | | | Fix lit test fail due to outputting an extra line. Differential Revision: http://reviews.llvm.org/D15776 llvm-svn: 256987
* Revert r256952 due to lit test fails.Weiming Zhao2016-01-061-10/+3
| | | | llvm-svn: 256954
* Filtering IR printing for print-after-all/print-before-allWeiming Zhao2016-01-061-3/+10
| | | | | | | | | | | | | | | Summary: This patch implements "-print-funcs" option to support function filtering for IR printing like -print-after-all, -print-before etc. Examples: -print-after-all -print-funcs=foo,bar Reviewers: mcrosier, joker.eph Subscribers: tejohnson, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D15776 llvm-svn: 256952
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* uselistorder: Pull the bit through PrintModulePassDuncan P. N. Exon Smith2015-04-151-8/+11
| | | | | | | Now the callers of `PrintModulePass()` (etc.) that care about use-list order in assembly pass in the flag. llvm-svn: 234969
* uselistorder: Pull the assembly bit up out of the printerDuncan P. N. Exon Smith2015-04-151-1/+3
| | | | | | | | Pull the `-preserve-ll-uselistorder` bit up through all the callers of `Module::print()`. I converted callers of `operator<<` to `Module::print()` where necessary to pull the bit through. llvm-svn: 234968
* [PM] Switch the new pass manager to use a reference-based API for IRChandler Carruth2015-01-051-6/+6
| | | | | | | | | | | | | | | | | | | | | units. This was debated back and forth a bunch, but using references is now clearly cleaner. Of all the code written using pointers thus far, in only one place did it really make more sense to have a pointer. In most cases, this just removes immediate dereferencing from the code. I think it is much better to get errors on null IR units earlier, potentially at compile time, than to delay it. Most notably, the legacy pass manager uses references for its routines and so as more and more code works with both, the use of pointers was likely to become really annoying. I noticed this when I ported the domtree analysis over and wrote the entire thing with references only to have it fail to compile. =/ It seemed better to switch now than to delay. We can, of course, revisit this is we learn that references are really problematic in the API. llvm-svn: 225145
* Fix some misplaced spaces around 'override'Hans Wennborg2014-05-241-1/+1
| | | | llvm-svn: 209589
* [C++11] Add 'override' keyword to IR library.Craig Topper2014-03-051-6/+6
| | | | llvm-svn: 202939
* [PM] Add module and function printing passes for the new pass manager.Chandler Carruth2014-01-121-22/+39
| | | | | | | | | This implements the legacy passes in terms of the new ones. It adds basic testing using explicit runs of the passes. Next up will be wiring the basic output mechanism of opt up when the new pass manager is engaged unless bitcode writing is requested. llvm-svn: 199049
* [PM] Simplify the IR printing passes significantly now that a narrowerChandler Carruth2014-01-121-38/+19
| | | | | | | | | | API is exposed. This removes the support for deleting the ostream, switches the member and constructor order arround to be consistent with the creation routines, and switches to using references. llvm-svn: 199047
* [PM] Simplify the interface exposed for IR printing passes.Chandler Carruth2014-01-121-10/+7
| | | | | | | | | | | | Nothing was using the ability of the pass to delete the raw_ostream it printed to, and nothing was trying to pass it a pointer to the raw_ostream. Also, the function variant had a different order of arguments from all of the others which was just really confusing. Now the interface accepts a reference, doesn't offer to delete it, and uses a consistent order. The implementation of the printing passes haven't been updated with this simplification, this is just the API switch. llvm-svn: 199044
* [PM] Run clang-format and remove redundant or obvious comments beforeChandler Carruth2014-01-121-93/+89
| | | | | | | the heavy factoring needed to share logic between the new pass manager and the old. llvm-svn: 199043
* [PM] Rename the IR printing pass header to a more generic and correctChandler Carruth2014-01-121-1/+1
| | | | | | | | name to match the source file which I got earlier. Update the include sites. Also modernize the comments in the header to use the more recommended doxygen style. llvm-svn: 199041
* [PM] Rename this source file to something a bit more generic beforeChandler Carruth2014-01-091-0/+136
I add support for the new pass manager to it. llvm-svn: 198838
OpenPOWER on IntegriCloud