Commit Graph

2176 Commits

Author SHA1 Message Date
Brian Gaeke cc7644407c Renamed to hash_set.in; move to using autoconf substitution tags.
llvm-svn: 11765
2004-02-23 18:56:36 +00:00
Brian Gaeke 17d7a29d76 Renamed to hash_map.in; move to using autoconf substitution tags.
llvm-svn: 11764
2004-02-23 18:56:35 +00:00
Brian Gaeke ceb6842293 Regenerated using autoheader-2.57.
llvm-svn: 11762
2004-02-23 18:56:04 +00:00
Brian Gaeke 0fa55f7909 Renamed from include/Support/iterator. Doxygenify comments; add autoconf substitution tags.
llvm-svn: 11754
2004-02-23 18:16:10 +00:00
Brian Gaeke bd02d1806f Replaced by include/Support/iterator.in.
llvm-svn: 11753
2004-02-23 18:16:10 +00:00
Brian Gaeke e27fc812ca Regenerated with autoheader-2.57.
llvm-svn: 11752
2004-02-23 18:16:09 +00:00
Alkis Evlogimenos af2de4848e 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).

llvm-svn: 11748
2004-02-23 18:14:48 +00:00
Alkis Evlogimenos 486b12b71a Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler
llvm-svn: 11719
2004-02-23 00:50:15 +00:00
Alkis Evlogimenos 8358cc573d 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).

llvm-svn: 11715
2004-02-22 19:23:26 +00:00
Alkis Evlogimenos cb243ab173 Fix silly bug in implementation of getUseType(). Thanks Misha.
llvm-svn: 11711
2004-02-22 07:24:19 +00:00
Alkis Evlogimenos de51c65299 When folding memory operands in machine instructions be careful to
leave register operands with the same use/def flags as the original
instruction.

llvm-svn: 11709
2004-02-22 06:54:26 +00:00
Chris Lattner d25dfe43b9 Significantly simplify gep_type_iterator, and make its interface more general/powerful
llvm-svn: 11708
2004-02-22 06:27:03 +00:00
Alkis Evlogimenos d890f59f19 Abstract merging of ranges away from number of slots per instruction.
Also make it less aggressive as the current implementation breaks in
some cases.

llvm-svn: 11696
2004-02-22 04:05:13 +00:00
Chris Lattner 6983f46792 Update comments and add warning
llvm-svn: 11691
2004-02-21 22:27:20 +00:00
Brian Gaeke 3056626e7b Regenerated using autoheader-2.57.
llvm-svn: 11657
2004-02-20 06:40:58 +00:00
Alkis Evlogimenos 76eca062ea 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.

llvm-svn: 11654
2004-02-20 06:15:40 +00:00
Chris Lattner a7350c53d2 Add a method useful for updating DSA
llvm-svn: 11636
2004-02-19 21:27:50 +00:00
Chris Lattner c62ce162ff Add a new function
llvm-svn: 11630
2004-02-19 20:03:08 +00:00
Chris Lattner bef87a990a ADd a method for when an instruction moves
llvm-svn: 11626
2004-02-19 18:28:22 +00:00
Chris Lattner d23a882f2f Add a MachineBasicBlock::getParent() method
llvm-svn: 11622
2004-02-19 16:13:54 +00:00
Alkis Evlogimenos 3562c2dd9f Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead.

llvm-svn: 11621
2004-02-19 07:39:26 +00:00
Alkis Evlogimenos 28b0468785 This is needed by assignment verification in linear-scan.
llvm-svn: 11618
2004-02-19 01:10:55 +00:00
Chris Lattner 5e76384093 Add support for just compiling a program
llvm-svn: 11610
2004-02-18 23:24:29 +00:00
Alkis Evlogimenos 671f1c87df Move unused typedefs in private section. Add method to return interval
given a register.

