Chris Lattner
8a53fbd0d0
s/Method/Function
...
llvm-svn: 2348
2002-04-28 04:47:06 +00:00
Chris Lattner
d8cb4cfb30
Module's are no longer Value's.
...
llvm-svn: 2347
2002-04-28 04:46:29 +00:00
Chris Lattner
352dadc1d1
The interesting contents of SymTabValue were incorporated into Function
...
llvm-svn: 2346
2002-04-28 04:46:07 +00:00
Chris Lattner
24a00025ac
* Module's are no longer Value's
...
* Incorporate SymTabValue contents into the Module class
llvm-svn: 2345
2002-04-28 04:45:48 +00:00
Chris Lattner
4f33b2e3ed
Add a forward defn for Module since it's no longer in Value.h
...
llvm-svn: 2344
2002-04-28 04:45:05 +00:00
Chris Lattner
d5d0313e9d
* Incorporate the functionality of SymTabValue into Function
...
* s/Method/Function
llvm-svn: 2343
2002-04-28 04:44:40 +00:00
Chris Lattner
0bd57e6e99
Initial checkin of simple&fast SSA based GCSE algorithm
...
llvm-svn: 2338
2002-04-28 00:47:11 +00:00
Chris Lattner
741453dd60
Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
...
const BasicBlocks
llvm-svn: 2337
2002-04-28 00:15:57 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
bc2e4fd4cf
s/Method/Function in classname
...
llvm-svn: 2335
2002-04-27 06:59:56 +00:00
Chris Lattner
048c4eaafe
Remove old file that will never be used
...
llvm-svn: 2334
2002-04-27 06:57:52 +00:00
Chris Lattner
536cf1b13f
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
16601b03cf
Change the semantics of getSuccessor to FAIL if an out of range successor # is attempted.
...
llvm-svn: 2330
2002-04-27 03:14:12 +00:00
Chris Lattner
ff8530eabd
Support array allocations
...
llvm-svn: 2326
2002-04-27 02:27:11 +00:00
Chris Lattner
c5db0cc189
Rename getNullConstant to getNullValue
...
llvm-svn: 2321
2002-04-27 02:22:42 +00:00
Vikram S. Adve
5c851091e5
Added functions to compute the offset of a given incoming or outgoing
...
argument. These are no longer allocated as they are discovered.
llvm-svn: 2320
2002-04-25 04:48:54 +00:00
Vikram S. Adve
ae709134c9
Optional args are no longer allocated as they are discovered.
...
(This can be improved to avoid making the initial pass over the method.)
Also, ensure automatic vars and reg. spills areas are not extended
if their sizes are used for computing some other offset.
llvm-svn: 2319
2002-04-25 04:47:26 +00:00
Chris Lattner
006a45af20
Changes to make print pass work!
...
llvm-svn: 2306
2002-04-18 22:11:12 +00:00
Chris Lattner
bfad09f50d
Remove getStrValue method from Constant implementations. The AssemblyWriter
...
now knows how to write out a constant, not the constants themselves. This is
fixed due to the move of the AsmWriter to the VMcore library.
llvm-svn: 2297
2002-04-18 18:51:39 +00:00
Chris Lattner
3cdb370e13
* Add a comment to the header giving a breif overview of how to return a
...
value from a visit function
* Define a (file local) DELEGATE macro to make the code easier to read/maintain
* Define per-opcode delegation functions so that users can override specific
instances of BinaryOperator for example.
llvm-svn: 2290
2002-04-18 16:16:16 +00:00
Chris Lattner
fea39ddbf3
* Make dtor virtual
...
* Add a new defaulted argument that allows the instruction visitation
visitors to return a non-void value.
llvm-svn: 2289
2002-04-18 15:46:40 +00:00
Chris Lattner
e47ac70405
* StoreInst's shouldn't take names (they are _always_ void type)
...
* Remove two methods that are not used
llvm-svn: 2281
2002-04-18 14:42:27 +00:00
Chris Lattner
6830bf4c34
Make data structure acurately get ALL edges, even loads of null fields of
...
nodes that are not shadow nodes
llvm-svn: 2273
2002-04-17 03:24:47 +00:00
Chris Lattner
407c7385f8
Remove the concept of a critical shadow node
...
llvm-svn: 2265
2002-04-16 20:39:23 +00:00
Chris Lattner
e673eb0d73
* Eliminate ArgDSNode's completely, rely now on Scalar map
...
llvm-svn: 2256
2002-04-16 03:41:22 +00:00
Chris Lattner
bd8fdf2d57
* s/Method/Function
...
* Add/allow callbacks for module,function, & basic block visiting
llvm-svn: 2250
2002-04-15 19:32:36 +00:00
Chris Lattner
65dd63d712
s/Method/Function
...
llvm-svn: 2246
2002-04-14 06:14:15 +00:00
Chris Lattner
92b32c82bf
Add Module::getTypeName
...
llvm-svn: 2237
2002-04-13 18:58:33 +00:00
Chris Lattner
86083cf0be
Split the CleanupGCCOutput pass into two passes, and add real life actual
...
documentation on when they do.
llvm-svn: 2222
2002-04-10 20:31:22 +00:00
Chris Lattner
6bad210fa6
Allow a pass to obtain an analysis result for updating.
...
llvm-svn: 2221
2002-04-10 20:30:44 +00:00
Chris Lattner
4434e03eb6
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2217
2002-04-09 19:59:31 +00:00
Chris Lattner
a21d26e9ea
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2210
2002-04-09 19:36:56 +00:00
Chris Lattner
cdc0946863
Use explicit .get() calls to avoid having to #include Function.h
...
llvm-svn: 2208
2002-04-09 19:07:44 +00:00
Chris Lattner
1b65d5368f
Use .get() explicitly and add a few extra casts to avoid 2 #includes
...
llvm-svn: 2204
2002-04-09 18:36:05 +00:00
Chris Lattner
8d90bff39b
Use opaque decl instead of #include
...
llvm-svn: 2203
2002-04-09 18:35:38 +00:00
Chris Lattner
15d1c69edd
Rewrite MachineCodeForBasicBlock in terms of containment rather than
...
inheritance.
llvm-svn: 2200
2002-04-09 18:00:49 +00:00
Chris Lattner
0448b61465
Free memory when done with it.
...
llvm-svn: 2198
2002-04-09 15:04:37 +00:00
Chris Lattner
0a8a112014
Don't leak all of the Loop objects created...
...
llvm-svn: 2196
2002-04-09 05:43:19 +00:00
Chris Lattner
259b748661
Move the InsertPrologEpilogCode class out of the Sparc.cpp file into the
...
new PrologEpilogCodeInserter.cpp file, and include the bodies of the
GetInstructionsFor(Prolog|Epilog) functions from SparcInstrSelection.cpp
into the class. This eliminates the need for a static global vector of
instructions and a class of errors that is really unneccesary.
llvm-svn: 2194
2002-04-09 05:20:15 +00:00
Chris Lattner
e7a2ce6e4e
Don't leak memory like a seive
...
llvm-svn: 2185
2002-04-08 23:09:07 +00:00
Chris Lattner
c8166cec07
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
6bdd1d2e3f
* Add virtual print methods
...
* s/Method/Function
llvm-svn: 2172
2002-04-08 21:56:02 +00:00
Chris Lattner
16d4d12f80
* Trim #includes
...
* Remove WriteToAssembly functions from interface
* Move operator<< definition to only allow top level operator<< on Value*'s.
Defined in Value.h
This header file is greatly deemphasized by these changes. Now it is only
used if custom printing through WriteTypeSymbolic or WriteAsOperand is needed.
llvm-svn: 2171
2002-04-08 21:55:12 +00:00
Chris Lattner
e84fbd7f37
s/Method/Function
...
Trim #includes
llvm-svn: 2170
2002-04-08 21:52:58 +00:00
Chris Lattner
ada9cc6352
Trim #includes
...
llvm-svn: 2169
2002-04-08 21:52:32 +00:00
Chris Lattner
c49ebac684
* Move casting stuff out to Support/Casting.h
...
* Add top level virtual print function, disallows instantiating Value's
directly.
* Provide operator<< for values here, instead of in Assembly/Writer.h
llvm-svn: 2168
2002-04-08 21:51:32 +00:00
Chris Lattner
cd1e9db9ad
* Fix comment
...
* Add printing support
* add isFloatingPoint method
* Remove isXXXType() methods for non-derived types
llvm-svn: 2167
2002-04-08 21:50:15 +00:00
Chris Lattner
5bcb2e2b26
Minor change to reflect that ConstantHandling is now part of VMCore
...
llvm-svn: 2163
2002-04-08 20:15:12 +00:00
Chris Lattner
137fa92dce
* Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
...
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function
llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
1cce117059
VCG output support removed because it was broken and will never be used.
...
llvm-svn: 2146
2002-04-07 22:30:17 +00:00
Chris Lattner
bc15ae64dd
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
96ac1e9960
Source base has been completely changed over to use Function instead of Method, this file is not obsolete.
...
llvm-svn: 2143
2002-04-07 20:46:56 +00:00
Chris Lattner
e7b5d159c5
Implement constant propogation of multiply and divide instructions!!
...
llvm-svn: 2134
2002-04-07 08:10:14 +00:00
Chris Lattner
a1dce398bf
* Delete getNumAbstractTypeUsers method
...
* Move addAbstractTypeUser method to Type.cpp
llvm-svn: 2120
2002-04-05 22:21:08 +00:00
Chris Lattner
8afff0c29a
s/MethodType/FunctionType
...
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
e395bc7d85
Remove backwards compatibility code
...
llvm-svn: 2114
2002-04-04 22:04:45 +00:00
Chris Lattner
0901828113
Deparameterize PATypeHolder
...
llvm-svn: 2099
2002-04-04 19:20:18 +00:00
Chris Lattner
f31c01714f
Add method to get # nodes in the graph
...
llvm-svn: 2098
2002-04-04 19:20:00 +00:00
Chris Lattner
4cf90e67f8
Make the release build work
...
llvm-svn: 2097
2002-04-04 19:19:27 +00:00
Chris Lattner
78cfad6270
Fix the release build
...
llvm-svn: 2096
2002-04-04 19:18:17 +00:00
Chris Lattner
e391cdd3c1
* Add dump() virtual function to AbstractType user to help track down bugs
...
* PATypeHolder is now a nontemplated class, because it was (almost) only
ever instantiated with 'Type' as the parameter.
llvm-svn: 2095
2002-04-04 19:18:00 +00:00
Chris Lattner
0f0829f28d
Add a new replaceWith method useful for replacing instructions
...
llvm-svn: 2088
2002-04-01 17:52:16 +00:00
Chris Lattner
ce662b0ee9
Shadow nodes don't need to know their explicit parent, they just need to
...
know what type to be.
llvm-svn: 2080
2002-04-01 00:12:36 +00:00
Vikram S. Adve
6ac730799c
Add method getCallInstIndirectAddrVal() to add call interference
...
for this value.
llvm-svn: 2072
2002-03-31 18:58:49 +00:00
Vikram S. Adve
c2c33ba3fd
Include temp. values when computing max. size of stack frame!
...
llvm-svn: 2070
2002-03-31 18:57:49 +00:00
Chris Lattner
0a70c8a163
* Allow access to DSNode iterator as DSNode::iterator/begin/end
...
* Add debugging "dump" method to DSNode
* Fix bugs in DSNode iterator
llvm-svn: 2060
2002-03-31 07:11:20 +00:00
Chris Lattner
c3b299b9ba
Initial checkin of file:
...
Define an iterator to operate over data structure outgoing links and
graph implementation so generic graph functions can be used.
llvm-svn: 2057
2002-03-30 09:13:23 +00:00
Chris Lattner
06ffc5b249
Add accessors and a method to get all the outgoing links for ALL nodes
...
llvm-svn: 2055
2002-03-30 09:07:51 +00:00
Chris Lattner
fb50c702c4
Add an accessor
...
llvm-svn: 2054
2002-03-30 04:02:41 +00:00
Chris Lattner
289f7690fe
Add a hook to allow the datastructure to keep naturally up to date, even
...
though it's not entirely fleshed out.
llvm-svn: 2051
2002-03-29 21:23:29 +00:00
Chris Lattner
c8291c9eb1
Add more accessors
...
llvm-svn: 2047
2002-03-29 19:04:19 +00:00
Chris Lattner
4e65b19a54
Checkin new useful routine
...
llvm-svn: 2046
2002-03-29 19:04:08 +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
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
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
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
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
9f9685197c
New file for new pass
...
llvm-svn: 2012
2002-03-28 18:01:22 +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
6ca2f4e859
Rename constructor function
...
llvm-svn: 2006
2002-03-27 23:27:45 +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
e01e339e93
Allow isa<DSNode>(..)
...
Simplification routines return true on change
llvm-svn: 1996
2002-03-27 00:52:57 +00:00
Chris Lattner
1026adab40
New header file for datastructure analysis
...
llvm-svn: 1993
2002-03-26 22:38:45 +00:00
Chris Lattner
fecabeab3c
Change uses of Method to Function
...
Change uses of methodArgument to FunctionArgument
llvm-svn: 1988
2002-03-26 17:49:55 +00:00
Chris Lattner
5295e0fdcc
Remove unneccesary forward declarations for classes
...
llvm-svn: 1987
2002-03-26 17:49:00 +00:00
Chris Lattner
a874026838
Transform uses of Method into uses of Function.
...
Rename MethodArgument to FunctionArgument
Fix some _really_ out of date comments
llvm-svn: 1986
2002-03-26 17:48:08 +00:00
Chris Lattner
9e84a283e3
Allow clients to use FunctionType as well as MethodType for now
...
llvm-svn: 1985
2002-03-26 17:46:41 +00:00
Vikram S. Adve
9722a4b6e9
Refix bug: Add back method MachineCodeForInstruction::dropAllReferences.
...
llvm-svn: 1980
2002-03-24 03:58:02 +00:00
Vikram S. Adve
0a68a60e95
Fix padding when allocating local variables on stack.
...
llvm-svn: 1979
2002-03-24 03:57:38 +00:00
Vikram S. Adve
aaad217cc1
Add methods to support type inquiry. Rename TmpInstruction values.
...
llvm-svn: 1978
2002-03-24 03:56:55 +00:00
Vikram S. Adve
463af87e8c
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).
llvm-svn: 1963
2002-03-24 03:25:17 +00:00
Vikram S. Adve
1f5e8f93cc
Major overhaul to support arbitrary mixed array and structure indices.
...
Also moved to the Scalar/ directory and renamed to "MultiDim".
llvm-svn: 1961
2002-03-24 03:21:18 +00:00
Chris Lattner
c481e92886
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Chris Lattner
6298cccfb9
Remove extranous forward decl
...
llvm-svn: 1956
2002-03-23 22:48:21 +00:00
Chris Lattner
418a519513
Remove unneccesary forward definitions
...
llvm-svn: 1955
2002-03-23 22:48:07 +00:00
Chris Lattner
9bb81deeb2
Add transition header file
...
llvm-svn: 1954
2002-03-23 22:47:43 +00:00
Chris Lattner
6cfb9cf484
Update documentation, rename Method to Function, move typedef to Value.h for now.
...
llvm-svn: 1953
2002-03-23 22:47:28 +00:00
Chris Lattner
e57136e0bf
Change Method to Function
...
llvm-svn: 1952
2002-03-23 22:46:51 +00:00
Chris Lattner
1ff9888023
Add transition typedef to Function
...
llvm-svn: 1951
2002-03-23 21:59:53 +00:00
Vikram S. Adve
d0e5520726
New pass to convert Convert multi-dimensional
...
array references into 1-D references.
llvm-svn: 1950
2002-03-23 20:46:18 +00:00
Vikram S. Adve
cae64b9e24
Moved to Scalar/ directory.
...
llvm-svn: 1949
2002-03-23 20:44:37 +00:00
Chris Lattner
e8057176ec
* Make AllocationInst ctor protected
...
* Move AllocationInst ctor to iMemory.cpp
* AllocationInst's always have one operand, even if it is a uint 1
llvm-svn: 1938
2002-03-21 22:37:01 +00:00
Chris Lattner
7b3dc0948b
Remove a misguided API extension
...
llvm-svn: 1926
2002-03-21 05:46:43 +00:00
Chris Lattner
e3bca2be3b
Allow implementation of all HANDLE_*_INST macros at once by defining HANDLE_INST
...
llvm-svn: 1919
2002-03-19 05:51:18 +00:00
Vikram S. Adve
2587f1aca7
New pass to convert Convert multi-dimensional
...
array references into 1-D references.
llvm-svn: 1918
2002-03-19 02:10:34 +00:00
Vikram S. Adve
aae5fcc0ca
Big bug fix: killed uses were being inserted instead of erased!
...
Also added a set of debug options.
llvm-svn: 1917
2002-03-19 00:59:08 +00:00
Chris Lattner
456d7bea78
Initial checkin of InstVisitor class
...
llvm-svn: 1916
2002-03-18 19:07:42 +00:00
Chris Lattner
4af1704877
Add isa,cast,dyncast support for AllocationInst.
...
llvm-svn: 1915
2002-03-18 05:00:51 +00:00
Vikram S. Adve
6ea96e596c
Added function computeOffsetforLocalVar to check how big the
...
offset-from-FP will be before allocating space for a local variable.
llvm-svn: 1900
2002-03-18 03:23:29 +00:00
Vikram S. Adve
abd6592e16
Use vector for machine instructions in GetInstructionsByRule.
...
llvm-svn: 1899
2002-03-18 03:20:46 +00:00
Vikram S. Adve
6e25a66e75
Added machine-independent value for INVALID_MACHINE_OPCODE.
...
Just cosmetic changes otherwise.
llvm-svn: 1898
2002-03-18 03:19:38 +00:00
Vikram S. Adve
4d3248ddc4
Add function getRegClassIDOfType.
...
getRegClassIDOfValue is now just a wrapper around this.
llvm-svn: 1897
2002-03-18 03:18:28 +00:00
Vikram S. Adve
778410c47a
Bug fix in setting CC register.
...
Also use distinct names for the three types of SetMachineOperand
to avoid painful overloading problems and errors.
llvm-svn: 1894
2002-03-18 03:10:17 +00:00
Chris Lattner
4f4609a284
Convert the top line of the header from .cpp style to .h style.
...
llvm-svn: 1884
2002-03-17 21:16:22 +00:00
Chris Lattner
889b1e5b00
Fix bug: test/Regression/Other/2002-03-11-ConstPropCrash.ll
...
llvm-svn: 1858
2002-03-11 22:11:07 +00:00
Chris Lattner
b44f81b987
* Add new method localLookup
...
* SymbolTable::remove(Value *N) checks to see if we are internally
inconsistent before looking for a type plane (caused a crash)
* insertEntry now does a local lookup instead of a global lookup, which was
causing an infinite loop in the renamer logic.
* Added assertions to make sure stuff stays happy
* Now the linker correctly links the SPECINT2000 mcf benchmark
llvm-svn: 1840
2002-03-08 20:26:17 +00:00
Chris Lattner
e7204f3c24
Fix typo in comment
...
llvm-svn: 1834
2002-03-08 18:38:08 +00:00
Chris Lattner
0f0ed63279
Clean up call graph, add comments, and fix test/Regression/Other/2002-01-31-CallGraph.ll
...
llvm-svn: 1828
2002-03-06 20:19:35 +00:00
Chris Lattner
5cea52a4d5
Move callgraph printing out of writer.h into callgraph.h
...
llvm-svn: 1824
2002-03-06 17:59:45 +00:00
Chris Lattner
4830f16b6e
Pull Callgraph out of the cfg namespace
...
llvm-svn: 1821
2002-03-06 17:39:28 +00:00
Chris Lattner
962e012ad5
Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
...
llvm-svn: 1820
2002-03-06 17:16:43 +00:00
Chris Lattner
e2383e8592
Change over to use new style pass mechanism, now passes only expose small
...
creation functions in their public header file, unless they can help it.
llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
3ca03295c4
Expose verifier for method and module, and accept constant structures
...
llvm-svn: 1814
2002-02-26 21:38:48 +00:00
Chris Lattner
1b9b843452
Move ProfilePaths class into ProfilePaths library, only expose a creation function
...
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Anand Shukla
47588b8119
Initial check in of header file for profile-paths pass
...
llvm-svn: 1801
2002-02-26 18:43:03 +00:00
Chris Lattner
b10862d793
Make it compile with GCC 3.0.4
...
llvm-svn: 1786
2002-02-24 23:01:21 +00:00
Chris Lattner
9942a79fcd
Modernize verifier interface
...
llvm-svn: 1780
2002-02-20 17:54:35 +00:00
Chris Lattner
aa07d741cb
Fix isArrayAllocation() to be correct
...
llvm-svn: 1779
2002-02-19 21:24:17 +00:00
Chris Lattner
650f6653a6
Minor cleanups I missed
...
llvm-svn: 1778
2002-02-19 19:36:56 +00:00
Chris Lattner
780a3ae146
These constructors are for internal use only. These should have been
...
protected a long time ago :)
llvm-svn: 1777
2002-02-19 19:22:45 +00:00
Chris Lattner
34bdf4dda4
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
llvm-svn: 1749
2002-02-12 22:35:32 +00:00
Chris Lattner
c88d936415
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
llvm-svn: 1748
2002-02-12 22:35:27 +00:00
Chris Lattner
e0aa81ad1b
Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
llvm-svn: 1747
2002-02-12 22:35:06 +00:00
Chris Lattner
3a1bc64866
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
llvm-svn: 1745
2002-02-12 21:04:35 +00:00
Chris Lattner
a4bf6af614
* Move BasicBlock and Method graph stuff to new "llvm/Support/CFG.h" file
...
* Move Method::inst_* to new "llvm/Support/InstIterator.h" file
* inst_iterator no longer permits resync'ing
llvm-svn: 1744
2002-02-12 21:02:53 +00:00
Chris Lattner
bde317b67d
* Move BasicBlock and Method graph stuff to new "llvm/Support/CFG.h" file
...
* Move Method::inst_* to new "llvm/Support/InstIterator.h" file
* Method.h no longer #includes BasicBlock.h
llvm-svn: 1743
2002-02-12 21:02:38 +00:00
Chris Lattner
326b548cd4
Initial checkin of new memory -> register promotion pass
...
llvm-svn: 1739
2002-02-12 17:16:22 +00:00
Chris Lattner
3b3ee75819
Convert BBLiveVar to be a BasicBlock annotation, this removes the BB2BBLVMap from MethodLiveVarInfo.
...
llvm-svn: 1721
2002-02-05 06:52:25 +00:00
Chris Lattner
e282c0b592
Convert operand iterator over to work like an STL iterator
...
llvm-svn: 1720
2002-02-05 06:02:59 +00:00
Chris Lattner
5337fbec40
Minor change: Methods that return ValueSet's that are guaranteed to be valid
...
return references instead of pointers.
llvm-svn: 1719
2002-02-05 04:20:12 +00:00
Chris Lattner
c77877fb46
Remove generic routines to Support/SetOperations.h
...
llvm-svn: 1715
2002-02-05 03:35:31 +00:00
Chris Lattner
6c0cbc3009
Remove empty files
...
llvm-svn: 1713
2002-02-05 02:52:53 +00:00
Chris Lattner
dc3aec7a90
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
llvm-svn: 1711
2002-02-05 02:51:01 +00:00
Chris Lattner
a8170f0944
* Code Cleanups
...
* Introduce RAV to allow stream I/O instead of using printValue
llvm-svn: 1710
2002-02-05 01:43:49 +00:00
Chris Lattner
80c1109e8e
Remove empty file
...
llvm-svn: 1708
2002-02-05 00:35:59 +00:00
Chris Lattner
1181768743
* Big cleanups.
...
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion
llvm-svn: 1705
2002-02-05 00:33:19 +00:00
Chris Lattner
62860d4c3d
Clean up MethodLiveVarInfo
...
llvm-svn: 1703
2002-02-04 20:49:04 +00:00
Chris Lattner
b4e0d0424c
Turn live variable analysis into a real MethodPass.
...
llvm-svn: 1699
2002-02-04 20:00:08 +00:00
Chris Lattner
5726b834cd
Instruction scheduling is a real pass now.
...
llvm-svn: 1698
2002-02-04 19:59:22 +00:00
Chris Lattner
8a76e0e37e
Remove Obsolete LoopDepthCalculator. All users should use LoopInfo directly.
...
llvm-svn: 1697
2002-02-04 17:49:01 +00:00
Chris Lattner
faeb3c85f9
Remvoe big hack that was used by the register allocator
...
llvm-svn: 1692
2002-02-04 17:38:03 +00:00
Chris Lattner
0c04c60975
eliminate the add and remove methods, clients must use insert and erase directly.
...
llvm-svn: 1686
2002-02-04 16:33:18 +00:00
Chris Lattner
140f09f8cc
Remove tons of include pollution
...
Remove frivolous const's
Make use of the -> operator
llvm-svn: 1685
2002-02-04 16:32:40 +00:00
Chris Lattner
c6d2d0f12e
Use generic pointer hashes instead of custom ones.
...
llvm-svn: 1684
2002-02-04 16:31:42 +00:00
Chris Lattner
8bfb48c8d3
Convert RegisterAllocator interface to opaque pass type, so that users do not
...
need to know _anything_ about RegAlloc to use it. Well in the end maybe.
llvm-svn: 1681
2002-02-04 15:54:09 +00:00
Chris Lattner
4f37a90fda
Eliminate ModuleAnalyzer. It's old code that is not going to be used in the near future
...
llvm-svn: 1679
2002-02-04 06:47:17 +00:00
Chris Lattner
65e91cf86a
* Minor cleanups
...
* Reduce number of #includes
* Delete blank lines at end of files
* Remove blatently misleading qualifiers (how do you have an inlined pure virtual function?)
* Remove unnecesary & ignored qualifiers (const int argument vs int argument)
* Remove LARGE chunks of "inline" code out to .cpp file
* s/unsigned int/unsigned/
llvm-svn: 1673
2002-02-04 05:55:10 +00:00
Chris Lattner
009faad8e4
* Minor cleanups
...
* Reduce number of #includes, sometimes drastically (LiveRangeInfo.h lost _7_)
* Move instrIsFeasible() from InstrScheduling.h to SchedPriorities.h
* Delete blank lines at end of files
llvm-svn: 1672
2002-02-04 05:52:08 +00:00
Chris Lattner
45cdd0fb0c
* Move command line parsing debug stuff to InstrScheduling internal header file
...
SchedPriorities.h
llvm-svn: 1669
2002-02-04 02:44:20 +00:00
Chris Lattner
9a8ff2595a
Split RegisterAllocation stuff OUT of Sparc.cpp into a well defined pass
...
that has a very minimal interface (like it should have).
llvm-svn: 1667
2002-02-04 00:33:08 +00:00
Chris Lattner
41ef705b10
Revamp compilation to be pass based instead of being monolithic so that
...
backend's can customize compilation as much as they want
llvm-svn: 1661
2002-02-03 23:40:22 +00:00
Chris Lattner
e1289c8b71
Code pulled out of MAchineInstr.(h|cpp)
...
llvm-svn: 1660
2002-02-03 07:54:50 +00:00
Chris Lattner
703fff6f92
Add methods to TargetMachine to:
...
* Output assembly code a method at a time instead of building it all up then emitting it as a whole module
* Release memory contained in various annotations.
llvm-svn: 1641
2002-02-03 07:24:05 +00:00
Chris Lattner
3284ca6af7
* Trim #includes
...
llvm-svn: 1640
2002-02-03 07:20:47 +00:00
Chris Lattner
71af76aa1d
Remove #include
...
move typedefs here
llvm-svn: 1639
2002-02-03 07:17:37 +00:00
Chris Lattner
4fe48ea510
Remove extranous #include
...
llvm-svn: 1638
2002-02-03 07:15:36 +00:00
Chris Lattner
4ea2b76dee
* Prune many #includes
...
* Remove MachineCodeForVMInstr -> MachineCodeForInstruction.h
* Remove MachineCodeForMethod -> MachineCodeForMethod.h
llvm-svn: 1636
2002-02-03 07:11:59 +00:00
Chris Lattner
e2680a01fd
* Remove TMP_INSTRUCTION_OPCODE silliness
...
* Fix TmpInstruction copy ctor to not read uninitialized memory
* Fix TmpInstruction copy ctor to not copy 2 operands if there is only one
* Inline Initialize method into ctors
llvm-svn: 1635
2002-02-03 07:07:16 +00:00
Chris Lattner
c98336111d
Remove extraneous #includes
...
llvm-svn: 1634
2002-02-03 07:03:13 +00:00
Chris Lattner
fcc2cfec1f
* Inline destructor
...
* Remove MachineCodeForVMInstr support (it's now an annotation)
* Remove dropAllReferences override (just use User's)
llvm-svn: 1633
2002-02-03 06:58:15 +00:00
Chris Lattner
bece6a3041
Remove extraneous #include
...
llvm-svn: 1632
2002-02-03 06:27:39 +00:00
Chris Lattner
10c2ca5cd3
Add constructor for addition to opt program
...
llvm-svn: 1626
2002-02-01 04:53:15 +00:00
Chris Lattner
a494a4981d
Free memory when not in use
...
llvm-svn: 1618
2002-01-31 18:32:49 +00:00
Chris Lattner
71e41586ae
* Make debugging output nicer
...
* Implement pass memory freeing after the pass is unused
* Expose PassManager typedef in Pass.h instead of PassManager.h
llvm-svn: 1617
2002-01-31 18:32:27 +00:00
Chris Lattner
0d3eaa9575
Eliminate SimplifyCFG.h file, pull everything into the UnifyMethodExitNodes class
...
llvm-svn: 1613
2002-01-31 01:12:06 +00:00
Chris Lattner
b678885f4c
Remove this file. Folded into UnifyMethodExitNodes pass
...
llvm-svn: 1612
2002-01-31 01:02:32 +00:00
Chris Lattner
5c1e4c976e
Implement LoopDepth calculation in terms of dominators instead of intervals
...
llvm-svn: 1600
2002-01-31 00:41:01 +00:00
Chris Lattner
9d726159c1
Convert xforms over to use new pass structure
...
llvm-svn: 1596
2002-01-30 23:29:35 +00:00
Chris Lattner
3ce0567bac
Convert analyses over to new Pass framework
...
llvm-svn: 1595
2002-01-30 23:27:55 +00:00
Chris Lattner
3c0dcb01d4
Checkin new pass framework. This one is more useful and automatically
...
creates analysis results for passes that need them. MethodPass's never
have to worry about being invoked on external methods.
llvm-svn: 1594
2002-01-30 23:20:39 +00:00
Chris Lattner
ae0661dc6c
Don't die on call instructions, which reference methods
...
llvm-svn: 1593
2002-01-30 23:00:41 +00:00
Chris Lattner
0fea9f487b
Remove opt namespace
...
llvm-svn: 1587
2002-01-26 22:47:07 +00:00
Chris Lattner
5f1367a247
* Expose new pass DeadInstElimination
...
* Add comments that describe the differences between the DCE passes
llvm-svn: 1553
2002-01-23 05:47:35 +00:00
Chris Lattner
5fa48b460c
Pull run() into Pass.cpp
...
llvm-svn: 1552
2002-01-23 05:46:22 +00:00
Chris Lattner
83056c99ec
Pull RaiseAllocations stuff out of the CleanGCC pass into it's own pass in
...
the ChangeAllocations.h header file.
llvm-svn: 1522
2002-01-22 00:13:51 +00:00
Chris Lattner
250d937680
LowerAllocations is really a BasicBlock pass. Make it so.
...
llvm-svn: 1521
2002-01-21 23:34:02 +00:00
Chris Lattner
4454cdc5c0
Move stuff out of the Optimizations directories into the appropriate Transforms
...
directories. Eliminate the opt namespace.
llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner
0834da8b1f
Fix for problem that caused both HUGE and INVALID latencies to be negative
...
llvm-svn: 1513
2002-01-21 22:42:49 +00:00
Chris Lattner
6fd0215a8b
Include all header files individually instead of this one
...
llvm-svn: 1512
2002-01-21 21:45:44 +00:00
Chris Lattner
c00c670e5f
Pull stuff out of opt namespace
...
llvm-svn: 1511
2002-01-21 21:44:38 +00:00
Chris Lattner
4be3babdba
Moved header
...
llvm-svn: 1509
2002-01-21 07:41:55 +00:00
Chris Lattner
2521ae1011
Implement a more powerful, simpler, pass system. This pass system can figure
...
out how to run a collection of passes optimially given their behaviors and
charactaristics.
Convert code to use it.
llvm-svn: 1507
2002-01-21 07:31:50 +00:00
Chris Lattner
e4f3ba8d4c
Implement a more powerful, simpler, pass system. This pass system can figure
...
out how to run a collection of passes optimially given their behaviors and
charactaristics.
llvm-svn: 1506
2002-01-21 07:31:00 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
4b78c45328
Added more comments
...
llvm-svn: 1495
2002-01-07 19:57:37 +00:00
Ruchira Sasanka
0b15dd8a88
MachineRegInfo: Added a method to get the size of a register pushed on to stack.
...
llvm-svn: 1492
2002-01-07 19:17:41 +00:00
Ruchira Sasanka
3d5efa3be1
Added comments, destructors where necessary.
...
llvm-svn: 1491
2002-01-07 19:16:26 +00:00
Vikram S. Adve
b61dccd269
Eliminate function getIndicesBROKEN().
...
llvm-svn: 1486
2001-12-15 00:37:12 +00:00
Vikram S. Adve
0607fbbf01
Eliminate all uses of memInst->getIndicesBROKEN().
...
llvm-svn: 1485
2001-12-15 00:36:32 +00:00
Vikram S. Adve
1d755bccee
getIndexedOffset() shd take vector of Values, not of Constants!
...
llvm-svn: 1484
2001-12-15 00:35:48 +00:00
Chris Lattner
882bc0e5ab
Initial checkin of instcombine
...
llvm-svn: 1479
2001-12-14 16:52:09 +00:00
Chris Lattner
df8324304d
Refactor trace values to work as a proper pass. Before it used to add
...
methods while the pass was running which was a no no. Now it adds the
printf method at pass initialization
llvm-svn: 1456
2001-12-14 16:23:53 +00:00
Chris Lattner
44cede05ee
* Remove support for unsized arrays.
...
* Free instruction does not accept a name
* MemAccessInst can now be used with cast/isa/dyn_cast/...
llvm-svn: 1455
2001-12-14 16:22:56 +00:00
Chris Lattner
b2e8f44166
PointerType and ArrayType now subclass Sequential type, which contains addressability logic for indexing. Unsized arrays have been removed.
...
llvm-svn: 1454
2001-12-14 16:20:21 +00:00
Chris Lattner
9a7dd44f2c
Swap operands now preserves the semantics of the binary operator by changing
...
the opcode of the instruction if possible.
llvm-svn: 1444
2001-12-13 00:43:03 +00:00
Chris Lattner
9cad2a10b4
Implement some nice functions useful for looking at types
...
llvm-svn: 1442
2001-12-13 00:40:16 +00:00
Chris Lattner
fee8f19bbe
Implement proper iterator tags
...
llvm-svn: 1441
2001-12-13 00:39:49 +00:00
Chris Lattner
b2e2570645
Subclasses can change the opcode of an instruction
...
llvm-svn: 1440
2001-12-13 00:39:33 +00:00
Chris Lattner
c717d96290
Constants KNOW they are of a derived type
...
llvm-svn: 1439
2001-12-13 00:38:57 +00:00
Ruchira Sasanka
9d26f00cfb
Added comments are more documentation info
...
llvm-svn: 1434
2001-12-08 21:04:22 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
81a79684b5
Simplify induction variables pass
...
llvm-svn: 1406
2001-12-03 18:05:13 +00:00
Chris Lattner
bcf2df7058
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
a302c202ab
Induction variables must be phi nodes
...
llvm-svn: 1402
2001-12-03 17:27:42 +00:00
Chris Lattner
f90b19a71c
Move support directory
...
llvm-svn: 1401
2001-11-29 16:32:16 +00:00
Chris Lattner
463cc31132
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
cead7793a7
Move DataTypes.h from llvm/Support to just Support
...
llvm-svn: 1399
2001-11-26 23:04:08 +00:00
Chris Lattner
66dc044ef5
Remove unused method
...
llvm-svn: 1368
2001-11-26 18:50:26 +00:00
Chris Lattner
f02cda6862
Expose constant prop of an instruction
...
llvm-svn: 1367
2001-11-26 18:50:11 +00:00
Chris Lattner
87bffac69b
Fix field initialization order problem
...
llvm-svn: 1366
2001-11-26 18:49:54 +00:00
Chris Lattner
147acfd1bd
Allow output of manipulators for GCC 2.96 compatibility
...
llvm-svn: 1365
2001-11-26 18:49:33 +00:00
Chris Lattner
3d0b96e43c
Add writer support for call graph nodes and loops and induction variables
...
llvm-svn: 1364
2001-11-26 18:47:46 +00:00
Chris Lattner
9354ac4d83
Implement an entry node for the call graph
...
llvm-svn: 1363
2001-11-26 18:47:11 +00:00
Chris Lattner
4fe18a5b58
Implement "internal vs external linkage" which corresponds to the C notion of static
...
llvm-svn: 1362
2001-11-26 18:46:40 +00:00
Chris Lattner
118f8023f8
Implement DCE of global values
...
llvm-svn: 1360
2001-11-26 18:42:17 +00:00
Chris Lattner
c969e45ded
* Implement dominator based loop identification
...
* Implement cleaner induction variable identification
llvm-svn: 1359
2001-11-26 18:41:20 +00:00
Chris Lattner
c543ead7c9
Rearrange code
...
llvm-svn: 1334
2001-11-26 16:49:49 +00:00
Chris Lattner
e7545d8bcc
Allow array indexing
...
llvm-svn: 1333
2001-11-26 16:49:12 +00:00
Chris Lattner
b911b62a2a
Be more const correct
...
llvm-svn: 1332
2001-11-26 16:48:56 +00:00
Chris Lattner
7d16637991
* Remove the indexVec stuff which gets out of sync with the operands of the
...
instruction.
* Change the indices to take a vector of Value's instead of ConstPoolVal's
for array indexing
* Add new idx_ iterator support for iterating over indices
llvm-svn: 1331
2001-11-26 16:48:41 +00:00
Chris Lattner
9d1784afff
New Method isLosslesslyConvertableTo
...
llvm-svn: 1330
2001-11-26 16:47:10 +00:00
Chris Lattner
92dbc49699
Add new CompositeType shared baseclass of ArrayType and StructType
...
llvm-svn: 1329
2001-11-26 16:46:45 +00:00
Chris Lattner
eb41b2e35a
Add casts
...
llvm-svn: 1328
2001-11-26 16:46:09 +00:00
Chris Lattner
fefd12e111
Fix protection probs
...
llvm-svn: 1321
2001-11-15 15:24:31 +00:00
Vikram S. Adve
ec7d69586c
Modify method AllocateLocalVar to take size argument.
...
llvm-svn: 1320
2001-11-15 15:23:02 +00:00
Vikram S. Adve
7e3b3bea63
Bug fix for Chris.
...
llvm-svn: 1316
2001-11-15 15:00:48 +00:00
Chris Lattner
e19d5b4615
-cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.
...
llvm-svn: 1312
2001-11-15 04:34:46 +00:00
Vikram S. Adve
3baa8cefc0
Add function returning which operand holds immediate constant
...
for a given opcode.
llvm-svn: 1307
2001-11-14 18:48:36 +00:00
Ruchira Sasanka
d7daf6afcd
added isPseudoInstr()
...
llvm-svn: 1302
2001-11-14 15:35:51 +00:00
Chris Lattner
4046596beb
Remove much cruft from the MemAccessInst instruction
...
llvm-svn: 1298
2001-11-14 11:27:58 +00:00