Commit Graph

11 Commits

Author SHA1 Message Date
Tobias Grosser
21d842c353 Add single entry / single exit accessors.
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
2011-01-13 23:18:04 +00:00
Benjamin Kramer
e98fbba91f Remove noisy semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 15:55:12 +00:00
Tobias Grosser
b227930cd6 Add Region::isTopLevelRegion().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116402 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 11:02:44 +00:00
Tobias Grosser
592316c419 RegionInfo: Update RegionInfo after a BB was split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 05:54:13 +00:00
Tobias Grosser
c69bd733c0 RegioInfo: Add getExpandedRegion().
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
2010-10-13 05:54:11 +00:00
Tobias Grosser
4bcc0228dc RegionInfo: Allow to update exit and entry of a region.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 05:54:10 +00:00
Tobias Grosser
9649390e1f RegionInfo: Enhance addSubregion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 05:54:09 +00:00
Tobias Grosser
9ee5c50776 RegionInfo: Allow to set the parent region of a basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 05:54:07 +00:00
Tobias Grosser
0e6fcf4be3 RegionInfo: Add getMaxRegionExit()
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
2010-07-27 08:39:43 +00:00
Tobias Grosser
082d587d35 Add function to query RegionInfo about loops.
* 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
2010-07-27 04:17:13 +00:00
Tobias Grosser
f96b006367 Add new RegionInfo pass.
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
2010-07-22 07:46:31 +00:00