Commit Graph

854 Commits

Author SHA1 Message Date
Alkis Evlogimenos 9bced9455a Remove unecessary if statements when looping on ImplicitDefs.
llvm-svn: 10444
2003-12-13 01:20:58 +00:00
John Criswell fb55ac24ec This appears to fix Bug 172 and does not break any other feature tests or
regression tests.

llvm-svn: 10388
2003-12-10 22:51:41 +00:00
Alkis Evlogimenos e59ad4b441 Make assertion stricter. Since the source operands are allocated at
this point, the second operand must be a physical register (it cannot
be a virtual one).

llvm-svn: 10292
2003-12-05 11:31:39 +00:00
Alkis Evlogimenos f8fe176204 Fix bug in register spilling when a preallocated live range overlaps a
potential register assignment.

llvm-svn: 10291
2003-12-05 11:17:55 +00:00
Alkis Evlogimenos 2de099e54f Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
llvm-svn: 10290
2003-12-05 10:38:28 +00:00
Alkis Evlogimenos ed28ca93ef Sort live intervals by increasing start point.
llvm-svn: 10289
2003-12-05 10:32:01 +00:00
Alkis Evlogimenos 5fe0031c68 Improve debugging output and clean up some code.
llvm-svn: 10288
2003-12-04 03:57:28 +00:00
Alkis Evlogimenos 26f17e73eb Print instructions before register allocation is performed. Also fix
bug where spill instructions were added to the next basic block
instead of the end of the current one if the instruction that required
the spill was the last in the block.

llvm-svn: 10272
2003-11-30 23:40:39 +00:00
Alkis Evlogimenos 0aa40f8db0 Remove "numReloaded" statistic.
llvm-svn: 10268
2003-11-30 05:15:36 +00:00
Alkis Evlogimenos 0e9ded74c0 Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
llvm-svn: 10103
2003-11-20 03:32:25 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke 8f53a89edf Fix problems linking against the reoptimizer; _llvm_regAllocState must have
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.

llvm-svn: 9858
2003-11-10 07:12:01 +00:00
Brian Gaeke c0c23c29aa Operand numbers are now ints. Save the register allocation of the value
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().

llvm-svn: 9842
2003-11-10 00:05:26 +00:00
Misha Brukman 2b8724acc6 Let's not forget about our friends -- Constant Pool indices.
llvm-svn: 9750
2003-11-06 00:04:11 +00:00
Chris Lattner a9e7fe9ea2 Do not use a class before it is defined.
Be gcc 3.4 clean

llvm-svn: 9727
2003-11-05 06:25:06 +00:00
Brian Gaeke 69c2841b2a Update verifySavedState()'s comment, so that it reflects its current
status.  In doFinalization(), skip over external functions, just like
Anand's mapping info does.

llvm-svn: 9703
2003-11-04 22:42:41 +00:00
Brian Gaeke 2a262ef095 Add comments.
llvm-svn: 9697
2003-11-04 18:25:56 +00:00
Brian Gaeke 8541bd9db9 Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
implementing verifySavedState().

In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.

llvm-svn: 9617
2003-10-30 21:21:33 +00:00
Brian Gaeke 727ec9bec5 Make AllocState an enum.
Move the stringifying method for that enum into class AllocInfo.

llvm-svn: 9616
2003-10-30 21:21:22 +00:00
Brian Gaeke eca381c7e8 Publicize the type of FnAllocState.
Prototype option to save state in a global instead of as a Constant in
 the Module. (Turned off, for now, with the on/off switch welded in the off
 position. You get the idea.)

llvm-svn: 9500
2003-10-24 21:21:58 +00:00
Chris Lattner 9ab7fbef60 standardize command line option names
llvm-svn: 9496
2003-10-24 20:05:58 +00:00
Brian Gaeke 24fb8f07f3 Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
llvm-svn: 9452
2003-10-23 20:39:18 +00:00
Brian Gaeke 390d31cde4 Move AllocInfo structure to a private AllocInfo.h header file.
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
Give doFinalization a method comment, and let it do the work of converting
 AllocInfos to LLVM Constants.