llvm-svn: 11608
2004-02-18 23:14:52 +00:00
Chris Lattner 3c10196aab Byebye method
llvm-svn: 11598
2004-02-18 20:38:12 +00:00
Chris Lattner 08180ecfcf When an error occurs executing a tool, we now throw an exception instead
of calling exit(1).

llvm-svn: 11593
2004-02-18 20:21:57 +00:00
Chris Lattner cc09204840 Change the order of the arguments to the ctor, allowing us to make the boolean default to true
llvm-svn: 11592
2004-02-18 20:20:52 +00:00
Chris Lattner 2bcf9410de Move a helper class out of bugpoint to here.
llvm-svn: 11582
2004-02-18 17:16:17 +00:00
Chris Lattner ab920f2dc7 eliminate a pair of really inefficient methods now that noone uses them
llvm-svn: 11579
2004-02-18 16:45:22 +00:00
Chris Lattner 9093e9b2a1 The CBE is no longer in llvm-dis
llvm-svn: 11532
2004-02-17 06:39:48 +00:00
Chris Lattner 1e70deff78 Simplify and document the new interface
llvm-svn: 11524
2004-02-17 05:54:26 +00:00
Alkis Evlogimenos 4d5f42f58f Add LiveIntervals::Interval::empty() member function.
llvm-svn: 11520
2004-02-17 05:14:37 +00:00
Alkis Evlogimenos cde4ade314 Add API to check and fold memory operands into instructions.
llvm-svn: 11519
2004-02-17 04:33:18 +00:00
Chris Lattner 946e46596f Add two missing pieces from last checkin
llvm-svn: 11513
2004-02-17 03:03:36 +00:00
Chris Lattner c14686440f Rearrange code to eliminate warnings
llvm-svn: 11512
2004-02-17 02:58:36 +00:00
Alkis Evlogimenos 14f3fe81c6 Add LeakDetection to MachineInstr.
Move out of line member functions of MachineBasicBlock to
MachineBasicBlock.cpp.

llvm-svn: 11497
2004-02-16 07:17:43 +00:00
Alkis Evlogimenos 2c5ddd20ba Eliminate the use of spill (reserved) registers.
llvm-svn: 11476
2004-02-15 10:24:21 +00:00
Chris Lattner 9fba3da879 Add a new ConstantAggregateZero class, to fix PR239. This makes zero
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements.  This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.

llvm-svn: 11470
2004-02-15 05:53:04 +00:00
Chris Lattner 2d6fca9717 finegrainify namespacification
llvm-svn: 11469
2004-02-15 05:52:36 +00:00
Chris Lattner 015e821279 ConstantArray::get and ConstantStruct::get now just return pointers to
'Constant', instead of specific subclass pointers.  In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.

llvm-svn: 11467
2004-02-15 04:14:47 +00:00
Chris Lattner 72862f132c The prologue/epilogue related method calls have no reason to return a value,
make them return void.

llvm-svn: 11447
2004-02-14 19:49:05 +00:00
Chris Lattner dc632111bf Add llvm.memset/frameaddress/returnaddress intrinsics.
llvm-svn: 11431
2004-02-14 02:47:17 +00:00
Alkis Evlogimenos 7c6e4d5ae6 Add next() and prior() iterator utility functions. Unlike std::advance
they do not modify the passed iterator but return a copy.

next(myIt) returns copy of myIt incremented once
next(myIt, n) returns copy of myIt incremented n times
prior(myIt) returns copy of myIt decremented once
prior(myIt, n) returns copy of myIt decremented n times

While at it remove obsolete implementation of mapped_iterator.

