1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 06:22:51 +01:00
Commit Graph

2136 Commits

Author SHA1 Message Date
Chris Lattner
5df9c977e1 s/Method/Function
llvm-svn: 2043
2002-03-29 17:08:29 +00:00
Chris Lattner
4e79dc8099 Rename getCalledMethod to getCalledFunction
llvm-svn: 2042
2002-03-29 17:08:01 +00:00
Chris Lattner
01affcf43e Remove getCalledMethod. Use getCalledFunction instead
llvm-svn: 2041
2002-03-29 17:07:34 +00:00
Chris Lattner
3a9f1dd66a Modularize code a bit
llvm-svn: 2040
2002-03-29 06:21:38 +00:00
Chris Lattner
7c2529076a Implement the first step of pool allocation - Creating, initialization, and
destruction of the pools.

llvm-svn: 2039
2002-03-29 05:50:20 +00:00
Chris Lattner
18cc6a9277 Add an insert method to VAlueHolder to allow batch insertion
llvm-svn: 2038
2002-03-29 05:49:37 +00:00
Chris Lattner
474495e742 Add new addTypeName method to Module class
llvm-svn: 2037
2002-03-29 04:48:40 +00:00
Chris Lattner
dc0566e721 s/Method/Function
llvm-svn: 2036
2002-03-29 03:57:15 +00:00
Chris Lattner
8c98acc07f s/Method/Function
llvm-svn: 2035
2002-03-29 03:51:11 +00:00
Chris Lattner
084601e6f4 s/Method/Function
llvm-svn: 2034
2002-03-29 03:44:36 +00:00
Chris Lattner
c32e9901b1 Implement new getFunction and getOrInsertFunction methods
llvm-svn: 2033
2002-03-29 03:44:18 +00:00
Chris Lattner
a2d3c99dfc Simplify code a bit by using Module::getOrInsertFunction
llvm-svn: 2032
2002-03-29 03:43:24 +00:00
Chris Lattner
815e2f4daa Flesh out a bunch more code, print allocations that are poolable.
llvm-svn: 2031
2002-03-29 03:40:59 +00:00
Chris Lattner
e46e35806a s/method/function
llvm-svn: 2030
2002-03-29 03:40:25 +00:00
Chris Lattner
4ca6fd00f2 s/Method/Function/g
llvm-svn: 2029
2002-03-29 03:39:36 +00:00
Chris Lattner
b7f4043df7 Simplify code a lot by using the Module::getFunction & getOrInsertFunction
llvm-svn: 2028
2002-03-29 03:38:05 +00:00
Chris Lattner
ca2c7dbf7c Expose more information to clients
llvm-svn: 2027
2002-03-29 03:35:30 +00:00
Chris Lattner
33ff5dc7e7 Add getOrInsertFunction and getFunction methods to Module. This simplifies
some code in the transformations.

llvm-svn: 2026
2002-03-29 03:32:29 +00:00
Chris Lattner
0cc345f1d3 Add #define for MethodType
llvm-svn: 2025
2002-03-29 03:32:00 +00:00
Chris Lattner
597198838d s/Method/Function/
llvm-svn: 2024
2002-03-29 03:30:59 +00:00
Chris Lattner
4823b956bc Rename MethodType to FunctionType, provide a #define
llvm-svn: 2023
2002-03-29 03:15:32 +00:00
Chris Lattner
ab9cc61ceb Remove the reduceApply functions they are obsolete things from the days before
we had a reasonable pass system

llvm-svn: 2022
2002-03-28 22:49:49 +00:00
Chris Lattner
cab0ce8244 Implement getEscapingAllocations & getNonEscapingAllocations
llvm-svn: 2021
2002-03-28 19:33:00 +00:00
Chris Lattner
513ecd7256 * Rename UnlinkUndistinguishableShadowNodes & RemoveUnreachableShadowNodes
to reflect that they can eliminate arbitrary nodes.
* Rename the ShadowNodeEliminate.cpp file to EliminateNodes.cpp for the
  same reason

llvm-svn: 2020
2002-03-28 19:16:48 +00:00
Chris Lattner
2f9f87a984 * Remove RemoveUnreachableShadowNodes & UnlinkUndistinguishableShadowNodes
to reflect the fact that they actually operate on arbitrary nodes
* Clean up public interface of FunctionDSGraph
* add getEscapingAllocations & getNonEscapingAllocations

llvm-svn: 2019
2002-03-28 19:15:38 +00:00
Chris Lattner
fa67ad938c Ooops, I did such a great job pruning nodes, that I accidentally deleted
ALL allocation nodes... hrm... bad.

