Commit Graph

467 Commits

Author SHA1 Message Date
Chris Lattner
97e52e4336 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2386 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 21:27:06 +00:00
Chris Lattner
d50b671280 Add #include that was removed from TargetMachine.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2381 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 20:40:59 +00:00
Chris Lattner
97453d60c6 Include appropriate file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2379 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 20:40:16 +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
bfeec103e1 Simplify and update code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:20:10 +00:00
Chris Lattner
1b7f7dc4b4 Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
to the global namespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2370 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 16:21:30 +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
fd63f25fbd Simplify code
Remove unneccesary getID variant for module's


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2353 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:50:54 +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
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
35504209a0 Use the cast<> operator in favor of C style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2331 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 03:14:39 +00:00
Chris Lattner
1a18b7cf80 Change Constant::getNullConstant to Constant::getNullValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:25:14 +00:00
Chris Lattner
87e873bd3d Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2322 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:24:17 +00:00
Vikram S. Adve
d23a229c4c Don't record instructions for copying method arguments in the
AddedInstrns sets for the first machine instruction.  It is hard
to ensure that the right order is preserved, and sure enough, the
order was broken.  Instead, use a separate set for the function entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:46:28 +00:00
Vikram S. Adve
0bc0516078 Don't pad spills and temp. stack areas for alignment.
Freeze auto vars and spill areas when their sizes are used
for computing other offsets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2317 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:43:45 +00:00
Vikram S. Adve
31f78c4f6b Major changes to how int and FP arguments are handled. Varargs
function calls were simply wrong; other functions were just not
using all available registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2316 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:42:21 +00:00
Vikram S. Adve
6d78311fd2 Added functions to compute which register, if any, to use
for a particular argument in a list of arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2315 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:40:24 +00:00
Vikram S. Adve
dbc4fad577 Insert copy operations for FP arguments to a varargs function,
to copy the FP arg. to an integer.  Necessary so that the
register allocator has two different live ranges for the FP value
and the int. argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2314 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:37:51 +00:00
Vikram S. Adve
a4a943dd5a Implementation of class MachineFrameInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2313 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:35:27 +00:00
Vikram S. Adve
4876209aa6 Don't record instructions for copying method arguments in the
AddedInstrns sets for the first machine instruction.  It is hard
to ensure that the right order is preserved, and sure enough, the
order was broken.  Instead, use a separate set for the function entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2312 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:34:15 +00:00
Chris Lattner
4b1de8eb99 * getAsString requires that the input array is string compatible, so
assert it.
* Use WriteAsOperand instead of getStringValue for constants


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2296 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:15:38 +00:00
Chris Lattner
6228106e9f Just use << isntead of forcing getStrValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2294 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:14:40 +00:00
Chris Lattner
e4a94f2b0f Only print debug message if DEBUG_RA is on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2254 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 22:41:48 +00:00
Chris Lattner
167b9629e1 Only emit message if DEBUG_RA is on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2252 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 20:36:15 +00:00
Chris Lattner
f678dc6469 Handle the FP format problem, where outputed FP constants were not precise
enough.  This fixes compilation of the health benchmark.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2228 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-11 21:44:02 +00:00
Chris Lattner
73e214244f 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@2216 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:48:49 +00:00
Chris Lattner
b62fc4a9b1 Eliminate unneccesary extraneous iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2215 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:46:27 +00:00
Chris Lattner
0ac5429ff0 Add explicit #includes of Function.h to make up for the removed #include
in iOther.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2209 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:08:28 +00:00
Chris Lattner
cc5933c47e iUse new form of pop_back to make code more concise
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2202 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:02:02 +00:00
Chris Lattner
9bbf99de5f No need to reserve space, erasing does not change the size of the container.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2201 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:01:21 +00:00
Chris Lattner
73c8d7520f Delete NOP instructions as they are eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 15:05:04 +00:00
Chris Lattner
af50d00829 * Add a file header with some information
* Delete the DelaySlotInfo objects created by the SchedulingManager class.
  These leaked objects were accounting for 3/4 of the memory leaked by the
  backend, so this is a relatively major win.
* Reorganize SchedulingManager::getDelaySlotInfoForInstr so that it has
  better code locality (making it easier to read).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2197 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:45:58 +00:00
Chris Lattner
1d21f3eb1d * Add a useful file comment
* Move InsertPrologEpilogCode class to PrologEpilogCodeInserter.cpp
   -> Among other things, this eliminates the need for the minstrVec static
      global array.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2195 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:21:26 +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
bcd6cc8951 Move the InsertPrologEpilogCode class out of the Sparc.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@2193 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:18:31 +00:00
Chris Lattner
9aa697b82e Include prototype for interface to PrologEpilogCodeInserter.cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2192 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:16:36 +00:00
Chris Lattner
c1ffdb10f3 Use new higher level isFloatingPoint() function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2191 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:16:08 +00:00
Chris Lattner
f3dd05ca03 Clean up the ownership model a bit so that nodes actually get deleted more
frequently. This still leaks edges quite a bit, but it leaks no nodes
(I think).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2190 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:15:33 +00:00
Chris Lattner
fb005fe5c2 * General cleanups
* In calcLiveVarSetsForBB, do not leak a ValueSet every time the function
  is called!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2189 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:14:14 +00:00
Chris Lattner
0b0ffa0800 Convert AddedInstrMapType to contain AddedInstrns by value instead of by
pointer so that they do not all get leaked!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2188 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:13:04 +00:00
Chris Lattner
244212a80b GCC3.0 is reported to die without an alloca definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 03:37:11 +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
69a34cddaf Value cannot be directly instantiated. I think that this code was TRYING to
make a PHI node, although it was badly broken.  This keeps tests passing, so
we'll go with it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2184 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:05:54 +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
4d669b510c s/method/function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2177 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:01:15 +00:00
Chris Lattner
c8a79af27d isLabelType is obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2175 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:59:08 +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
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
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
Vikram S. Adve
85e1e9c22f Case numbers were not updated when Sparc.burg.in was changed
to add separate label for bitwise NOT operator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2091 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 20:28:48 +00:00