Chris Lattner
49a4b220eb
Expose more information to clients
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2027 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:35:30 +00:00
Chris Lattner
db70a8eff3
Add getOrInsertFunction and getFunction methods to Module. This simplifies
...
some code in the transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2026 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:32:29 +00:00
Chris Lattner
b59404280b
Add #define for MethodType
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2025 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:32:00 +00:00
Chris Lattner
0edcc41253
s/Method/Function/
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2024 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:30:59 +00:00
Chris Lattner
433906511f
Rename MethodType to FunctionType, provide a #define
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2023 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:15:32 +00:00
Chris Lattner
21ba3fec99
Remove the reduceApply functions they are obsolete things from the days before
...
we had a reasonable pass system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2022 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 22:49:49 +00:00
Chris Lattner
4dc1f82e7e
Implement getEscapingAllocations & getNonEscapingAllocations
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2021 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 19:33:00 +00:00
Chris Lattner
7d093d4231
* Rename UnlinkUndistinguishableShadowNodes & RemoveUnreachableShadowNodes
...
to reflect that they can eliminate arbitrary nodes.
* Rename the ShadowNodeEliminate.cpp file to EliminateNodes.cpp for the
same reason
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2020 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 19:16:48 +00:00
Chris Lattner
d38cadb13d
* Remove RemoveUnreachableShadowNodes & UnlinkUndistinguishableShadowNodes
...
to reflect the fact that they actually operate on arbitrary nodes
* Clean up public interface of FunctionDSGraph
* add getEscapingAllocations & getNonEscapingAllocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 19:15:38 +00:00
Chris Lattner
cdae0b2591
Ooops, I did such a great job pruning nodes, that I accidentally deleted
...
ALL allocation nodes... hrm... bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2018 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:38:38 +00:00
Chris Lattner
846f1c3c13
Add subdirs to makefile
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2017 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:21:31 +00:00
Chris Lattner
c4d5fec26f
Initial checkin of first regression test for mem2reg pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:21:05 +00:00
Chris Lattner
bfd3a6afb0
Makefile change for IPO's that use the Datastructure analysis stuff
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2015 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:10:31 +00:00
Chris Lattner
bda28f7c2a
Initial checkin of Noop pass that will be the pool allocator
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2014 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:08:31 +00:00
Chris Lattner
328207c3ff
Add hook for pool allocation pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:08:07 +00:00
Chris Lattner
25f5009d06
New file for new pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2012 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:01:22 +00:00
Chris Lattner
fe59454fa2
Checking for Cameron
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2011 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 17:56:28 +00:00
Chris Lattner
1120c8b34a
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2010 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 17:56:03 +00:00
Chris Lattner
1d8ec6194a
* 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2009 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 17:48:41 +00:00
Cameron Buschardt
0732c70ffb
Rename constructor function for mem2reg pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2008 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 23:29:23 +00:00
Cameron Buschardt
b1be061a76
* Move classes around
...
* rename constructor function
* Move stuff into anonymous namespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2007 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 23:28:40 +00:00
Cameron Buschardt
5758eec1e0
Rename constructor function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2006 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 23:27:45 +00:00
Cameron Buschardt
98a37c2b9c
Implemented promote mem->reg pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2005 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 23:17:37 +00:00
Chris Lattner
2ba3a72c3a
* 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2004 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:48:03 +00:00
Chris Lattner
6088c4f55e
* Implement DSNode::removeAllIncomingEdges
...
* Implement Critical Shadow node handling
* Implement routines to determine whether an allocation node is a malloc
or alloca
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2003 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:46:05 +00:00
Chris Lattner
f4066b3fe1
* Add critical node support
...
* Optimize graph after building it. This should be unneccesary in the future
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:45:12 +00:00
Chris Lattner
ea4af65b72
* Destroy alloca nodes when a graph gets inlined
...
* Add links to all subtrees when a shadow node gets resolved
* Add critical node handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2001 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:44:33 +00:00
Chris Lattner
b3ebdadb2c
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2000 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:41:45 +00:00
Chris Lattner
9d42a1d2f9
* Optimizers return true on change
...
* Implement indistinguishable shadow node elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1999 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:55:13 +00:00
Chris Lattner
dd3fc184f5
Fix long line
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1998 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:54:31 +00:00
Chris Lattner
df8af1ca89
* Because of optimization, the shadow nodes between arguments might get
...
removed. Check to see if they are there.
* Repeat optimizations while changing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:53:57 +00:00
Chris Lattner
26f8a40b51
Allow isa<DSNode>(..)
...
Simplification routines return true on change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1996 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:52:57 +00:00
Chris Lattner
bc132d62d3
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1995 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 22:43:12 +00:00
Chris Lattner
bb2a28fec5
Initial checkin of Datastructure analysis.
...
Has bugs, but shouldn't crash in theory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 22:39:06 +00:00
Chris Lattner
d9ddf05014
New header file for datastructure analysis
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1993 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 22:38:45 +00:00
Chris Lattner
9a3d69649a
Change from Method to Function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1992 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 18:02:30 +00:00
Chris Lattner
79df7c0aaa
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1991 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 18:01:55 +00:00
Chris Lattner
b0d04726db
Convert to use new style casts instead of direct checking
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1990 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:58:12 +00:00
Chris Lattner
e590ff260e
change refs to Method to Function
...
Change references to MEthodArgument to FunctionArgument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1989 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:55:33 +00:00
Chris Lattner
0fc0c1d3e1
Change uses of Method to Function
...
Change uses of methodArgument to FunctionArgument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1988 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:49:55 +00:00
Chris Lattner
b277d1d0e0
Remove unneccesary forward declarations for classes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1987 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:49:00 +00:00
Chris Lattner
19b0411c95
Transform uses of Method into uses of Function.
...
Rename MethodArgument to FunctionArgument
Fix some _really_ out of date comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1986 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:48:08 +00:00
Chris Lattner
7797946c5e
Allow clients to use FunctionType as well as MethodType for now
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1985 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:46:41 +00:00
Vikram S. Adve
12bcf84e53
Make test more rigorous. It was never reading the non-scalar variables
...
from memory! Also, separate the writing and reading routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1983 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 13:22:04 +00:00
Chris Lattner
dea73e5ca8
initialize sum variable
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1982 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 07:03:10 +00:00
Vikram S. Adve
dfe412dc8b
Refix bug: Add back method MachineCodeForInstruction::dropAllReferences.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1980 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:58:02 +00:00
Vikram S. Adve
4cbd55062d
Fix padding when allocating local variables on stack.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1979 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:57:38 +00:00
Vikram S. Adve
4fad513704
Add methods to support type inquiry. Rename TmpInstruction values.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1978 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:56:55 +00:00
Vikram S. Adve
b6efb3605f
Moved to directory Scalar/ and renamed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1977 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:55:06 +00:00
Vikram S. Adve
9c4f7268c6
Destroy MethodLiveVarInfo after register allocation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1976 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:54:03 +00:00