1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

28 Commits

Author SHA1 Message Date
Tobias Grosser
df319b5f91 Region: Allow user control the printing style of the print function.
Contributed by: etherzhhb@gmail.com

llvm-svn: 128808
2011-04-04 07:19:18 +00:00
Tobias Grosser
189efecfed 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>

llvm-svn: 123410
2011-01-13 23:18:04 +00:00
Chris Lattner
e396e846b4 split dom frontier handling stuff out to its own DominanceFrontier header,
so that Dominators.h is *just* domtree.  Also prune #includes a bit.

llvm-svn: 122714
2011-01-02 22:09:33 +00:00
Benjamin Kramer
9e988fe81e Make some symbols static, move classes into anonymous namespaces.
llvm-svn: 117111
2010-10-22 17:35:07 +00:00
Owen Anderson
46990c17f7 Get rid of static constructors for pass registration. Instead, every pass 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-19 17:21:58 +00:00
Tobias Grosser
70507511ae Add Region::isTopLevelRegion().
llvm-svn: 116402
2010-10-13 11:02:44 +00:00
Tobias Grosser
1eba2917fa RegionInfo: Fix trivial error that slipped in last minute.
llvm-svn: 116400
2010-10-13 08:00:53 +00:00
Tobias Grosser
85dce73ab5 RegionInfo: Update RegionInfo after a BB was split.
llvm-svn: 116398
2010-10-13 05:54:13 +00:00
Tobias Grosser
6aac855519 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.

llvm-svn: 116397
2010-10-13 05:54:11 +00:00
Tobias Grosser
ecfaf92c1a RegionInfo: Allow to update exit and entry of a region.
llvm-svn: 116396
2010-10-13 05:54:10 +00:00
Tobias Grosser
84dd4b54fc RegionInfo: Enhance addSubregion.
llvm-svn: 116395
2010-10-13 05:54:09 +00:00
Tobias Grosser
a2b5df5a6d RegionInfo: Allow to set the parent region of a basic block.
llvm-svn: 116394
2010-10-13 05:54:07 +00:00
Tobias Grosser
e5d4a07ab3 RegionInfo: Free the RegionNodes in cache.
Contributed by: ether

llvm-svn: 116380
2010-10-13 00:07:59 +00:00
Owen Anderson
63f757463c Begin adding static dependence information to passes, which will allow us to
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
2010-10-12 19:48:12 +00:00
Owen Anderson
69cbf2e8b7 Now with fewer extraneous semicolons!
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Tobias Grosser
7b96737b7f RegionInfo: Do not assert if a BB is not part of the dominance tree.
llvm-svn: 110665
2010-08-10 09:54:35 +00:00
Owen Anderson
f2fea95f2f Reapply r110396, with fixes to appease the Linux buildbot gods.
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Dan Gohman
213f64b54c Fix namespace polution.
llvm-svn: 110056
2010-08-02 18:50:06 +00:00
Daniel Dunbar
111cf008aa RegionInfo: Make sure to free cached nodes; Tobias, please check!
llvm-svn: 109650
2010-07-28 20:28:50 +00:00
Tobias Grosser
ebc6c0cf50 RegionInfo: Add getMaxRegionExit()
getMaxRegionExit returns the exit of the maximal refined region starting
at a specific basic block.

llvm-svn: 109496
2010-07-27 08:39:43 +00:00
Tobias Grosser
16789d79fe Add function to query RegionInfo about loops.
* contains(Loop), * getOutermostLoop()
* Improve getNameStr() to return a sensible name, if basic blocks are not named.

llvm-svn: 109490
2010-07-27 04:17:13 +00:00
Dan Gohman
0627594a67 Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

llvm-svn: 109398
2010-07-26 17:34:05 +00:00
Gabor Greif
346b13120a use cascading operator-> feature
llvm-svn: 109104
2010-07-22 13:49:27 +00:00
Gabor Greif
197322c365 use -> instead of (*).
llvm-svn: 109094
2010-07-22 11:12:32 +00:00
Gabor Greif
e826ece8c2 cache dereferenced iterator
llvm-svn: 109093
2010-07-22 11:07:46 +00:00
Tobias Grosser
604a50cd71 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".

llvm-svn: 109089
2010-07-22 07:46:31 +00:00