Commit Graph

2197 Commits

Author SHA1 Message Date
Misha Brukman
a7a805ef98 Forward-declare templates for fix compilation when Argument.h is included first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12295 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 23:42:24 +00:00
Misha Brukman
dd298c8c6e Doxygenified and cleand up comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 23:08:20 +00:00
Chris Lattner
69a69ff5fd new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12263 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 19:36:59 +00:00
Chris Lattner
7d84dda560 Switch over to using edge profile information as the basic profiling representation,
from basic block counts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12241 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 22:03:45 +00:00
Chris Lattner
0f54bc7630 We don't want to make this a pure interface, as it makes all implementors
bear the burden of implementing what will be all exactly the same methods.
They just want to provide the information in differing ways.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 21:30:18 +00:00
Chris Lattner
3f25328fbf Rearrange some methods, implement the dominates method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12237 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 21:07:12 +00:00
Chris Lattner
6ba8972919 Import the trace class from the reoptimizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12236 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 20:57:27 +00:00
Chris Lattner
0b6af79e62 Add the ability to put an annotation at the end of a basic block as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 18:51:05 +00:00
Chris Lattner
fd755f7c7c Add support for representing edge counts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 18:19:37 +00:00
Chris Lattner
807a7be38b Remove Module::mutateConstantPointerRef, which is now thankfully dead!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12215 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 06:15:33 +00:00
Chris Lattner
e45a76c85b remove *THANKFULLY* dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12213 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 06:10:32 +00:00
Chris Lattner
f0b6070272 Add prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12194 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-07 21:30:08 +00:00
Brian Gaeke
323819e4e1 make -print-machineinstrs work for both SparcV9 and X86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12122 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 19:16:23 +00:00
Alkis Evlogimenos
9cccb8aec7 Fix bug introduced by yesterday's changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12119 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 18:02:07 +00:00
Chris Lattner
66be3c8f72 Rename method, add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12103 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 22:00:20 +00:00
Chris Lattner
3d549b18a3 De-inline methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12101 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 20:55:15 +00:00
Brian Gaeke
c54839573c Make MachineOperand's value named 'contents'. Make really, really sure
it is always completely initialized and copied.
Also, fix up many comments and asserts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12100 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 19:07:27 +00:00
Chris Lattner
2bed9ecc4b Add a new constructor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12087 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 02:12:47 +00:00
Misha Brukman
7ace0409aa Add prototype for ExtractCodeRegion()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12069 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-02 00:20:32 +00:00
Alkis Evlogimenos
5f37502bfb Add the long awaited memory operand folding support for linear scan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12058 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 20:05:10 +00:00
Chris Lattner
23511597fe Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 19:36:50 +00:00
Misha Brukman
58ae9c7290 Fix grammar and doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12054 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 18:31:19 +00:00
Misha Brukman
a8a06367f8 Add ability to extract a single basic block into a new function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12052 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 18:27:13 +00:00
Brian Gaeke
05b15fb075 TargetCacheInfo has been removed; its only uses were to propagate a constant
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 06:43:29 +00:00
Chris Lattner
99df257910 Fix the "partial pool allocator" on em3d and others. The problem is that
DSNodes, unlike other GraphTraits nodes, can have null outgoing edges, and
df_iterator doesn't take this into consideration.  As a workaround, the
successor iterator now handles null nodes and 'indicates' that null has
no successors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 01:42:26 +00:00
Chris Lattner
9148ad3099 Make Module annotable. Reid has a bunch of code that depends on this, and
we really don't win that much by eliminating this (not many Modules are
allocated), so it's not worth it.  When we can, we should revisit this in
the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 01:25:37 +00:00
Misha Brukman
201ff603a7 Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12015 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 23:55:11 +00:00
Chris Lattner
61f57fae7a Module does not need to be annotatable aka annotable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:27:55 +00:00
Chris Lattner
a523cdf1b6 Remove public header. It's been moved to lib/Target/SparcV9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12004 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:13:20 +00:00
Chris Lattner
e85f2348c9 Do not use explicit casts that hide the dependence on Instruction being
annotable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12000 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:02:26 +00:00
Chris Lattner
9548f20ad5 Ugh, the old sparc backend attaches MachineCodeForInstruction annotations on
LLVM instructions.  Because it contains an explicit cast, we didn't catch it.
I guess instruction's will be annotable for the duration of the sparcv9's
existence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11999 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 18:54:23 +00:00
Brian Gaeke
6ac5300fbc Remove dead member variables of SparcV9SchedInfo and TargetSchedInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 08:40:03 +00:00
Brian Gaeke
e9f6f2c049 Update comment at head of file. Also fix C 'typedef struct' nonsense I
inadvertently left in here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11988 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 06:33:28 +00:00
Chris Lattner
bceb68807f Eliminate the distinction between "real" and "unreal" instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 06:31:16 +00:00
Brian Gaeke
620ee02353 Add more architectures, and ELF64 stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 06:30:25 +00:00
Chris Lattner
450b6d2998 Scrap a huge layer of cruft out of this interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11980 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 05:57:21 +00:00
Chris Lattner
7598a1a9a8 Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11978 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 05:15:56 +00:00
Chris Lattner
6a8a9b4413 Continue Alkis's int64_t cleanup. This makes all of the immediate related
methods take an int or unsigned value instead of int64_t.

