Commit Graph

730 Commits

Author SHA1 Message Date
Chris Lattner
f270c1ba27 Rename getNullConstant to getNullValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2321 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:22:42 +00:00
Vikram S. Adve
a8ac3fca6f Added functions to compute the offset of a given incoming or outgoing
argument. These are no longer allocated as they are discovered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2320 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:48:54 +00:00
Vikram S. Adve
7b3640bd12 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2319 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:47:26 +00:00
Chris Lattner
fe6d2ced0e Changes to make print pass work!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2306 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 22:11:12 +00:00
Chris Lattner
922a392565 New api for signal handling for LLVM tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 19:53:34 +00:00
Chris Lattner
10586abe9a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2297 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:51:39 +00:00
Chris Lattner
0e743b8397 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2290 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 16:16:16 +00:00
Chris Lattner
536fe85d6d * Make dtor virtual
* Add a new defaulted argument that allows the instruction visitation
  visitors to return a non-void value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2289 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 15:46:40 +00:00
Chris Lattner
8beec9da6c * StoreInst's shouldn't take names (they are _always_ void type)
* Remove two methods that are not used


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2281 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:42:27 +00:00
Chris Lattner
a146183c21 Make data structure acurately get ALL edges, even loads of null fields of
nodes that are not shadow nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2273 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:24:47 +00:00
Chris Lattner
28c238636e Remove the concept of a critical shadow node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2265 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 20:39:23 +00:00
Chris Lattner
da022cd143 * Eliminate ArgDSNode's completely, rely now on Scalar map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2256 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 03:41:22 +00:00
Chris Lattner
7296e93f08 * s/Method/Function
* Add/allow callbacks for module,function, & basic block visiting


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2250 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 19:32:36 +00:00
Chris Lattner
dd4144a587 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:14:15 +00:00
Chris Lattner
f33fa6fb57 Add Module::getTypeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2237 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 18:58:33 +00:00
Chris Lattner
b59d8199e0 Split the CleanupGCCOutput pass into two passes, and add real life actual
documentation on when they do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2222 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:31:22 +00:00
Chris Lattner
0e52e3e221 Allow a pass to obtain an analysis result for updating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2221 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:30:44 +00:00
Chris Lattner
e06e9146ee Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2217 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:59:31 +00:00
Chris Lattner
6c7fd1f414 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2210 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:36:56 +00:00
Chris Lattner
d6a8ca745d Use explicit .get() calls to avoid having to #include Function.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2208 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:07:44 +00:00
Chris Lattner
a6fd4b0d82 Use .get() explicitly and add a few extra casts to avoid 2 #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2204 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:36:05 +00:00
Chris Lattner
184b2fa1b9 Use opaque decl instead of #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:35:38 +00:00
Chris Lattner
8929cc230a Rewrite MachineCodeForBasicBlock in terms of containment rather than
inheritance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2200 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:00:49 +00:00
Chris Lattner
dbc3b00df5 Free memory when done with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2198 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 15:04:37 +00:00
Chris Lattner
918c4ecb0c Don't leak all of the Loop objects created...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:43:19 +00:00
Chris Lattner
6111a87b3a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2194 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:20:15 +00:00
Chris Lattner
7884cd17aa Don't leak memory like a seive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2185 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 23:09:07 +00:00
Chris Lattner
b7653df085 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2180 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:03:57 +00:00
Chris Lattner
5109f75f50 * Add virtual print methods
* s/Method/Function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2172 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:56:02 +00:00
Chris Lattner
5e1cfc58c1 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2171 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:55:12 +00:00
Chris Lattner
d58243de3f s/Method/Function
Trim #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:52:58 +00:00
Chris Lattner
8d3b30ab3c Trim #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:52:32 +00:00
Chris Lattner
42a695c2f2 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2168 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:51:32 +00:00
Chris Lattner
12e8ad6858 * Fix comment
* Add printing support
* add isFloatingPoint method
* Remove isXXXType() methods for non-derived types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2167 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:50:15 +00:00
Chris Lattner
589df88ba0 Pull casting operators out of Value.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2166 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:43:56 +00:00
Chris Lattner
66160427de Minor change to reflect that ConstantHandling is now part of VMCore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2163 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 20:15:12 +00:00
Chris Lattner
b579400cd7 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2154 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:49:37 +00:00
Chris Lattner
156ce94021 VCG output support removed because it was broken and will never be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2146 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:30:17 +00:00
Chris Lattner
2fbfdcffd3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 20:49:59 +00:00
Chris Lattner
dcc6d4cada Source base has been completely changed over to use Function instead of Method, this file is not obsolete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2143 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 20:46:56 +00:00
Chris Lattner
35c15b4bfe Add new function utohexstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2140 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 08:36:19 +00:00
Chris Lattner
05c05ea9ca Implement constant propogation of multiply and divide instructions!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2134 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 08:10:14 +00:00
Chris Lattner
1602560ef9 * Delete getNumAbstractTypeUsers method
* Move addAbstractTypeUser method to Type.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2120 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-05 22:21:08 +00:00
Chris Lattner
2aac6bf66a s/MethodType/FunctionType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 22:19:18 +00:00
Chris Lattner
3d0dceb733 Remove backwards compatibility code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2114 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 22:04:45 +00:00
Chris Lattner
744088c5e0 Deparameterize PATypeHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2099 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:20:18 +00:00
Chris Lattner
1e10c7c278 Add method to get # nodes in the graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2098 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:20:00 +00:00
Chris Lattner
8937375e4b Make the release build work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2097 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:19:27 +00:00
Chris Lattner
6fe2e871bb Fix the release build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2096 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:18:17 +00:00
Chris Lattner
c269bd9232 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2095 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:18:00 +00:00
Chris Lattner
bb063f38fa Add a new replaceWith method useful for replacing instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2088 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 17:52:16 +00:00
Chris Lattner
aedcb72805 Shadow nodes don't need to know their explicit parent, they just need to
know what type to be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2080 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:12:36 +00:00
Vikram S. Adve
d0bac69792 Add method getCallInstIndirectAddrVal() to add call interference
for this value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2072 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 18:58:49 +00:00
Vikram S. Adve
fa79e6e869 Include temp. values when computing max. size of stack frame!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 18:57:49 +00:00
Chris Lattner
41deedf32f * Allow access to DSNode iterator as DSNode::iterator/begin/end
* Add debugging "dump" method to DSNode
* Fix bugs in DSNode iterator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2060 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 07:11:20 +00:00
Chris Lattner
f9957c2960 Initial checkin of file:
Define an iterator to operate over data structure outgoing links and
graph implementation so generic graph functions can be used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2057 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-30 09:13:23 +00:00
Chris Lattner
9a691dbc82 Add accessors and a method to get all the outgoing links for ALL nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2055 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-30 09:07:51 +00:00
Chris Lattner
5cddb2f0f8 Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2054 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-30 04:02:41 +00:00
Chris Lattner
8aaa6e0f86 Add a hook to allow the datastructure to keep naturally up to date, even
though it's not entirely fleshed out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 21:23:29 +00:00
Chris Lattner
3c11fb501d Add more accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2047 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 19:04:19 +00:00
Chris Lattner
7dab15def6 Checkin new useful routine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2046 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 19:04:08 +00:00
Chris Lattner
87f856c793 Rename getCalledMethod to getCalledFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2042 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 17:08:01 +00:00
Chris Lattner
b5085a7d04 Remove getCalledMethod. Use getCalledFunction instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2041 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 17:07:34 +00:00
Chris Lattner
b04bb3f158 Add an insert method to VAlueHolder to allow batch insertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2038 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 05:49:37 +00:00
Chris Lattner
68e5ed8dbe Add new addTypeName method to Module class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 04:48:40 +00:00
Chris Lattner
c9aa7dfee4 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:51:11 +00:00
Chris Lattner
6bfd6a578a s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2034 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:44:36 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Chris Lattner
bcd8e03138 Remove extranous forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1956 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:48:21 +00:00
Chris Lattner
a4d63bc60e Remove unneccesary forward definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1955 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:48:07 +00:00
Chris Lattner
ff9ffa9866 Add transition header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:47:43 +00:00
Chris Lattner
79cc5bc912 Update documentation, rename Method to Function, move typedef to Value.h for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1953 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:47:28 +00:00
Chris Lattner
b6e0c852a8 Change Method to Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1952 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:46:51 +00:00
Chris Lattner
1b139b4060 Add transition typedef to Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1951 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 21:59:53 +00:00
Vikram S. Adve
c8394f63cb New pass to convert Convert multi-dimensional
array references into 1-D references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1950 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 20:46:18 +00:00
Vikram S. Adve
c7b439d2f9 Moved to Scalar/ directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1949 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 20:44:37 +00:00
Chris Lattner
05c0e9e562 * Make AllocationInst ctor protected
* Move AllocationInst ctor to iMemory.cpp
* AllocationInst's always have one operand, even if it is a uint 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1938 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-21 22:37:01 +00:00
Chris Lattner
af2d701e12 Remove a misguided API extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1926 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-21 05:46:43 +00:00
Chris Lattner
99584c69b6 Allow implementation of all HANDLE_*_INST macros at once by defining HANDLE_INST
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1919 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-19 05:51:18 +00:00
Vikram S. Adve
07fb6e603f New pass to convert Convert multi-dimensional
array references into 1-D references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1918 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-19 02:10:34 +00:00
Vikram S. Adve
06fa17c1c2 Big bug fix: killed uses were being inserted instead of erased!
Also added a set of debug options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1917 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-19 00:59:08 +00:00
Chris Lattner
b4c5f83eac Initial checkin of InstVisitor class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1916 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 19:07:42 +00:00
Chris Lattner
4e390f6199 Add isa,cast,dyncast support for AllocationInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1915 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 05:00:51 +00:00
Vikram S. Adve
ce0845aeba Added function computeOffsetforLocalVar to check how big the
offset-from-FP will be before allocating space for a local variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1900 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:23:29 +00:00
Vikram S. Adve
f1a51be375 Use vector for machine instructions in GetInstructionsByRule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1899 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:20:46 +00:00
Vikram S. Adve
851597c3b3 Added machine-independent value for INVALID_MACHINE_OPCODE.
Just cosmetic changes otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1898 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:19:38 +00:00
Vikram S. Adve
80347ecb14 Add function getRegClassIDOfType.
getRegClassIDOfValue is now just a wrapper around this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1897 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:18:28 +00:00
Vikram S. Adve
9558b4a292 Bug fix in setting CC register.
Also use distinct names for the three types of SetMachineOperand
to avoid painful overloading problems and errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1894 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:10:17 +00:00
Chris Lattner
a1f0021a67 Convert the top line of the header from .cpp style to .h style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1884 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-17 21:16:22 +00:00
Chris Lattner
0fce76a009 Fix bug: test/Regression/Other/2002-03-11-ConstPropCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1858 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-11 22:11:07 +00:00
Chris Lattner
e82f1c6cb7 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1840 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-08 20:26:17 +00:00
Chris Lattner
fad83694a2 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1834 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-08 18:38:08 +00:00
Chris Lattner
d4d427baa9 Clean up call graph, add comments, and fix test/Regression/Other/2002-01-31-CallGraph.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1828 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 20:19:35 +00:00
Chris Lattner
bf4bf53dfd Move callgraph printing out of writer.h into callgraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1824 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 17:59:45 +00:00
Chris Lattner
e1755d39c0 Pull Callgraph out of the cfg namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1821 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 17:39:28 +00:00
Chris Lattner
4ce0f8aa9e Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1820 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 17:16:43 +00:00
Chris Lattner
bd0ef77cde 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1816 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 21:46:54 +00:00
Chris Lattner
9039ba9939 Expose verifier for method and module, and accept constant structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1814 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 21:38:48 +00:00
Chris Lattner
eded4916d6 Move ProfilePaths class into ProfilePaths library, only expose a creation function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1812 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 20:04:59 +00:00
Anand Shukla
c8e6b10c2c Initial check in of header file for profile-paths pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1801 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 18:43:03 +00:00
Chris Lattner
1ddf664f74 Make it compile with GCC 3.0.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:01:21 +00:00
Chris Lattner
04bb837cc0 Genericize the ReversePostOrderIterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1785 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 21:48:59 +00:00
Chris Lattner
62cca70d34 Modernize verifier interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1780 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-20 17:54:35 +00:00
Chris Lattner
a9a16c712e Fix isArrayAllocation() to be correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-19 21:24:17 +00:00
Chris Lattner
b41f94b828 Minor cleanups I missed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1778 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-19 19:36:56 +00:00
Chris Lattner
0b6727dd9d These constructors are for internal use only. These should have been
protected a long time ago :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-19 19:22:45 +00:00
Chris Lattner
cc179d3ab8 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1749 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 22:35:32 +00:00
Chris Lattner
ababfa5615 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1748 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 22:35:27 +00:00
Chris Lattner
d16aa16cb1 Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1747 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 22:35:06 +00:00
Chris Lattner
3c34a46c7e Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1745 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 21:04:35 +00:00
Chris Lattner
428039a6e1 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1744 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 21:02:53 +00:00
Chris Lattner
9aa4142dad * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1743 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 21:02:38 +00:00
Chris Lattner
d3db022482 Initial checkin of new memory -> register promotion pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1739 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 17:16:22 +00:00
Chris Lattner
6357a3f42d Convert BBLiveVar to be a BasicBlock annotation, this removes the BB2BBLVMap from MethodLiveVarInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1721 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:52:25 +00:00
Chris Lattner
2f898d2074 Convert operand iterator over to work like an STL iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1720 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:02:59 +00:00
Chris Lattner
748697d242 Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1719 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 04:20:12 +00:00
Chris Lattner
eb5230c4f9 Remove generic routines to Support/SetOperations.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1715 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:35:31 +00:00
Chris Lattner
edcea4ba4a New Support file for operations on set like objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1714 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:35:10 +00:00
Chris Lattner
c980c50dc1 Remove empty files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1713 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:52:53 +00:00
Chris Lattner
5e5dfa307a * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:51:01 +00:00
Chris Lattner
0665a5f1f5 * Code Cleanups
* Introduce RAV to allow stream I/O instead of using printValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 01:43:49 +00:00
Chris Lattner
a9abada125 Remove empty file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1708 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:35:59 +00:00
Chris Lattner
0174410fd0 * Big cleanups.
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1705 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:33:19 +00:00
Chris Lattner
bdfd328515 Clean up MethodLiveVarInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1703 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:49:04 +00:00
Chris Lattner
4fd2dbbf1d Turn live variable analysis into a real MethodPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:00:08 +00:00
Chris Lattner
017e4cca8c Instruction scheduling is a real pass now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1698 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 19:59:22 +00:00
Chris Lattner
bcbce17864 Remove Obsolete LoopDepthCalculator. All users should use LoopInfo directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1697 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 17:49:01 +00:00