1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
Commit Graph

448 Commits

Author SHA1 Message Date
Brian Gaeke
2a087ad673 Include <string> for compatibility with gcc 3.0.x (the system compiler on
Debian.)

llvm-svn: 12985
2004-04-16 15:57:14 +00:00
Brian Gaeke
95213bd702 This file does not appear to be included anywhere.
llvm-svn: 12777
2004-04-08 19:36:26 +00:00
Brian Gaeke
14dadd43e1 This file is no longer used.
llvm-svn: 12767
2004-04-07 21:01:22 +00:00
Chris Lattner
c241db65d6 Allow converting a builder to an iterator
llvm-svn: 12586
2004-04-01 04:03:10 +00:00
Brian Gaeke
e7f4f73f67 Add clear() forwarding method.
llvm-svn: 12580
2004-03-31 22:43:12 +00:00
Chris Lattner
3f24ea6ccf MachineBasicBlock::remove should not change the iterator passed into it
llvm-svn: 12569
2004-03-31 21:58:50 +00:00
Alkis Evlogimenos
64aa7f3708 Fix bug introduced by yesterday's changes.
llvm-svn: 12119
2004-03-04 18:02:07 +00:00
Brian Gaeke
aa96ff7926 Make MachineOperand's value named 'contents'. Make really, really sure
it is always completely initialized and copied.
Also, fix up many comments and asserts.

llvm-svn: 12100
2004-03-03 19:07:27 +00:00
Chris Lattner
4c7ed6793e Remove public header. It's been moved to lib/Target/SparcV9
llvm-svn: 12004
2004-02-29 19:13:20 +00:00
Chris Lattner
df24575c31 Do not use explicit casts that hide the dependence on Instruction being
annotable

llvm-svn: 12000
2004-02-29 19:02:26 +00:00
Chris Lattner
768b31fc77 Remove unneeded #include
llvm-svn: 11978
2004-02-29 05:15:56 +00:00
Chris Lattner
34977159b3 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.

llvm-svn: 11976
2004-02-29 05:06:49 +00:00
Chris Lattner
85dd74a158 Add BuildMI variants that take a MBB::iterator
llvm-svn: 11975
2004-02-29 04:55:28 +00:00
Alkis Evlogimenos
5193c08a8a Make MachineOperand's immediate value an int and save 4 bytes out of
each MachineOperand. We don't really need an int64_t immediate :-).

llvm-svn: 11906
2004-02-27 15:05:28 +00:00
Alkis Evlogimenos
f1516015af Add DenseMap template and actually use it for for mapping virtual regs
to objects.

llvm-svn: 11840
2004-02-25 21:55:45 +00:00
Brian Gaeke
eae0364189 FunctionLiveVarInfo.h moved: include/llvm/CodeGen -> lib/Target/Sparc/LiveVar
llvm-svn: 11804
2004-02-24 19:46:00 +00:00
Alkis Evlogimenos
9b103024ef 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
850bd0819f 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
7f7d70a53c 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
abc8efe386 Fix silly bug in implementation of getUseType(). Thanks Misha.
llvm-svn: 11711
2004-02-22 07:24:19 +00:00
Alkis Evlogimenos
6998610eda 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
Alkis Evlogimenos
32d12d31ae 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
Alkis Evlogimenos
f32239a5c6 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
6c338f7627 ADd a method for when an instruction moves
llvm-svn: 11626
2004-02-19 18:28:22 +00:00
Chris Lattner
436ab13009 Add a MachineBasicBlock::getParent() method
llvm-svn: 11622
2004-02-19 16:13:54 +00:00
Alkis Evlogimenos
d4fd43dee8 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
34f3bce70c eliminate a pair of really inefficient methods now that noone uses them
llvm-svn: 11579
2004-02-18 16:45:22 +00:00
Alkis Evlogimenos
a479dc4715 Add LiveIntervals::Interval::empty() member function.
llvm-svn: 11520
2004-02-17 05:14:37 +00:00
Alkis Evlogimenos
790b000aa7 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
1026a01d5a Eliminate the use of spill (reserved) registers.
llvm-svn: 11476
2004-02-15 10:24:21 +00:00
Chris Lattner
bbe538e930 finegrainify namespacification
llvm-svn: 11469
2004-02-15 05:52:36 +00:00
Alkis Evlogimenos
6d6ab846af Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos
e504fa6710 Mark MachineBasicBlock::operator[] deprecated.
llvm-svn: 11392
2004-02-13 20:05:56 +00:00
Alkis Evlogimenos
c109214f58 Add getNumVirtualRegs().
Whitespace cleanups.

llvm-svn: 11388
2004-02-13 18:07:06 +00:00
Brian Gaeke
7707461afa Include <iosfwd>.
Add prototypes for MachineBasicBlock's dump() and print() methods.

llvm-svn: 11365
2004-02-13 04:40:15 +00:00
Alkis Evlogimenos
00d97b6a13 Move ilist_trairs<MachineInstr> in MachineBasicBlock.
llvm-svn: 11358
2004-02-12 19:12:03 +00:00
Alkis Evlogimenos
3ecdcd18c5 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
ef375052c6 Rename the opCode instance variable to Opcode
llvm-svn: 11348
2004-02-12 16:09:53 +00:00
Chris Lattner
04c37927bd Remove a dead field from MachineInstr!
llvm-svn: 11347
2004-02-12 16:05:03 +00:00
Brian Gaeke
57484e290d Add one more doxygen comment.
llvm-svn: 11344
2004-02-12 04:26:49 +00:00
Brian Gaeke
840e7e40fe 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
0608698c34 Remove these MachineOpCodeFlags and their accessor - they are never set.
llvm-svn: 11341
2004-02-12 04:00:55 +00:00
Alkis Evlogimenos
b755d35fd2 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
2e521768eb Remove getOpCode(). Help doxygenify some comments.
llvm-svn: 11338
2004-02-12 01:34:03 +00:00
Chris Lattner
a04a1456da Urg, the X86 backend DOES use virtual register operands. :(
llvm-svn: 11288
2004-02-10 21:43:11 +00:00
Chris Lattner
286169ff60 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
04f36062ea 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
854737de3f Simplify condition, this does not change the predicate at all though
llvm-svn: 11275
2004-02-10 20:30:40 +00:00
Brian Gaeke
00b2107e2a SchedGraph doesn't need to be friends with SchedGraphNodeCommon anymore.
llvm-svn: 11240
2004-02-09 18:43:06 +00:00
Alkis Evlogimenos
676e5b8997 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