Also, add an 'addImm' method to the MachineInstrBuilder class, because the
fact that the hardware sign or zero extends it does not/should not matter
to the code generator.  Once the old sparc backend is removed the difference
can be eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 05:06:49 +00:00
Chris Lattner
c3c106ca59 Add BuildMI variants that take a MBB::iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11975 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 04:55:28 +00:00
Brian Gaeke
757c1f9d87 Fix my sloppiness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11968 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 22:06:03 +00:00
Chris Lattner
3da5117334 Add hook for V8 target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11961 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 19:54:16 +00:00
Brian Gaeke
6c39a42b5c ELF constants and data structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11945 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 06:26:20 +00:00
Misha Brukman
4977a163b4 New Function-level transformation utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 03:33:30 +00:00
Misha Brukman
dddea54b11 Add the prototype for the LoopExtractor Pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 03:33:17 +00:00
Alkis Evlogimenos
bd16ef84bf Make MachineOperand's immediate value an int and save 4 bytes out of
each MachineOperand. We don't really need an int64_t immediate :-).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 15:05:28 +00:00
Misha Brukman
b07dddda00 Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11891 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 23:20:29 +00:00
Misha Brukman
2729408840 Doxygenify and tersify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11890 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 23:20:08 +00:00
Alkis Evlogimenos
71e353ed35 Uncomment assertions that register# != 0 on calls to
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11882 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 22:00:20 +00:00
Chris Lattner
c230978a82 Annotations are evil. This makes Value not derive from Annotable, which makes
all dynamically allocated LLVM values 4 bytes smaller, eliminate some vtables, and
make Value's destructor faster.

This makes Function derive from Annotation now because it is the only core LLVM
class that still has an annotation stuck onto it: MachineFunction.
MachineFunction is obviously horrible and gross (like most other annotations), but
will be the subject of refactorings later in the future.  Besides many fewer
Function objects are dynamically allocated that instructions blocks, constants,
types, etc... :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11878 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 08:08:38 +00:00
Chris Lattner
c814937115 Make TargetData no longer use annotations!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 08:01:57 +00:00
Chris Lattner
32f54f3149 Eliminate copy-and-paste comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11873 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 08:01:30 +00:00
Chris Lattner
1cd4c7294c Make sure that at least one virtual method is defined in a .cpp file to avoid
having the compiler emit RTTI and vtables to EVERY translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 07:24:18 +00:00
Chris Lattner
7c78afefe9 Fix a bug in the densemap that was killing the local allocator, and probably
other clients.  The problem is that the nullVal member was left to the default
constructor to initialize, which for int's does nothing (ie, leaves it unspecified).