llvm-svn: 9451
2003-10-23 20:32:55 +00:00
Brian Gaeke a6bfe8eb9e Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
llvm-svn: 9450
2003-10-23 20:32:02 +00:00
Brian Gaeke 8e766c7ab3 New file, containing AllocInfo structure.
llvm-svn: 9449
2003-10-23 20:31:51 +00:00
Misha Brukman 88df876012 * Eliminate `using' directive
* Fix order of #includes
* Make code layout more consistent
* Eliminate extraneous whitespace and comment-lines

llvm-svn: 9433
2003-10-23 18:10:02 +00:00
Misha Brukman dc07775d58 * Fix order of #include files
* Doxygen-ify method comments

llvm-svn: 9432
2003-10-23 18:06:27 +00:00
Misha Brukman 0b624fefb7 * Order #includes as per style guide
* Doxygen-ify comments
* Make code layout more consistent

llvm-svn: 9431
2003-10-23 18:03:50 +00:00
Misha Brukman 28ba80e648 * Use C++ style comments instead of C-style
* Make file description more readable
* Make code layout more consistent, include comment in assert so it's visible
  during execution if it hits

llvm-svn: 9430
2003-10-23 18:02:47 +00:00
Misha Brukman 7d56d2c6fb * Eliminate `using' directive
* Make code layout more consistent

llvm-svn: 9427
2003-10-23 17:43:17 +00:00
Misha Brukman c7b1bce283 Make code layout more consistent.
llvm-svn: 9426
2003-10-23 17:39:37 +00:00
Brian Gaeke f140b28c16 Change the type of FnAllocState.
llvm-svn: 9388
2003-10-22 20:44:29 +00:00
Brian Gaeke 41fe18cbaa Don't worry about converting each function's reg. alloc. state into One Big
Constant early on, because we can do it in doFinalization.

Tighten up a comment.

llvm-svn: 9387
2003-10-22 20:44:23 +00:00
Brian Gaeke f29231ec3a Add prototype for verifySavedState().
llvm-svn: 9386
2003-10-22 20:23:13 +00:00
Brian Gaeke e3cf072d9e Doxygenify method comments.
Try to improve method comments a little.
Get rid of some excess whitespace; put braces on previous line when possible.
Add stub for method to verify the work of saveState().

llvm-svn: 9385
2003-10-22 20:22:53 +00:00
John Criswell 9583cfafc5 Added LLVM copyright notice.
llvm-svn: 9324
2003-10-21 15:29:18 +00:00
John Criswell 29265fe981 Added LLVM copyright header.
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell 4436c49787 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner b94550e537 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner 9177d11367 #include vector which we will need here soon
llvm-svn: 9144
2003-10-15 22:09:32 +00:00
Chris Lattner f95d9b99b3 Decrease usage of use_size()
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner 44d2c3514a Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Misha Brukman 80f283b316 * Doxygenified comments
* Wrap code at 80 columns
* Ordered includes according to LLVM style guide

llvm-svn: 9020
2003-10-10 17:41:32 +00:00
Alkis Evlogimenos 5f1f337d95 Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs
and TargetInstrDescriptor::ImplicitUses to always point to a null
terminated array and never be null. So there is no need to check for
pointer validity when iterating over those sets. Code that looked
like:

if (const unsigned* AS = TID.ImplicitDefs) {
  for (int i = 0; AS[i]; ++i) {
    // use AS[i]
  }
}

was changed to:

for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
  // use *AS
}

llvm-svn: 8960
2003-10-08 05:20:08 +00:00
Alkis Evlogimenos 5facafaabe Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
llvm-svn: 8819
2003-10-02 16:57:49 +00:00
Chris Lattner 1f8d21e233 include passes.h which defines the interface this file exposes
llvm-svn: 8793
2003-09-30 20:13:59 +00:00
Brian Gaeke 974bc6682e Update head-of-file comment.
llvm-svn: 8699
2003-09-24 18:16:23 +00:00
Brian Gaeke 1542a8b820 Untabify tabs in stuff I've recently added.
Check in my register allocator state-saving code.

