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

678 Commits

Author SHA1 Message Date
Chris Lattner
006a45af20 Changes to make print pass work!
llvm-svn: 2306
2002-04-18 22:11:12 +00:00
Chris Lattner
01ad1e2383 New api for signal handling for LLVM tools
llvm-svn: 2301
2002-04-18 19:53:34 +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
eb2cfb9f3b Pull casting operators out of Value.h
llvm-svn: 2166
2002-04-08 21:43:56 +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
9bca7892fc Add new function utohexstr.
llvm-svn: 2140
2002-04-07 08:36:19 +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