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
Vikram S. Adve
97fb99bc54
Use deterministic iterator for SchedGraphs. This is actually not
...
useful right now when we only do local scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1975 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:53:03 +00:00
Vikram S. Adve
1392d6903c
Bug fix: nextToTry was not being initialized in one case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1974 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:46:15 +00:00
Vikram S. Adve
7c7e46ae5f
Add option to disable scheduling.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1973 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:45:35 +00:00
Vikram S. Adve
802cec485f
Add option to disable scheduling.
...
Destroy live-variable information after scheduling so it is
recomputed before later phases (e.g., reg. allocation).
Use deterministic iterator to enumerate sched graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1972 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:44:55 +00:00
Vikram S. Adve
cf8a98f2c2
Minor changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1971 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:40:59 +00:00
Vikram S. Adve
ded1bf8cd8
Re-fix bug: Put back MachineCodeForInstruction::dropAllReferences.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:40:11 +00:00
Vikram S. Adve
e4e4d4e2f9
Fix padding for variables allocated on stack.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:39:26 +00:00
Vikram S. Adve
c941b87397
Major overhaul to FoldGetElemPtr to handle mixed array and struct refs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:37:53 +00:00
Vikram S. Adve
4e7bc49b54
Use deterministic iterator for treeRoots.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:36:52 +00:00
Vikram S. Adve
d7e6becd3e
Bug re-fix: put back MachineCodeForInstruction::get(*I).dropAllReferences().
...
Also re-enable instr. scheduling pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1966 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:35:16 +00:00
Vikram S. Adve
585612e556
Change latencies for Load, Store and Branch instructions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:33:53 +00:00
Vikram S. Adve
fd3900ad57
Major enhancements to how array and structure indices are handled.
...
Improve checking for constants in Multiply.
Simpler method to keep track of when a node is folded into its parent.
Several other bug fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:33:02 +00:00
Vikram S. Adve
6be4ebe1eb
Change treeRoots data structure to make enumeration deterministic.
...
Also, add a flag to marked nodes that do not need code because they
have been folded into the user (parent in the BURG tree).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1963 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:25:17 +00:00
Vikram S. Adve
d95919cbd0
Change treeRoots data structure to make enumeration deterministic.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1962 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:24:00 +00:00
Vikram S. Adve
98d64f8d51
Major overhaul to support arbitrary mixed array and structure indices.
...
Also moved to the Scalar/ directory and renamed to "MultiDim".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1961 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:21:18 +00:00
Vikram S. Adve
d32e70a09f
Rename pass to DecomposeMultiDimRefs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:19:54 +00:00
Vikram S. Adve
c99afb88ab
Fix out-of-date name.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1959 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:18:49 +00:00
Vikram S. Adve
79c738599b
Regression tests for DecomposeMultiDimRefs pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:17:16 +00:00
Chris Lattner
e7506a366e
Rename Method to Function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:51:58 +00:00