llvm-svn: 11429
2004-02-14 01:17:28 +00:00
Chris Lattner 7934640709 Add method
llvm-svn: 11425
2004-02-14 00:30:31 +00:00
Chris Lattner 23472a5a2a Make sure to provide a prototype for the cbackend
llvm-svn: 11419
2004-02-13 23:36:03 +00:00
Chris Lattner c7dd48567f The cbackend has never had anything to do with llvm assembly writing
llvm-svn: 11411
2004-02-13 23:19:51 +00:00
Chris Lattner b09176a1e2 Change access to the cwriter
llvm-svn: 11406
2004-02-13 23:00:45 +00:00
Alkis Evlogimenos 8cdd0215bf Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos ef9d025ebe Mark MachineBasicBlock::operator[] deprecated.
llvm-svn: 11392
2004-02-13 20:05:56 +00:00
Alkis Evlogimenos 0e98a0638e Add getNumVirtualRegs().
Whitespace cleanups.

llvm-svn: 11388
2004-02-13 18:07:06 +00:00
Misha Brukman 29cb68f761 Fix spelling of `tendency'.
llvm-svn: 11378
2004-02-13 16:23:14 +00:00
Chris Lattner 6342e18571 Expose a pass ID for lower-invoke
llvm-svn: 11377
2004-02-13 16:16:35 +00:00
Brian Gaeke 5feee4b251 Update the example here in the header file.
I don't know about you guys, but I rarely read the .html manuals :-)

llvm-svn: 11366
2004-02-13 04:49:04 +00:00
Brian Gaeke bad2936826 Include <iosfwd>.
Add prototypes for MachineBasicBlock's dump() and print() methods.

llvm-svn: 11365
2004-02-13 04:40:15 +00:00
Alkis Evlogimenos 96871385e8 Move ilist_trairs<MachineInstr> in MachineBasicBlock.
llvm-svn: 11358
2004-02-12 19:12:03 +00:00
Alkis Evlogimenos de8ac749fe Add parent pointer to MachineInstr that points to owning
MachineBasicBlock. Also change opcode to a short and numImplicitRefs
to an unsigned char so that overall MachineInstr's size stays the
same.

llvm-svn: 11357
2004-02-12 18:49:07 +00:00
Chris Lattner f30152e480 Add support for the llvm.memmove intrinsic.
Patch graciously contributed by Reid Spencer!

llvm-svn: 11354
2004-02-12 18:10:10 +00:00
Chris Lattner e0ea5cff8a Urg, check in header I forgot. :(
llvm-svn: 11353
2004-02-12 17:57:11 +00:00
Chris Lattner 6a597d6057 Rename the opCode instance variable to Opcode
llvm-svn: 11348
2004-02-12 16:09:53 +00:00
Chris Lattner a6a8372a3c Remove a dead field from MachineInstr!
llvm-svn: 11347
2004-02-12 16:05:03 +00:00
Alkis Evlogimenos 537805f315 Change interface so that we can add to the end of a basic block
without getting an assertion from ilist that we are dereferencing
ilist<T>::end().

llvm-svn: 11345
2004-02-12 08:11:04 +00:00
Brian Gaeke f0eef8ef38 Add one more doxygen comment.
llvm-svn: 11344
2004-02-12 04:26:49 +00:00
Brian Gaeke 974a21e6fb Express one of MachineOperand's many constructors in terms of another, by means of default arguments.
llvm-svn: 11343
2004-02-12 04:15:00 +00:00
Brian Gaeke 84262c112c Remove these MachineOpCodeFlags and their accessor - they are never set.
llvm-svn: 11341
2004-02-12 04:00:55 +00:00
Alkis Evlogimenos 80da865f77 Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.

llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Brian Gaeke 84b1008c13 Remove getOpCode(). Help doxygenify some comments.
llvm-svn: 11338
2004-02-12 01:34:03 +00:00
Chris Lattner 0302beeb09 If a node has more than 64 outgoing edges, make the edges go from the 'truncated' block,
instead of dropping them entirely.

llvm-svn: 11334
2004-02-11 20:44:17 +00:00
Brian Gaeke 3ee3e4beea Fix typos in comments.
llvm-svn: 11333
2004-02-11 19:47:43 +00:00
Chris Lattner 3cf970e27f Add an important prototype
llvm-svn: 11320
2004-02-11 06:11:06 +00:00
Chris Lattner ddfc5506a7 Factor this code out of llvm-prof
llvm-svn: 11314
2004-02-11 05:54:25 +00:00
Chris Lattner 6926059d37 Remove long obsolete method. switch instructions are first class entities in the CFG, and have been for a LOOOONG time.
llvm-svn: 11303
2004-02-11 01:17:58 +00:00
Chris Lattner 1f4f70425d An initial implementation of an LLVM ProfileInfo class which is designed to
eventually allow Passes to use profiling information to direct them.

llvm-svn: 11294
2004-02-10 22:11:42 +00:00
Misha Brukman 5786148df5 Sprinkle liberally with comments, saute with doxygen until readable.
llvm-svn: 11293
2004-02-10 21:49:59 +00:00
Misha Brukman 303cf58800 Doxygenify comment.
llvm-svn: 11292
2004-02-10 21:48:12 +00:00
Chris Lattner 62da05d3f0 Urg, the X86 backend DOES use virtual register operands. :(
llvm-svn: 11288
2004-02-10 21:43:11 +00:00
Chris Lattner 3d33d64f46 Remove and simplify some of the bewildering collection of isFOORegister
methods which have strangely different semantics in different backends,
and noone knew what any did.

Getting rid of these ALSO allows the dependence of MachineInstr.h on
MRegisterInfo.h to be removed, which makes me much happier, and probably
alkis too.  :)

llvm-svn: 11287
2004-02-10 21:21:17 +00:00
Chris Lattner 91b2fb2cec Remove some unneeded stuff
llvm-svn: 11286
2004-02-10 21:19:49 +00:00
Chris Lattner 0e615e6c20 Eliminate MachineOperand::isPhysicalRegister. The X86 backend should use
MRegisterInfo::isPhysicalRegister(MO.getReg()) and the Sparc backend should
use isMachineRegister()

llvm-svn: 11279
2004-02-10 20:42:11 +00:00
Chris Lattner 13d2f3bbc0 Simplify condition, this does not change the predicate at all though
llvm-svn: 11275
2004-02-10 20:30:40 +00:00
Misha Brukman 9a4b8f8263 * Added class comments
* Doxygenified existing comments
* Compactified code to be more consistent

llvm-svn: 11268
2004-02-10 18:44:16 +00:00
Misha Brukman 78292b3e66 Doxygen-ify comments, make function prototypes more consistent in format.
llvm-svn: 11259
2004-02-10 16:39:05 +00:00
Alkis Evlogimenos 56258ab1a2 Add global methods that prevent us from using ilist::iterators as
random access iterators.

llvm-svn: 11248
2004-02-09 22:40:50 +00:00
Brian Gaeke 0df4298547 SchedGraph doesn't need to be friends with SchedGraphNodeCommon anymore.
llvm-svn: 11240
2004-02-09 18:43:06 +00:00
Chris Lattner cbd34b2ae6 Now that all of the derived types have disciplined interfaces, we can eliminate
all of the ad-hoc storage of contained types.  This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.

llvm-svn: 11230
2004-02-09 05:40:24 +00:00
Chris Lattner 4da68e2d7b Increase encapsulation of the StructType class, eliminating the getElementTypes() member
llvm-svn: 11227
2004-02-09 04:36:50 +00:00
Chris Lattner f5a4e33e49 Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
members, and eliminating the getParamTypes() method, and the associated typedef.

llvm-svn: 11223
2004-02-09 04:12:57 +00:00
Chris Lattner fae8ab3088 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Chris Lattner b0f32183e4 Substantially improve the DSA code by removing 'forwarding' nodes from
DSGraphs while they are forwarding.  When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted.  This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.

llvm-svn: 11175
2004-02-08 01:27:18 +00:00
Chris Lattner f3861ce4f6 Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
llvm-svn: 11173
2004-02-08 00:53:26 +00:00
Chris Lattner 74a99554d1 One of the 'annoying' things about ilists is that the iterators don't behave
quite the same as for non-intrusive lists of pointers to nodes.  To support
transitioning code bases, add a new 'compatibility' iterator.

llvm-svn: 11172
2004-02-08 00:51:31 +00:00
Chris Lattner d9a063c9a2 Change to use iterators instead of direct access
llvm-svn: 11170
2004-02-08 00:22:41 +00:00
Chris Lattner 7b3d404e28 Abstract out the Nodes collection. Instead of providing a getNodes() method,
provide node_begin/end iterators, which are only guaranteed to be
bidirectional, not random access.

llvm-svn: 11165
2004-02-07 23:57:09 +00:00
Chris Lattner 6e69a5aa5d Actually USE isForwarding method
llvm-svn: 11160
2004-02-07 23:02:32 +00:00
Chris Lattner e37a472ef0 As Alkis pointed out to me, I forgot to commit this... :(
llvm-svn: 11159
2004-02-07 22:54:19 +00:00
Brian Gaeke 92affee3e7 Use autoconf answers from config.h (FIXME, should autoconf this file
directly instead).

Fix LockHolder/MutexLocker typo.

llvm-svn: 11156
2004-02-06 22:33:17 +00:00
Misha Brukman b596679737 Fix grammar.
llvm-svn: 11153
2004-02-06 18:40:35 +00:00
Alkis Evlogimenos 327426411e Modify the two address instruction pass to remove the duplicate
operand of the instruction and thus simplify the register allocation.

llvm-svn: 11124
2004-02-04 22:17:40 +00:00
Brian Gaeke 9ce98a7e9f Include <iosfwd> and <string> instead of <iostream>.
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.

llvm-svn: 11121
2004-02-04 21:41:10 +00:00
Chris Lattner 4babe055d3 Check in header file I forgot before.
llvm-svn: 11115
2004-02-04 03:59:08 +00:00
Chris Lattner 040ad3afa8 Delete the BasicBlock ctor that only takes a BasicBlock to insert before. This
fails when the basic block points to the function->end.  Instead, require that
the client pass in the function AND the basicblock to insert into.

llvm-svn: 11112
2004-02-04 03:57:34 +00:00
Alkis Evlogimenos 3d100ef0ca When an instruction like: A += B had both A and B virtual registers
spilled, A was loaded from its stack location twice. This fixes the bug.

llvm-svn: 11093
2004-02-03 01:13:07 +00:00
Alkis Evlogimenos 74b26f77a3 Revert changes. Will implement this using a different set of primitives
llvm-svn: 11091
2004-02-02 23:08:58 +00:00
Alkis Evlogimenos 5f03f684ed Add MachineOperand::setDef() and MachineOperand::setUse() so that the
TwoAddressInstructionPass can correctly update use/def information.

llvm-svn: 11086
2004-02-02 21:55:18 +00:00
Brian Gaeke fea8eb8938 Add prototype for llvm::allocatePowerPCTargetMachine().
llvm-svn: 11072
2004-02-02 19:05:08 +00:00
Chris Lattner 6fe75845f9 Correct the method I just added to actually return false sometimes
llvm-svn: 11069
2004-02-02 18:53:04 +00:00
Chris Lattner 29734bccc5 Add a new method to ConstantFP
llvm-svn: 11068
2004-02-02 18:40:29 +00:00
Chris Lattner 5e2feb4a0f The first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx
llvm-svn: 11063
2004-02-01 22:48:09 +00:00
Alkis Evlogimenos 0df32f636e Add MRegisterInfo::getNumRegs().
llvm-svn: 11058
2004-02-01 17:14:20 +00:00
Chris Lattner 87d16ffdb0 Add comments
llvm-svn: 11042
2004-02-01 00:32:48 +00:00
Alkis Evlogimenos 50d97e33b7 Merge safe parts from last night's buggy commit. These do not break
any test cases :-)

llvm-svn: 11032
2004-01-31 19:59:32 +00:00
Chris Lattner f5e7107425 Add two static methods to avoid having client code explicitly compare against
FirstVirtualRegister

llvm-svn: 11031
2004-01-31 19:57:11 +00:00
Alkis Evlogimenos 26665e2636 Revert last night's changes as they broke some tests. Will remerge parts of the patch.
llvm-svn: 11029
2004-01-31 14:37:41 +00:00
Alkis Evlogimenos f2fb0fb486 Several performance enhancements and cleanups from Chris.
Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.

llvm-svn: 11028
2004-01-31 04:56:07 +00:00
Chris Lattner 6866e18e48 Add a new pointsToConstantMemory method to the AliasAnalysis interface
which can be implemented to improve the quality of mod-ref information.

llvm-svn: 11020
2004-01-30 22:15:41 +00:00
Chris Lattner bc699a10d1 Add a new lazily constructed mapping from Idx's the MBB they represent
llvm-svn: 11017
2004-01-30 22:08:09 +00:00
Brian Gaeke 845c0dd196 Give clients of MachineFunctionPrinter the ability to specify a banner and
choose an ostream.

llvm-svn: 11016
2004-01-30 21:53:46 +00:00
Misha Brukman 78fd5d7f95 Doxygenify comments.
llvm-svn: 11014
2004-01-30 17:22:50 +00:00
Chris Lattner 0c0e0d8d6c Keep track of all of the globals inserted into the scalar map
llvm-svn: 10995
2004-01-28 03:01:22 +00:00
Chris Lattner 779ed4f1de Pull the ScalarMap out into something that is more structured than what we had
before.  This allows us to have a place to implement optimizations in a
structured way.

llvm-svn: 10994
2004-01-28 02:42:12 +00:00
Chris Lattner 91c33446ca Minor tweaks
llvm-svn: 10983
2004-01-27 21:49:42 +00:00
Chris Lattner e11e9b9e15 Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
structured access to the globals list, add a couple helper methods.

llvm-svn: 10982
2004-01-27 21:49:25 +00:00
Chris Lattner 748b56f76b * cloneReachable* and clonePartiallyInto are not obsolete
* Make AssertNodeInGraph not be HORRIBLY time consuming
* Eliminate the dead mergeInGlobalsGraph method
*** Add the definition for the new ReachabilityCloner class

llvm-svn: 10981
2004-01-27 21:48:35 +00:00
Alkis Evlogimenos 59e3325c26 Fix failing test cases with joined live intervals. It turns out that
when joining we need to check if we overlap with the second interval
or any of its aliases.

Also make joining intervals the default.

llvm-svn: 10973
2004-01-23 13:37:51 +00:00
Chris Lattner 7fd9f4ecdc Add new flag, other minor modifications
llvm-svn: 10969
2004-01-23 01:42:32 +00:00
Chris Lattner f0406a9739 Fix grammar
llvm-svn: 10968
2004-01-23 01:42:16 +00:00
Alkis Evlogimenos 73df113676 Add option to join live intervals. Two intervals are joined if there
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.

This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).

The option can be enabled by passing -join-liveintervals where
appropriate.

llvm-svn: 10965
2004-01-22 23:08:45 +00:00
Chris Lattner 80f89ea522 Eliminated the CompletedNodes argument to the cloneReachable* methods. This
map was only used to implement a marginal GlobalsGraph optimization, and it
actually slows the analysis down (due to the overhead of keeping it), so just
eliminate it entirely.

llvm-svn: 10955
2004-01-22 16:56:13 +00:00
Chris Lattner 94f4b2a78b It doesn't make sense for one side to be const, but not the other.
llvm-svn: 10952
2004-01-22 16:08:51 +00:00
Chris Lattner c47cf33346 Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
why this one was)

Add new method proto

llvm-svn: 10950
2004-01-22 15:26:52 +00:00
Chris Lattner 11d773f8f8 Specialize std::swap correctly
llvm-svn: 10949
2004-01-22 15:26:15 +00:00
Misha Brukman 2b5dc166a1 To materialize a module, you need to know what functions NEED to be read and
which ones don't, which is state that the parent class doesn't know without
knowing the implementation. Let the children classes implement
materializeModule().

llvm-svn: 10942
2004-01-21 22:54:10 +00:00
Misha Brukman 6e2c6054c1 If you call abort(), #include <cstdlib>
llvm-svn: 10941
2004-01-21 22:50:12 +00:00
Brian Gaeke a2404521d5 Regenerated using autoconf-2.57 and autoheader-2.57.
llvm-svn: 10934
2004-01-21 19:39:29 +00:00
Chris Lattner ef6883bdcf Move SlotCalculator.h from include/llvm to include/llvm/Analysis
llvm-svn: 10930
2004-01-20 19:50:12 +00:00
Tanya Lattner 72494e04be Moved iterators to common file.
llvm-svn: 10925
2004-01-20 17:49:42 +00:00
Chris Lattner da550c1efb add a method proto, make a method not inline
llvm-svn: 10921
2004-01-20 00:54:47 +00:00
Chris Lattner e6f99bd3a9 Add enum for compaction table.
llvm-svn: 10916
2004-01-18 21:09:23 +00:00
Chris Lattner 23e583b5dc Add support for representing the "compaction table"
Change protected members to private.  Nothing should subclass SlotCalculator

llvm-svn: 10912
2004-01-18 21:03:49 +00:00
Chris Lattner 4533ba592b fix copy-and-pasto
llvm-svn: 10907
2004-01-17 22:48:06 +00:00
Chris Lattner a75f858ac4 Revision of Brian's threading support library to be a bit more generic and
platform independent.  This code is completely untested (but never used),
and needs autoconf support for detecting pthreads, but it's a start, and
deletes two emails from my inbox.  :)

llvm-svn: 10906
2004-01-17 19:54:29 +00:00
Alkis Evlogimenos d86933d21d Fold open interval ends handling into
LiveIntervals::Interval::expiredAt() and simplify regalloc code.

llvm-svn: 10894
2004-01-16 20:17:05 +00:00
Alkis Evlogimenos 3010b3e38e Use a list instead of a vector to store intervals. This will be needed
when we join intervals and one of the two will need to be removed.

llvm-svn: 10892
2004-01-16 16:06:59 +00:00
Brian Gaeke 456f9a502b Remove configure support for endianness checking, the need for which
Chris has helpfully expunged.

llvm-svn: 10873
2004-01-15 06:22:37 +00:00
Chris Lattner b3d765f5dd Remove ENDIAN_* support. LLVM does not need it anymore.
llvm-svn: 10872
2004-01-15 06:13:58 +00:00
Chris Lattner 604d5f36fe Remove broken doxygen comments
llvm-svn: 10869
2004-01-15 04:37:10 +00:00
Chris Lattner b05f02336c Improve comments, add support for remembering the constants strings that
are to be emitted.

llvm-svn: 10866
2004-01-14 23:37:43 +00:00
Chris Lattner d8087822be add support for -- for symmetry
llvm-svn: 10865
2004-01-14 23:37:22 +00:00
Chris Lattner 87ce7dcb3e Add new ConstantArray::isString(), as the conditions for using getString()
are complex enough to check that it should be a seperate method.

While I'm here, improve ConstantArray::getNullValue a bit, though the
FIXME is still quite valid.

llvm-svn: 10850
2004-01-14 17:06:21 +00:00
Chris Lattner 6089bb1f19 The only clients of the slot calculator are now the asmwriter and bcwriter.
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not.  This makes it
reasonable to add bcwriter specific stuff to it as necessary.

llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Alkis Evlogimenos 1a01c80f1b Remove allocatable registers vector. It is already provided by
LiveVariables.

llvm-svn: 10830
2004-01-13 22:10:43 +00:00