llvm-svn: 8698
2003-09-24 18:08:54 +00:00
Brian Gaeke 82585e030c Use getRegClassID() instead of getRegClass()->getID(), since it's there.
Shorten the markSuggestedColorUsable method.
Add a switch for saving reg. alloc. state (coming soon).

llvm-svn: 8697
2003-09-24 17:50:28 +00:00
Brian Gaeke 50364030ca Remove some unused methods of class IGNode.
llvm-svn: 8696
2003-09-24 04:29:52 +00:00
Chris Lattner 6b379da6c3 Move getAnalysisUsage method from header to .cpp file. Add a normal file
header comment

llvm-svn: 8679
2003-09-23 15:13:04 +00:00
Brian Gaeke e383a14960 Use C++ math header instead of C version.
llvm-svn: 8648
2003-09-21 03:57:37 +00:00
Brian Gaeke 32cd554853 Erase now-unused prototypes.
llvm-svn: 8647
2003-09-21 02:51:00 +00:00
Brian Gaeke 20c888fa9f Rearrange #includes ... since there are fewer now I guess it's a win.
(I also zapped printMachineCode() and printLabel() at the previous checkin,
but forgot to mention it.)

llvm-svn: 8646
2003-09-21 02:50:21 +00:00
Brian Gaeke 3a0a5fc1b3 Standardize the names of include guards.
llvm-svn: 8645
2003-09-21 02:31:37 +00:00
Brian Gaeke 58dabb4406 Standardize the names of include guards.
Remove more excess whitespace.

llvm-svn: 8644
2003-09-21 02:31:25 +00:00
Brian Gaeke 73d10dc47b Standardize the names of include guards.
Fix typos in file header comment.

llvm-svn: 8643
2003-09-21 02:31:15 +00:00
Brian Gaeke 43593b8cd0 I tried to standardize the formatting and tidy up the huge amount of
excess whitespace a little. Also improved some comments.

llvm-svn: 8642
2003-09-21 02:24:09 +00:00
Brian Gaeke e1061018bf Convert PhyRegAlloc into a proper pass.
PhyRegAlloc.cpp:
 Don't include TargetMachine.h or TargetRegInfo.h, because these are provided
  by PhyRegAlloc.h.
 Merge class RegisterAllocator into class PhyRegAlloc.
 Simplify & move ctor, dtor to PhyRegAlloc.h.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 MarkAllocatedRegs() becomes a member method, with fewer args.

PhyRegAlloc.h:
 Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare
  TargetRegInfo forward.
 Give AddedInstrns the obvious clear() method.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 Add prototype for markAllocatedRegs().
 Remove unused inline void constructLiveRanges().

llvm-svn: 8641
2003-09-21 01:23:46 +00:00
Misha Brukman 02fe6b7683 Fixed spelling.
llvm-svn: 8588
2003-09-17 21:34:23 +00:00
Brian Gaeke 666b18f1a6 Fix typo in comment. Take out some random whitespace.
(Partial merge from my working file)

llvm-svn: 8564
2003-09-16 15:38:05 +00:00
Brian Gaeke c8a9ec01b6 Edit comment for accuracy
llvm-svn: 8562
2003-09-16 15:36:50 +00:00
Vikram S. Adve 8579a9a38c Add flag to control whether or not delay slots are filled during
instruction scheduling (this is off by default).

