Commit Graph

652 Commits

Author SHA1 Message Date
Chris Lattner
b6dcbfc6d1 Use forward decl instead of #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2380 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 20:40:25 +00:00
Chris Lattner
31bcdb822f Split ConstantVals.h into Constant.h and Constants.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:55:58 +00:00
Chris Lattner
9ae93cdcc8 Fix two FIXME's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2377 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:49:58 +00:00
Chris Lattner
8fc2f2072d Remove all contents of the cfg namespace to the global namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2369 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 16:19:42 +00:00
Chris Lattner
876509614b Remove obsolete namespace from example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2368 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 16:18:32 +00:00
Chris Lattner
dbb1735673 Initial checkin of new "Internalize" pass for GCCLD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2362 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:43:27 +00:00
Chris Lattner
f4467b8ebc SymTabValue class incorporated into Function and Module classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2359 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:56:59 +00:00
Chris Lattner
dae4a36849 Include an operator<<, to print modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2358 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:56:28 +00:00
Chris Lattner
09a60ac9fe Remove forward def'ns that are already in Value.h
Do not support output of Modules directly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2349 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:47:33 +00:00
Chris Lattner
20ad298c74 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2348 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:47:06 +00:00
Chris Lattner
356b79320b Module's are no longer Value's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2347 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:46:29 +00:00
Chris Lattner
853737706f The interesting contents of SymTabValue were incorporated into Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2346 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:46:07 +00:00
Chris Lattner
6b5689ed55 * Module's are no longer Value's
* Incorporate SymTabValue contents into the Module class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2345 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:45:48 +00:00
Chris Lattner
785bfcca13 Add a forward defn for Module since it's no longer in Value.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2344 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:45:05 +00:00
Chris Lattner
8c310c7548 * Incorporate the functionality of SymTabValue into Function
* s/Method/Function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2343 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:44:40 +00:00
Chris Lattner
d80e973cec Initial checkin of simple&fast SSA based GCSE algorithm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2338 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 00:47:11 +00:00
Chris Lattner
a298d27808 Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
const BasicBlocks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 00:15:57 +00:00
Chris Lattner
483e14ee04 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 07:27:19 +00:00
Chris Lattner
3b743f9fb3 s/Method/Function in classname
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2335 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:59:56 +00:00
Chris Lattner
d0cbb94cce Remove old file that will never be used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2334 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:57:52 +00:00
Chris Lattner
f57b845547 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
59c2614eae Change the semantics of getSuccessor to FAIL if an out of range successor # is attempted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2330 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 03:14:12 +00:00
Chris Lattner
12be9749d6 Support array allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2326 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:27:11 +00:00
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