llvm-svn: 2018
2002-03-28 18:38:38 +00:00
Chris Lattner
42ebbcbaf7 Add subdirs to makefile
llvm-svn: 2017
2002-03-28 18:21:31 +00:00
Chris Lattner
f5c61bb390 Initial checkin of first regression test for mem2reg pass
llvm-svn: 2016
2002-03-28 18:21:05 +00:00
Chris Lattner
362aa65cca Makefile change for IPO's that use the Datastructure analysis stuff
llvm-svn: 2015
2002-03-28 18:10:31 +00:00
Chris Lattner
0336a78488 Initial checkin of Noop pass that will be the pool allocator
llvm-svn: 2014
2002-03-28 18:08:31 +00:00
Chris Lattner
73edb721e8 Add hook for pool allocation pass
llvm-svn: 2013
2002-03-28 18:08:07 +00:00
Chris Lattner
9f9685197c New file for new pass
llvm-svn: 2012
2002-03-28 18:01:22 +00:00
Chris Lattner
6e01190339 Checking for Cameron
llvm-svn: 2011
2002-03-28 17:56:28 +00:00
Chris Lattner
55186e7abf Many changes
* Simplify a lot of the inlining stuff.  There are still problems, but not
  many
* Break up the Function representation to have a vector for every different
  node type so it is fast to find nodes of a particular flavor.
* Do more intelligent merging of call values
* Allow elimination of unreachable shadow and allocation nodes
* Generalize indistinguishability testing to allow merging of identical calls.
* Increase shadow node merging power

llvm-svn: 2010
2002-03-28 17:56:03 +00:00
Chris Lattner
4054edc567 * Define some operators on PointerVal and PVS's
* Nodes can determine whether they are foldable with another node
* Rename NewDSNode to AllocDSNode
* The Function graph breaks up all of the node types into individual
  vectors to alloc fast access when you are looking for a particular type
  of node.  Simplifies much code.

llvm-svn: 2009
2002-03-28 17:48:41 +00:00
Cameron Buschardt
788a1aaab0 Rename constructor function for mem2reg pass.
llvm-svn: 2008
2002-03-27 23:29:23 +00:00
Cameron Buschardt
49c09d5b24 * Move classes around
* rename constructor function
* Move stuff into anonymous namespaces

llvm-svn: 2007
2002-03-27 23:28:40 +00:00
Cameron Buschardt
6ca2f4e859 Rename constructor function
llvm-svn: 2006
2002-03-27 23:27:45 +00:00
Cameron Buschardt
bcff69b0f4 Implemented promote mem->reg pass.
llvm-svn: 2005
2002-03-27 23:17:37 +00:00
Chris Lattner
d771725ed1 * Add #define to enabled debug messages
* Move removeEdgesTo to be a member of DSNode
* Implement (but #ifdef out) the new, spiffier, method of determining
  shadow node equivalence.  This cannot be enabled until more is
  implemented.

llvm-svn: 2004
2002-03-27 19:48:03 +00:00
Chris Lattner
4c6e9cda3f * Implement DSNode::removeAllIncomingEdges
* Implement Critical Shadow node handling
* Implement routines to determine whether an allocation node is a malloc
  or alloca

llvm-svn: 2003
2002-03-27 19:46:05 +00:00
Chris Lattner
a16c85b43d * Add critical node support
* Optimize graph after building it.  This should be unneccesary in the future

llvm-svn: 2002
2002-03-27 19:45:12 +00:00
Chris Lattner
9aff5a8047 * Destroy alloca nodes when a graph gets inlined
* Add links to all subtrees when a shadow node gets resolved
* Add critical node handling

llvm-svn: 2001
2002-03-27 19:44:33 +00:00
Chris Lattner
4defbc34ff * Add a nice utility method to DSNode
* Export interface to tell whether an alloc node represent a malloc or alloca
* Add the concept of a "critical" shadow node

llvm-svn: 2000
2002-03-27 19:41:45 +00:00
Chris Lattner
2a3d6c83ff * Optimizers return true on change
* Implement indistinguishable shadow node elimination

llvm-svn: 1999
2002-03-27 00:55:13 +00:00
Chris Lattner
ae0192e2f6 Fix long line
llvm-svn: 1998
2002-03-27 00:54:31 +00:00
Chris Lattner
8a44f81684 * Because of optimization, the shadow nodes between arguments might get
removed.  Check to see if they are there.
* Repeat optimizations while changing

llvm-svn: 1997
2002-03-27 00:53:57 +00:00
Chris Lattner
e01e339e93 Allow isa<DSNode>(..)
Simplification routines return true on change

llvm-svn: 1996
2002-03-27 00:52:57 +00:00
Chris Lattner
d425cc5987 * Add support for DataStructure analysis
* Parameterize pass outputting with the printPass template, so analysis
  output can optionally take more arguments than just a stream.  The
  default output mode is just to use operator<< on the analysis.
* Remove CurrentModule hack, in favor of using printPass
* Remove special operator<<'s defined for FindUsedTypes and
  FindUnsafePointerTypes, in favor of printPass specializations
* Use std::cout instead of cout

llvm-svn: 1995
2002-03-26 22:43:12 +00:00
Chris Lattner
d5b115e687 Initial checkin of Datastructure analysis.
Has bugs, but shouldn't crash in theory.

llvm-svn: 1994
2002-03-26 22:39:06 +00:00