aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/RegionPrinter.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2018-06-29Revert "Extend CFGPrinter and CallPrinter with Heat Colors"Sean Fertile1-4/+4
This reverts r335996 which broke graph printing in Polly. llvm-svn: 336000
2018-06-29Extend CFGPrinter and CallPrinter with Heat ColorsSean Fertile1-4/+4
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
2017-06-06Sort the remaining #include lines in include/... and lib/....Chandler Carruth1-2/+2
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
2016-06-26Apply clang-tidy's modernize-loop-convert to lib/Analysis.Benjamin Kramer1-2/+2
Only minor manual fixes. No functionality change intended. llvm-svn: 273816
2015-08-10[RegionInfo] Add debug-time region viewer functionsMichael Kruse1-0/+41
Summary: Analogously to Function::viewCFG(), RegionInfo::view() and RegionInfo::viewOnly() are meant to be called in debugging sessions. They open a viewer to show how RegionInfo currently understands the region hierarchy. The functions viewRegion(Function*) and viewRegionOnly(Function*) invoke a fresh region analysis of the function in contrast to viewRegion(RegionInfo*) and viewRegionOnly(RegionInfo*) which show the current analysis result. Reviewers: grosser Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11875 llvm-svn: 244444
2015-08-10[RegionInfo] Use RegionInfo* instead of RegionInfoPass* as graph typeMichael Kruse1-56/+62
This allows printing region graphs when only the RegionInfo (e.g. Region::getRegionInfo()), but no RegionInfoPass object is available. Specifically, we will use this to print RegionInfo graphs in the debugger. Differential version: http://reviews.llvm.org/D11874 Reviewed-by: grosser llvm-svn: 244442
2015-06-23Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko1-1/+1
Apparently, the style needs to be agreed upon first. llvm-svn: 240390
2015-06-19Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko1-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
2015-04-15One more -Wrange-loop-analysis cleanup.Richard Trieu1-1/+1
llvm-svn: 235044
2014-07-19Templatify RegionInfo so it works on MachineBasicBlocksMatt Arsenault1-24/+27
llvm-svn: 213456
2014-04-15Use unique_ptr to manage ownership of child Regions within llvm::RegionDavid Blaikie1-11/+11
llvm-svn: 206310
2014-03-03[C++11] Add a basic block range view for RegionInfoTobias Grosser1-4/+3
This also switches the users in LLVM to ensure this functionality is tested. llvm-svn: 202705
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth1-6/+6
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
2012-05-04Rename the Region::block_iterator to Region::block_node_iterator, andChandler Carruth1-5/+3
add a new Region::block_iterator which actually iterates over the basic blocks of the region. The old iterator, now call 'block_node_iterator' iterates over RegionNodes which contain a single basic block. This works well with the GraphTraits-based iterator design, however most users actually want an iterator over the BasicBlocks inside these RegionNodes. Now the 'block_iterator' is a wrapper which exposes exactly this interface. Internally it uses the block_node_iterator to walk all nodes which are single basic blocks, but transparently unwraps the basic block to make user code simpler. While this patch is a bit of a wash, most of the updates are to internal users, not external users of the RegionInfo. I have an accompanying patch to Polly that is a strict simplification of every user of this interface, and I'm working on a pass that also wants the same simplified interface. This patch alone should have no functional impact. llvm-svn: 156202
2011-02-27RegionPrinter: Ignore back edges when layouting the graphTobias Grosser1-0/+26
llvm-svn: 126564
2010-10-19Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson1-4/+12
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
2010-10-07Now with fewer extraneous semicolons!Owen Anderson1-4/+4
llvm-svn: 115996
2010-10-07Move the pass initialization helper functions into the llvm namespace, and addOwen Anderson1-8/+8
a header declaring them all. This is also where we will declare per-library pass-set initializer functions down the road. llvm-svn: 115900
2010-08-06Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson1-4/+4
llvm-svn: 110460
2010-08-06Revert r110396 to fix buildbots.Owen Anderson1-4/+4
llvm-svn: 110410
2010-08-05Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson1-4/+4
address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
2010-08-02Fix namespace polution.Dan Gohman1-0/+4
llvm-svn: 110056
2010-07-22Add new RegionInfo pass.Tobias Grosser1-0/+182
The RegionInfo pass detects single entry single exit regions in a function, where a region is defined as any subgraph that is connected to the remaining graph at only two spots. Furthermore an hierarchical region tree is built. Use it by calling "opt -regions analyze" or "opt -view-regions". llvm-svn: 109089