llvm-svn: 8553
2003-09-16 05:55:15 +00:00
Brian Gaeke 75ed4b8831 Fix typos in comments.
llvm-svn: 8523
2003-09-15 05:28:42 +00:00
Misha Brukman acda7df68b Fixed spelling and grammar.
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner 5718a6bf99 Don't build dead directories
llvm-svn: 8308
2003-09-01 20:34:15 +00:00
Chris Lattner c87312a858 Remove dead library makefile
llvm-svn: 8304
2003-09-01 20:29:43 +00:00
Chris Lattner a5b78c68d9 Remove makefile for dead library
llvm-svn: 8303
2003-09-01 20:26:52 +00:00
Chris Lattner eefb565449 LiveRange.h is now in lib/CodeGen/RegAlloc
llvm-svn: 8299
2003-09-01 20:17:13 +00:00
Chris Lattner e80612a28e LiveRangeInfo got moved into the lib/CodeGen/RegAlloc directory
llvm-svn: 8297
2003-09-01 20:12:17 +00:00
Chris Lattner f1ab45bdf5 PhyRegAlloc.h got moved to lib/CodeGen/RegAlloc
llvm-svn: 8296
2003-09-01 20:09:04 +00:00
Chris Lattner 7127065f24 Move IGNode from public include directory to here. Minor cleanups like adding std:: namespace qualifiers
llvm-svn: 8295
2003-09-01 20:05:47 +00:00
John Criswell a4b09fe071 Fixed two double free bugs that caused llc to segfault or run forever.
llvm-svn: 8191
2003-08-28 21:43:17 +00:00
Tanya Lattner 190b7a86ba Removing README
llvm-svn: 8180
2003-08-28 17:17:59 +00:00
Tanya Lattner 7efb18f49c Putting my revised version of ModuloScheduling in cvs. This is not complete...
llvm-svn: 8179
2003-08-28 17:12:14 +00:00
Tanya Lattner 89860151b9 Moved index into BB to common graph class because its needed by ModuloSchedGraph.
llvm-svn: 8174
2003-08-28 15:30:40 +00:00
Tanya Lattner cf8851eb20 Added/removed header file
llvm-svn: 8160
2003-08-27 15:12:24 +00:00
Tanya Lattner 9af699b885 *** empty log message ***
llvm-svn: 8153
2003-08-27 02:42:58 +00:00
Tanya Lattner cc85d4544f First version of SchedGraph common class and refactoring of SchedGraph.
llvm-svn: 8148
2003-08-25 22:42:20 +00:00
Chris Lattner e6235443a5 Fix bug: Jello/2003-08-23-RegisterAllocatePhysReg.ll
llvm-svn: 8095
2003-08-23 23:49:42 +00:00
Misha Brukman be372b91e1 The word `dependent' has no `a'.
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Chris Lattner a73b95821a Fix spello
llvm-svn: 8029
2003-08-21 22:05:57 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner 931947db18 Fix bug: Jello/2003-08-15-AllocaAssertion.ll
llvm-svn: 7916
2003-08-17 18:01:15 +00:00
Brian Gaeke 91e16e750b Fix typo in comment
llvm-svn: 7906
2003-08-15 21:19:25 +00:00
Chris Lattner 3b5b633c77 Remove uses of the NonCopyable class, to make the doxygen output look better
llvm-svn: 7880
2003-08-15 05:20:06 +00:00
Chris Lattner 0605c232b7 rename selection directory and library to SelectionDAG
llvm-svn: 7877
2003-08-15 04:55:22 +00:00
Chris Lattner e81de41edf Add a bunch of new node types, etc
llvm-svn: 7875
2003-08-15 04:53:16 +00:00
Brian Gaeke 8c14ba96ca Factory methods for function passes now return type FunctionPass *.
llvm-svn: 7839
2003-08-14 06:09:32 +00:00
Brian Gaeke cbd3a40626 Factory methods for function passes now return type FunctionPass *.
Get rid of RegisterLLC, which can't handle FunctionPasses anyway.

llvm-svn: 7836
2003-08-14 06:04:49 +00:00
Brian Gaeke 89207943a1 Factory methods for FunctionPasses now return type FunctionPass *.
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Chris Lattner bb9be9ddbc Mapping directory no longer exists
llvm-svn: 7801
2003-08-13 02:37:24 +00:00
Chris Lattner e9643bb118 Obsolete file
llvm-svn: 7799
2003-08-13 02:27:13 +00:00
Vikram S. Adve 7dc5b6707c For instructions in a delay slot of another instruction,
we no longer need to find the live-before set of the delayed
branch since that set is now included the live-before/after
set of the instructions in each delay slot.  Just assert that instead.

llvm-svn: 7796
2003-08-12 22:22:24 +00:00
Chris Lattner 2c2062cdba Build the SelectionDAG library
llvm-svn: 7718
2003-08-11 14:57:48 +00:00
Chris Lattner 600d308853 Initial checkin of SelectionDAG implementation. This is still rough and
unfinished

