summaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionInfo.cpp
Commit message (Collapse)AuthorAge
* Release build: guard dump functions withManman Ren2012-09-12
| | | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163344. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163679 91177308-0d34-0410-b5e6-96231b3b80d8
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-06
| | | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163344 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the the block_node_iterator of Region, replace it by the block_iterator.Hongbin Zheng2012-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162672 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the block_iterator of Region based on df_iterator.Hongbin Zheng2012-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161177 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the Region::block_iterator to Region::block_node_iterator, andChandler Carruth2012-05-04
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156202 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra semi-colons.Chad Rosier2012-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151169 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed some users of Value::getNameStr.Benjamin Kramer2011-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144656 91177308-0d34-0410-b5e6-96231b3b80d8
* Region: Allow user control the printing style of the print function.Tobias Grosser2011-04-04
| | | | | | Contributed by: etherzhhb@gmail.com git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128808 91177308-0d34-0410-b5e6-96231b3b80d8
* Add single entry / single exit accessors.Tobias Grosser2011-01-13
| | | | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123410 91177308-0d34-0410-b5e6-96231b3b80d8
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-02
| | | | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122714 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some symbols static, move classes into anonymous namespaces.Benjamin Kramer2010-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117111 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-19
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Region::isTopLevelRegion().Tobias Grosser2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116402 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Fix trivial error that slipped in last minute.Tobias Grosser2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116400 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Update RegionInfo after a BB was split.Tobias Grosser2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116398 91177308-0d34-0410-b5e6-96231b3b80d8
* RegioInfo: Add getExpandedRegion().Tobias Grosser2010-10-13
| | | | | | | getExpandedRegion() enables us to create non canonical regions. Those regions can be used to define the largerst region, that fullfills a certain property. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116397 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Allow to update exit and entry of a region.Tobias Grosser2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116396 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Enhance addSubregion.Tobias Grosser2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116395 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Allow to set the parent region of a basic block.Tobias Grosser2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116394 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Free the RegionNodes in cache.Tobias Grosser2010-10-13
| | | | | | Contributed by: ether git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116380 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-12
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116334 91177308-0d34-0410-b5e6-96231b3b80d8
* Now with fewer extraneous semicolons!Owen Anderson2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Do not assert if a BB is not part of the dominance tree.Tobias Grosser2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110665 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix namespace polution.Dan Gohman2010-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110056 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Make sure to free cached nodes; Tobias, please check!Daniel Dunbar2010-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109650 91177308-0d34-0410-b5e6-96231b3b80d8
* RegionInfo: Add getMaxRegionExit()Tobias Grosser2010-07-27
| | | | | | | getMaxRegionExit returns the exit of the maximal refined region starting at a specific basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109496 91177308-0d34-0410-b5e6-96231b3b80d8
* Add function to query RegionInfo about loops.Tobias Grosser2010-07-27
| | | | | | | * contains(Loop), * getOutermostLoop() * Improve getNameStr() to return a sensible name, if basic blocks are not named. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109490 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DominatorTree::properlyDominates instead of dominates with anDan Gohman2010-07-26
| | | | | | | explicit inequality check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109398 91177308-0d34-0410-b5e6-96231b3b80d8
* use cascading operator-> featureGabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109104 91177308-0d34-0410-b5e6-96231b3b80d8
* use -> instead of (*).Gabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109094 91177308-0d34-0410-b5e6-96231b3b80d8
* cache dereferenced iteratorGabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109093 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new RegionInfo pass.Tobias Grosser2010-07-22
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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109089 91177308-0d34-0410-b5e6-96231b3b80d8