To get a zero value, we must use T().  It's C++ wonderful? :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 05:00:15 +00:00
Chris Lattner
00fa65be83 Fix typeo. grow() cannot shrink storage. clear() should really nuke storage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11865 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 04:07:12 +00:00
Alkis Evlogimenos
4c50715e9e Temporarily comment out asserts as they break things. I will uncomment
them when all the problem areas are fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:56:36 +00:00
Brian Gaeke
9d20b71eca Represent va_list in interpreter as a (ec-stack-depth . var-arg-index)
pair, and look up varargs in the execution stack every time, instead of
just pushing iterators (which can be invalidated during callFunction())
around.  (union GenericValue now has a "pair of uints" member, to support
this mechanism.) Fixes Bug 234.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11845 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:01:48 +00:00
Alkis Evlogimenos
332d5d0a68 Duh, forgot to close the parenthesis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11843 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 22:07:14 +00:00
Alkis Evlogimenos
338ce3d64e Add assert to isPhysicalRegister and isVirtualRegister to fail when
passed the special 'register' 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 22:04:28 +00:00
Alkis Evlogimenos
4d0d864be3 Add DenseMap template and actually use it for for mapping virtual regs
to objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:55:45 +00:00
Chris Lattner
fdf6a3c8cc Add prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11837 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:34:51 +00:00
Brian Gaeke
150666fd82 Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11827 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 19:08:12 +00:00
Brian Gaeke
bb92f6fbf2 Cygwin defines log2 as a macro. Undef it here IFF it has already been defined,
so that we always get the inline function instead. Remember, kids, like it says
in the GCC manual, "An Inline Function is As Fast As a Macro."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11815 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 01:53:45 +00:00
Brian Gaeke
748fba141f FunctionLiveVarInfo.h moved: include/llvm/CodeGen -> lib/Target/Sparc/LiveVar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11804 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 19:46:00 +00:00
Chris Lattner
b4a482a098 Add some helpful methods for dealing with switch instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 06:26:00 +00:00
Chris Lattner
bf81213693 Hrm, my find must have been faulty. It didn't remove these as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11788 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 03:54:22 +00:00
Chris Lattner
e35b06c6c4 Boost is now unneeded, thanks to the fix for PR253, contributed by Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 03:53:00 +00:00
Chris Lattner
7b3d73b7ec Use the new LLVM is_class template instead of the boost one, allowing us to
remove our dependency on boost!  Thanks to Reid Spencer for making this possible!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 03:50:05 +00:00
Chris Lattner
5c4d53a4d1 Check in a new type_traits header which provides the mysterious is_class
template.  Thanks go out to Reid Spencer for skillfully extracting this
from boost!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11784 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 03:49:29 +00:00
Chris Lattner
c50879dfe6 Noone cares about similarity to boost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 03:47:25 +00:00
Brian Gaeke
95ee9bd81f DataTypes.h is now output from configure, and shortened
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11778 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 22:07:26 +00:00
Brian Gaeke
6c71bf5f70 Regenerated with autoheader-2.57.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 21:30:39 +00:00
Brian Gaeke
a6eb7c19a1 ThreadSupport.h is now output from configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11770 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 21:30:29 +00:00
Brian Gaeke
cbc20b451d Renamed to hash_set.in; move to using autoconf substitution tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11765 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:56:36 +00:00
Brian Gaeke
6cd52446fa Renamed to hash_map.in; move to using autoconf substitution tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11764 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:56:35 +00:00
Brian Gaeke
6ab1917840 Regenerated using autoheader-2.57.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11762 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:56:04 +00:00
Brian Gaeke
c134395628 Renamed from include/Support/iterator. Doxygenify comments; add autoconf substitution tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:16:10 +00:00
Brian Gaeke
0e67d4cfe2 Replaced by include/Support/iterator.in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:16:10 +00:00
Brian Gaeke
587bef9d1a Regenerated with autoheader-2.57.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11752 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:16:09 +00:00
Alkis Evlogimenos
743d0a1f83 Refactor rewinding code for finding the first terminator of a basic
block into MachineBasicBlock::getFirstTerminator().