llvm-svn: 7717
2003-08-11 14:57:33 +00:00
Vikram S. Adve da92f366c7 Fix assertion in MachineInstr::substituteValue().
llvm-svn: 7675
2003-08-07 15:01:48 +00:00
Chris Lattner 30e987470f Use a new local data structure instead of the MachineInstr::regsUsed set
llvm-svn: 7621
2003-08-05 22:11:13 +00:00
Chris Lattner 92f5fb598c Add a map
llvm-svn: 7620
2003-08-05 22:09:31 +00:00
Chris Lattner e62a2a76e5 Minor cleanups
llvm-svn: 7619
2003-08-05 22:03:27 +00:00
Chris Lattner b05d3508d6 Physical registers no longer live in the regsUsed set for each machine instr
llvm-svn: 7618
2003-08-05 21:55:58 +00:00
Chris Lattner 020b544cbc Do not insert physical regsiters into the regsUsed set
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
Chris Lattner cd4f4320b0 All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in.

**** This now changes the semantics of these methods to preserve the flags,
     not clobber them!

llvm-svn: 7602
2003-08-05 16:58:46 +00:00
Chris Lattner 92a199dca7 Fix bugs handling ESP in alloca references
llvm-svn: 7591
2003-08-05 04:13:58 +00:00
Chris Lattner 506fa6843e Revert previous change, and be really anal about what physical registers can do.
llvm-svn: 7588
2003-08-05 00:49:09 +00:00
Chris Lattner 4b637cc666 Don't bother calculating info unless its needed. May reduce number of stack slots created.
llvm-svn: 7584
2003-08-04 23:42:37 +00:00
Chris Lattner 815b85e3ba * Fix spelling of 'necessary'
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx

llvm-svn: 7583
2003-08-04 23:36:39 +00:00
Chris Lattner 41a894de77 Simplify code, eliminating the need for the X86 isVoid target instr flag
llvm-svn: 7534
2003-08-03 21:51:45 +00:00
Chris Lattner 74e4e9b44f Set debug types
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner 1789d23990 Remove using decl
llvm-svn: 7531
2003-08-03 20:24:29 +00:00
Chris Lattner 6cce665888 Wrap at 80 columns
llvm-svn: 7503
2003-08-03 13:49:03 +00:00
Chris Lattner 1007f033d4 Move DEBUG to Debug.h
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Vikram S. Adve 9143f1962e All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().

llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Vikram S. Adve c9cb319bcb 1. Bug fix: Don't use branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
   (which will eventually be moved before the branch).
2. Bug fix:  Delete the delay slot instr, not the branch instr, when
   moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
   it is now machine-independent.

llvm-svn: 7389
2003-07-29 19:49:21 +00:00
Vikram S. Adve e2ef34a818 Add const version of getLiveRangeForValue().
llvm-svn: 7386
2003-07-29 19:38:22 +00:00
Vikram S. Adve 91e75d87d2 Code to insert caller-saves moved here from SparcRegInfo: it is now
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).

llvm-svn: 7385
2003-07-29 19:37:41 +00:00
Chris Lattner 0c8de4bfca Making this code const-correct would be a pain, so I'll hack it.
llvm-svn: 7350
2003-07-26 23:29:51 +00:00
Chris Lattner 414832fea6 Const correctness fixes
llvm-svn: 7349
2003-07-26 23:24:56 +00:00
Chris Lattner 0ed86aca71 Be const correct
llvm-svn: 7348
2003-07-26 23:23:41 +00:00
Chris Lattner 1316383267 Hrm, another necesary one :(
llvm-svn: 7347
2003-07-26 23:22:19 +00:00
Chris Lattner 824398ec6d Remove #include
llvm-svn: 7342
2003-07-26 23:01:04 +00:00
Chris Lattner 981e585021 Remove extraneous #includes
llvm-svn: 7341
2003-07-26 23:00:29 +00:00
Vikram S. Adve 45766ab682 (1) Change the way unused regs. are marked and found to consider regType
info (since multiple reg types may share the same reg class).
(2) Remove machine-specific regalloc. methods that are no longer needed.
    In particular, arguments and return value from a call do not need
    machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
    overloading when an include file is omitted.

llvm-svn: 7329
2003-07-25 21:06:09 +00:00
Vikram S. Adve abcd8d75ff Remove unused field. Change the way unused regs. are marked and
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).

