Commit Graph

625 Commits

Author SHA1 Message Date
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