summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/RegionInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [RegionInfo] Add debug-time region viewer functionsMichael Kruse2015-08-101-0/+9
| | | | | | | | | | | | | | | 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
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Fix msc17 build. RegionInfo::RegionInfo::recalculate() doesn't make sense.NAKAMURA Takumi2014-07-201-4/+2
| | | | llvm-svn: 213466
* Fix -Asserts build introduced since r213456.NAKAMURA Takumi2014-07-201-0/+2
| | | | llvm-svn: 213465
* Templatify RegionInfo so it works on MachineBasicBlocksMatt Arsenault2014-07-191-762/+66
| | | | llvm-svn: 213456
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | | | | | definition below all the header #include lines, lib/Analysis/... edition. This one has a bit extra as there were *other* #define's before #include lines in addition to DEBUG_TYPE. I've sunk all of them as a block. llvm-svn: 206843
* RegionInfo: Do not access a value that was just moved awayTobias Grosser2014-04-151-1/+1
| | | | | | This fixes a regression introduced in r206310. llvm-svn: 206328
* Use unique_ptr to manage ownership of child Regions within llvm::RegionDavid Blaikie2014-04-151-15/+19
| | | | llvm-svn: 206310
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-24/+24
| | | | | | instead of comparing to nullptr. llvm-svn: 206243
* [C++11] Add a basic block range view for RegionInfoTobias Grosser2014-03-031-2/+2
| | | | | | This also switches the users in LLVM to ensure this functionality is tested. llvm-svn: 202705
* [PM] Split DominatorTree into a concrete analysis result object whichChandler Carruth2014-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | can be used by both the new pass manager and the old. This removes it from any of the virtual mess of the pass interfaces and lets it derive cleanly from the DominatorTreeBase<> template. In turn, tons of boilerplate interface can be nuked and it turns into a very straightforward extension of the base DominatorTree interface. The old analysis pass is now a simple wrapper. The names and style of this split should match the split between CallGraph and CallGraphWrapperPass. All of the users of DominatorTree have been updated to match using many of the same tricks as with CallGraph. The goal is that the common type remains the resulting DominatorTree rather than the pass. This will make subsequent work toward the new pass manager significantly easier. Also in numerous places things became cleaner because I switched from re-running the pass (!!! mid way through some other passes run!!!) to directly recomputing the domtree. llvm-svn: 199104
* Put the functionality for printing a value to a raw_ostream as anChandler Carruth2014-01-091-3/+2
| | | | | | | | | | | | operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. llvm-svn: 198836
* Move the LLVM IR asm writer header files into the IR directory, as theyChandler Carruth2014-01-071-1/+1
| | | | | | | | | | | | | | | | | are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. llvm-svn: 198688
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-1/+1
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Reorder headers according to lint.Bill Wendling2013-08-211-4/+2
| | | | llvm-svn: 188932
* RegionInfo: Do not crash if unreachable block is foundTobias Grosser2013-05-031-1/+2
| | | | llvm-svn: 181025
* RegionInfo: Add helpers to replace entry/exit recursivelyTobias Grosser2013-04-101-0/+32
| | | | | | Contributed by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179157
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-4/+3
| | | | | | | | | | | | | | | | | 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
* Release build: guard dump functions withManman Ren2012-09-121-1/+1
| | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163344. llvm-svn: 163679
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-061-0/+2
| | | | | | No functional change. llvm-svn: 163344
* Remove the the block_node_iterator of Region, replace it by the block_iterator.Hongbin Zheng2012-08-271-21/+3
| | | | llvm-svn: 162672
* Implement the block_iterator of Region based on df_iterator.Hongbin Zheng2012-08-021-16/+0
| | | | llvm-svn: 161177
* Rename the Region::block_iterator to Region::block_node_iterator, andChandler Carruth2012-05-041-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove extra semi-colons.Chad Rosier2012-02-221-1/+1
| | | | llvm-svn: 151169
* Missed some users of Value::getNameStr.Benjamin Kramer2011-11-151-4/+2
| | | | llvm-svn: 144656
* Region: Allow user control the printing style of the print function.Tobias Grosser2011-04-041-16/+16
| | | | | | Contributed by: etherzhhb@gmail.com llvm-svn: 128808
* Add single entry / single exit accessors.Tobias Grosser2011-01-131-23/+32
| | | | | | | | | | | Add methods for accessing the (single) entry / exit edge of a region. If no such edge exists, null is returned. Both accessors return the start block of the corresponding edge. The edge can finally be formed by utilizing Region::getEntry() or Region::getExit(); Contributed by: Andreas Simbuerger <simbuerg@fim.uni-passau.de> llvm-svn: 123410
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-021-1/+1
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* Make some symbols static, move classes into anonymous namespaces.Benjamin Kramer2010-10-221-1/+1
| | | | llvm-svn: 117111
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-0/+1
| | | | | | | | | | | | | | | | | 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
* Add Region::isTopLevelRegion().Tobias Grosser2010-10-131-3/+3
| | | | llvm-svn: 116402
* RegionInfo: Fix trivial error that slipped in last minute.Tobias Grosser2010-10-131-1/+1
| | | | llvm-svn: 116400
* RegionInfo: Update RegionInfo after a BB was split.Tobias Grosser2010-10-131-0/+13
| | | | llvm-svn: 116398
* RegioInfo: Add getExpandedRegion().Tobias Grosser2010-10-131-0/+32
| | | | | | | getExpandedRegion() enables us to create non canonical regions. Those regions can be used to define the largerst region, that fullfills a certain property. llvm-svn: 116397
* RegionInfo: Allow to update exit and entry of a region.Tobias Grosser2010-10-131-0/+9
| | | | llvm-svn: 116396
* RegionInfo: Enhance addSubregion.Tobias Grosser2010-10-131-4/+29
| | | | llvm-svn: 116395
* RegionInfo: Allow to set the parent region of a basic block.Tobias Grosser2010-10-131-1/+4
| | | | llvm-svn: 116394
* RegionInfo: Free the RegionNodes in cache.Tobias Grosser2010-10-131-0/+5
| | | | | | Contributed by: ether llvm-svn: 116380
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-1/+6
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* RegionInfo: Do not assert if a BB is not part of the dominance tree.Tobias Grosser2010-08-101-2/+4
| | | | llvm-svn: 110665
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix namespace polution.Dan Gohman2010-08-021-2/+2
| | | | llvm-svn: 110056
* RegionInfo: Make sure to free cached nodes; Tobias, please check!Daniel Dunbar2010-07-281-0/+5
| | | | llvm-svn: 109650
* RegionInfo: Add getMaxRegionExit()Tobias Grosser2010-07-271-0/+39
| | | | | | | getMaxRegionExit returns the exit of the maximal refined region starting at a specific basic block. llvm-svn: 109496
* Add function to query RegionInfo about loops.Tobias Grosser2010-07-271-0/+65
| | | | | | | * contains(Loop), * getOutermostLoop() * Improve getNameStr() to return a sensible name, if basic blocks are not named. llvm-svn: 109490
* Use DominatorTree::properlyDominates instead of dominates with anDan Gohman2010-07-261-1/+1
| | | | | | explicit inequality check. llvm-svn: 109398
* use cascading operator-> featureGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109104
OpenPOWER on IntegriCloud