llvm-svn: 7327
2003-07-25 21:00:13 +00:00
Chris Lattner 79f22fe02f Remove unnecessary casts
llvm-svn: 7250
2003-07-23 15:17:51 +00:00
Chris Lattner b976da9ecf Random cleanups
llvm-svn: 7247
2003-07-23 14:59:40 +00:00
Chris Lattner 0470412961 Remove using decl
llvm-svn: 7246
2003-07-23 14:55:59 +00:00
Vikram S. Adve e2e50f2880 Values stored in CallArgsDescriptor cannot be const.
llvm-svn: 7156
2003-07-10 19:46:15 +00:00
Vikram S. Adve abf331db03 isMarkedForSpill() should be const.
llvm-svn: 7155
2003-07-10 19:45:28 +00:00
Vikram S. Adve 689adb19b0 Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.

llvm-svn: 7154
2003-07-10 19:45:07 +00:00
Vikram S. Adve 39587d6264 Print out all neighbors in interference graph, not just higher-numbered ones.
llvm-svn: 7153
2003-07-10 19:43:33 +00:00
Vikram S. Adve 5224b19deb Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same
register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7152
2003-07-10 19:42:55 +00:00
Vikram S. Adve 3bb921e8df Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
llvm-svn: 7112
2003-07-06 20:33:21 +00:00
Vikram S. Adve 1fce4cfa95 Minor beautification: fold a couple of lines of code.
llvm-svn: 7054
2003-07-02 01:24:00 +00:00
Vikram S. Adve fa1dde06aa A def. operand of a machine instruction may be an ordinary Value*,
not just an Instruction*, at least in one unfortunate case:
the first operand to the va_arg instruction.
Modify ValueToDefVecMap to map from Value*, not Instruction*.

llvm-svn: 7052
2003-07-02 01:16:01 +00:00
John Criswell 3ef61afb76 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner 52de05c6b3 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
Chris Lattner 55491774bb Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca

llvm-svn: 6727
2003-06-16 22:29:09 +00:00
Chris Lattner 5b7e3cae42 Remove two using decls
Remove usage of alloca

llvm-svn: 6725
2003-06-16 22:18:28 +00:00
Brian Gaeke 7a719ed20c Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.

llvm-svn: 6723
2003-06-16 21:54:01 +00:00
John Criswell cfac736363 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Guochun Shi c40f66c928 add some comments
add a function ModuloScheduling::dumpFinalSchedule() to print out final schedule

llvm-svn: 6677
2003-06-10 20:04:30 +00:00
Guochun Shi f6b88e55ed add an brief instruction what this pass is
llvm-svn: 6676
2003-06-10 20:03:39 +00:00
Guochun Shi d2656536f5 a simple introduction to this pass
llvm-svn: 6675
2003-06-10 20:02:16 +00:00
Guochun Shi 9766f8c3a2 cleaned code
add some comments

llvm-svn: 6674
2003-06-10 19:09:00 +00:00
Guochun Shi 2ee8c115d8 delete useless functions
add comment

llvm-svn: 6673
2003-06-08 23:16:07 +00:00
Guochun Shi 1ecd0e0228 change DEBUG to DEBUG_PRINT
llvm-svn: 6672
2003-06-08 20:40:47 +00:00
Misha Brukman 366494ab0d Do not hastily change the Opcode from 'r' to 'i' type if we're not actually
SETTING the operand to be an immediate or have verified that one of the operands
is really a SignExtended or Unextended immediate value already, which warrants
an 'i' opcode.

llvm-svn: 6662
2003-06-07 02:34:43 +00:00
Chris Lattner a7c5e0fba3 Fix bug: Jello/2003-06-04-bzip2-bug.ll
llvm-svn: 6624
2003-06-05 17:15:04 +00:00