summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CFGPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add missing includes needed to prune LLVMContext.h include, NFCReid Kleckner2019-11-141-0/+1
| | | | | These are a pre-requisite to removing #include "llvm/Support/Options.h" from LLVMContext.h: https://reviews.llvm.org/D70280
* Sink all InitializePasses.h includesReid Kleckner2019-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation. I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild. Reviewers: bkramer, asbirlea, bollu, jdoerfert Differential Revision: https://reviews.llvm.org/D70211
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-051-1/+1
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [CFG Printer] Add support for writing the dot files with a customChandler Carruth2018-10-091-4/+10
| | | | | | | | | | prefix. Use this to direct these files to a specific location in the test suite so that we don't write files out to random directories (or fail if the working directory isn't writable). llvm-svn: 344014
* Remove trailing spaceFangrui Song2018-07-301-1/+1
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338293
* Add an option to specify the name ofXinliang David Li2018-07-251-0/+11
| | | | | | | | an function whose CFG is to be viewed/printed. Differential Revision: https://reviews.llvm.org/D49447 llvm-svn: 337940
* Revert "Extend CFGPrinter and CallPrinter with Heat Colors"Sean Fertile2018-06-291-199/+51
| | | | | | This reverts r335996 which broke graph printing in Polly. llvm-svn: 336000
* Extend CFGPrinter and CallPrinter with Heat ColorsSean Fertile2018-06-291-51/+199
| | | | | | | | | | | | | | | Extends the CFGPrinter and CallPrinter with heat colors based on heuristics or profiling information. The colors are enabled by default and can be toggled on/off for CFGPrinter by using the option -cfg-heat-colors for both -dot-cfg[-only] and -view-cfg[-only]. Similarly, the colors can be toggled on/off for CallPrinter by using the option -callgraph-heat-colors for both -dot-callgraph and -view-callgraph. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D40425 llvm-svn: 335996
* [CFGVPrinter] Fix -dot-cfg-onlyFrancis Visoiu Mistrih2017-12-191-4/+4
| | | | | | The refactoring in r281640 made -dot-cfg-only ignore the "-only" part. llvm-svn: 321079
* [PM] Port CFGViewer and CFGPrinter to the new Pass ManagerSriraman Tallam2016-09-151-46/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D24592 llvm-svn: 281640
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-4/+4
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-4/+4
| | | | | | | | | | | | | 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
* Remove superfluous .str() and replace std::string concatenation with Twine.Yaron Keren2015-03-271-2/+2
| | | | llvm-svn: 233392
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-251-8/+8
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Clean up language and grammar.Eric Christopher2014-05-201-2/+2
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209216
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-291-0/+1
| | | | | | necessary. llvm-svn: 207593
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-4/+4
| | | | | | instead of comparing to nullptr. llvm-svn: 206243
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-051-13/+13
| | | | | | class. llvm-svn: 202945
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-2/+2
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* Don't make F_None the default.Rafael Espindola2014-02-241-2/+2
| | | | | | This will make it easier to switch the default to being binary files. llvm-svn: 202042
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-1/+0
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-2/+2
| | | | llvm-svn: 144648
* Twinify GraphWriter a little bit.Benjamin Kramer2011-11-151-2/+2
| | | | llvm-svn: 144647
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-4/+13
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-4/+4
| | | | llvm-svn: 115996
* zap dead code.Chris Lattner2010-09-041-2/+0
| | | | llvm-svn: 113073
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-231-5/+5
| | | | | | passes over to the new registration API. llvm-svn: 111815
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-6/+6
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-6/+6
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-6/+6
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with ↵Owen Anderson2010-07-211-3/+2
| | | | | | RegisterAnalysisGroup<> for pass registration. llvm-svn: 109058
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+1
| | | | llvm-svn: 109045
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-4/+4
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* make DOTGraphTraits public, patch by Tobias Grosser!Chris Lattner2009-10-181-61/+2
| | | | llvm-svn: 84396
* The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".Duncan Sands2009-09-191-1/+1
| | | | | | | It prints the content of all bbs, instead of printing empty bbs to make the CFG more readable. Fix this. Patch by Tobias Grosser. llvm-svn: 82315
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-251-2/+2
| | | | | | | | | | | | | | | | This is conventional command-line tool behavior. -f now just means "enable binary output on terminals". Add a -f option to llvm-extract and llvm-link, for consistency. Remove F_Force from raw_fd_ostream and enable overwriting and truncating by default. Introduce an F_Excl flag to permit users to enable a failure when the file already exists. This flag is currently unused. Update Makefiles and documentation accordingly. llvm-svn: 79990
* convert LoopInfo.h and GraphWriter.h to use raw_ostreamChris Lattner2009-08-231-11/+14
| | | | llvm-svn: 79836
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-7/+4
| | | | | | update all code that this affects. llvm-svn: 79830
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-8/+10
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* Switch to getNameStr().Daniel Dunbar2009-07-241-6/+6
| | | | llvm-svn: 76962
* Get rid of the global CFGOnly flag by threading a ShortNames parameters ↵Owen Anderson2009-06-241-20/+17
| | | | | | | | through the GraphViz rendering code. Update other uses in the codebase for this change. llvm-svn: 74084
* Rationalize the names of passes that print information:Duncan Sands2008-09-231-3/+3
| | | | | | | | | | | | | | | | | -callgraph => print-callgraph -callscc => print-callgraph-sccs -cfgscc => print-cfg-sccs -externalfnconstants => print-externalfnconstants -print => print-function -print-alias-sets (no change) -print-callgraph => dot-callgraph -print-cfg => dot-cfg -print-cfg-only => dot-cfg-only -print-dom-info (no change) -printm => print-module -printusedtypes => print-used-types llvm-svn: 56487
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-5/+5
| | | | llvm-svn: 55779
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-14/+21
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Restore isCFGOnly property of various analysis passes.Devang Patel2008-03-201-4/+4
| | | | llvm-svn: 48579
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-191-7/+7
| | | | llvm-svn: 48554
* Do not use virtual function to identify an analysis pass.Devang Patel2008-03-191-16/+3
| | | | llvm-svn: 48520
* Identify Analysis pass.Devang Patel2008-03-181-0/+13
| | | | | | | Do not run analysis pass again if analysis info is still available. This fixes PR1441. llvm-svn: 48476
OpenPOWER on IntegriCloud