This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:14:48 +00:00
Alkis Evlogimenos
a2f6a408dc Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11719 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 00:50:15 +00:00
Alkis Evlogimenos
890f92328d Move MOTy::UseType enum into MachineOperand. This eliminates the
switch statements in the constructors and simplifies the
implementation of the getUseType() member function. You will have to
specify defs using MachineOperand::Def instead of MOTy::Def though
(similarly for Use and UseAndDef).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11715 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 19:23:26 +00:00
Alkis Evlogimenos
e33da36cbd Fix silly bug in implementation of getUseType(). Thanks Misha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11711 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 07:24:19 +00:00
Alkis Evlogimenos
f216421181 When folding memory operands in machine instructions be careful to
leave register operands with the same use/def flags as the original
instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11709 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 06:54:26 +00:00
Chris Lattner
2425f8c629 Significantly simplify gep_type_iterator, and make its interface more general/powerful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11708 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 06:27:03 +00:00
Alkis Evlogimenos
7200c6b82a Abstract merging of ranges away from number of slots per instruction.
Also make it less aggressive as the current implementation breaks in
some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11696 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 04:05:13 +00:00
Chris Lattner
9c0b9bf2b5 Update comments and add warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 22:27:20 +00:00
Brian Gaeke
0c80389498 Regenerated using autoheader-2.57.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11657 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:40:58 +00:00
Alkis Evlogimenos
39a0d5c112 Too many changes in one commit:
1. LiveIntervals now implement a 4 slot per instruction model. Load,
   Use, Def and a Store slot. This is required in order to correctly
   represent caller saved register clobbering on function calls,
   register reuse in the same instruction (def resues last use) and
   also spill code added later by the allocator. The previous
   representation (2 slots per instruction) was insufficient and as a
   result was causing subtle bugs.

2. Fixes in spill code generation. This was the major cause of
   failures in the test suite.

3. Linear scan now has core support for folding memory operands. This
   is untested and not enabled (the live interval update function does
   not attempt to fold loads/stores in instructions).

4. Lots of improvements in the debugging output of both live intervals
   and linear scan. Give it a try... it is beautiful :-)

In summary the above fixes all the issues with the recent reserved
register elimination changes and get the allocator very close to the
next big step: folding memory operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11654 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:15:40 +00:00
Chris Lattner
bbdfe40ba7 Add a method useful for updating DSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11636 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 21:27:50 +00:00
Chris Lattner
9717ee9e6c Add a new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11630 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:03:08 +00:00
Chris Lattner
da8ab2ea45 ADd a method for when an instruction moves
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11626 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 18:28:22 +00:00
Chris Lattner
5e61fa9519 Add a MachineBasicBlock::getParent() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 16:13:54 +00:00
Alkis Evlogimenos
1d29a6d6c7 Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11621 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 07:39:26 +00:00
Alkis Evlogimenos
04319bb2bd This is needed by assignment verification in linear-scan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11618 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 01:10:55 +00:00
Chris Lattner
f03715c6a8 Add support for just compiling a program
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11610 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:24:29 +00:00
Alkis Evlogimenos
52f8f56ef4 Move unused typedefs in private section. Add method to return interval
given a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:14:52 +00:00
Chris Lattner
c8580b2aee Byebye method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11598 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:38:12 +00:00
Chris Lattner
8c56be5e2b When an error occurs executing a tool, we now throw an exception instead
of calling exit(1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11593 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:21:57 +00:00
Chris Lattner
f5c8146a7c Change the order of the arguments to the ctor, allowing us to make the boolean default to true
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11592 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:20:52 +00:00
Chris Lattner
f1e3285f3a Move a helper class out of bugpoint to here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11582 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 17:16:17 +00:00