1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

158 Commits

Author SHA1 Message Date
Alkis Evlogimenos
5aa39e1583 Add support for folding memory operands for ADC, SBB and SUB instructions.
llvm-svn: 11541
2004-02-17 08:08:51 +00:00
Chris Lattner
eb1428d581 Add a (hidden) option to print instructions that fail to fuse. It's looking
like compares and test's would be the next huge win...

llvm-svn: 11539
2004-02-17 08:03:47 +00:00
Alkis Evlogimenos
19248dd757 Add support for folding memory operands in MOVri{8,16,32} instructions.
llvm-svn: 11538
2004-02-17 07:47:20 +00:00
Chris Lattner
a9493ad718 Add an option to disable spill fusing in the X86 backend
llvm-svn: 11531
2004-02-17 06:30:34 +00:00
Chris Lattner
d4b2f4ef32 Fix the mneumonics for the mov instructions to have the source and destination
order in the correct sense!! Arg!

llvm-svn: 11530
2004-02-17 06:28:19 +00:00
Chris Lattner
4682990fa5 GRRR. Move instructions have swapped the order of the r/m operands.
llvm-svn: 11528
2004-02-17 06:20:20 +00:00
Chris Lattner
e227ae6b88 Change to match the newer, simpler, interface
llvm-svn: 11525
2004-02-17 05:54:57 +00:00
Chris Lattner
b82bb37952 Add support for folding memory operands into AND and IMUL's
llvm-svn: 11523
2004-02-17 05:46:06 +00:00
Chris Lattner
48e19d8b8e Scrunchify code, by adding helpers. No functionality changes.
llvm-svn: 11522
2004-02-17 05:35:13 +00:00
Alkis Evlogimenos
c4ec9111bb Add API to check and fold memory operands into instructions.
llvm-svn: 11519
2004-02-17 04:33:18 +00:00
Chris Lattner
679c106ce3 Fix the 'have a framepointer' case, so that the frame pointer always points
to the old saved EBP.

llvm-svn: 11455
2004-02-15 00:15:37 +00:00
Chris Lattner
3246911460 There is no reason to align the stack pointer if there are no callees of this
function!

llvm-svn: 11450
2004-02-14 20:11:07 +00:00
Chris Lattner
f28479d600 The prologue/epilogue related method calls have no reason to return a value,
make them return void.

This allows us to avoid some costly MBB.size() calls

llvm-svn: 11448
2004-02-14 19:49:54 +00:00
Chris Lattner
1248c8a7f7 finegrainify namespacification, fix 80col prob
llvm-svn: 11445
2004-02-14 06:00:36 +00:00
Alkis Evlogimenos
a31a767307 Use newly added next() and prior() utility functions.
llvm-svn: 11430
2004-02-14 01:18:34 +00:00
Alkis Evlogimenos
94cab18bdc 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
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
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
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Alkis Evlogimenos
c6a7c83333 Change all machine basic block modifier functions in MRegisterInfo to
return the number of instructions added to/removed from the basic block
passed as their first argument.

Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.

llvm-svn: 9704
2003-11-04 22:57:09 +00:00
John Criswell
b402729b30 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
c115e75755 Output a contorted sequence of instructions to make sure that we don't access
off the bottom of the stack.  This fixes PR#41

llvm-svn: 9114
2003-10-14 19:09:05 +00:00
Chris Lattner
907de53acb Disable the leaf function optimization, which is apparently not legal on
X86/linux.  :(  The problem is that a signal delivered while the function
is executing could clobber the functions stack.  This is a partial fix
for PR41.

llvm-svn: 9113
2003-10-14 18:52:41 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
cd1aec5a9d Rename register classes to be upper case to make it obvious that they are X86
specific in the tree patterns

llvm-svn: 7578
2003-08-04 20:58:29 +00:00
Chris Lattner
457b33f7e4 Switch over to TableGen generated register file description
llvm-svn: 7511
2003-08-03 15:48:14 +00:00
Chris Lattner
8fdf81b97e Move "register flags" definition the type of registers to be fully fledged
value types

llvm-svn: 7377
2003-07-29 05:14:16 +00:00
Chris Lattner
ea424f3aff Rename -no-* to -disable-*
llvm-svn: 5642
2003-02-26 20:00:41 +00:00
Chris Lattner
013ad21206 Implement code to keep the stack pointer aligned to an 8 byte boundary.
This improves the performance of the power benchmark by a few percent.
This will be neccesary for SSE code, which requires 16 byte alignment of
the stack.

llvm-svn: 5320
2003-01-16 02:20:12 +00:00
Chris Lattner
df631471bf Handle frame offset due to return address pushed on the stack
llvm-svn: 5319
2003-01-15 22:57:35 +00:00
Chris Lattner
b355b13a8e * Move frame and constant pool indexes to first argument of memory reference
so we can put an offset in there as well...
* Fix long/ulong stuff

llvm-svn: 5231
2003-01-13 00:50:33 +00:00
Chris Lattner
ea33ca1e96 Rename FunctionFrameInfo to MachineFrameInfo
llvm-svn: 5201
2002-12-28 21:08:28 +00:00
Chris Lattner
a2bb8607ab *** Implement frame pointer elimination on X86!
* Include contents of X86RegisterClasses.cpp into here
* Adjustments to register api to work with new frame manager
* Eliminate moveImm2Reg, getFramePointer, and getStackPointer
* Cleanup and simplify prolog/epilog code generation
* Prolog/epilog are MUCH more efficient now.

llvm-svn: 5186
2002-12-28 20:32:28 +00:00
Chris Lattner
05a3f80d24 New simpler spill interface
llvm-svn: 5148
2002-12-25 05:07:09 +00:00
Chris Lattner
8e628685d9 Fix compilation on gcc 2.96
llvm-svn: 5116
2002-12-23 23:46:55 +00:00
Chris Lattner
2dc1b58c11 Fix warning
llvm-svn: 5109
2002-12-20 04:13:28 +00:00
Chris Lattner
0b617b0e1d Update to use new interface for register info
llvm-svn: 5098
2002-12-17 04:19:17 +00:00
Chris Lattner
dbca3de031 Round number of bytes allocated on the stack up to a multiple of 4 so that the
stack remains aligned

llvm-svn: 5095
2002-12-17 03:15:26 +00:00
Chris Lattner
4a60d804c2 Register allocator is responsible for spilling callee saved regs
llvm-svn: 5092
2002-12-17 02:48:57 +00:00
Chris Lattner
9d64c1e53a Fix prolog/epilog in the presence of alloca
llvm-svn: 5087
2002-12-16 22:29:30 +00:00
Chris Lattner
4576429b7c Finish implementation of alias list impl
llvm-svn: 5083
2002-12-16 19:31:48 +00:00
Chris Lattner
b833239d6b Try #2 to get alias set stuff to work
llvm-svn: 5077
2002-12-16 16:14:51 +00:00
Chris Lattner
b413ce63d5 Add info about register file aliasing
llvm-svn: 5074
2002-12-16 15:55:25 +00:00
Chris Lattner
4964e751cd Correct the setting of Def flags on registers that are modified!
llvm-svn: 5065
2002-12-15 22:38:47 +00:00
Chris Lattner
4214ac384a Simplify interfaces used by regalloc to insert code
llvm-svn: 5052
2002-12-15 20:06:35 +00:00
Misha Brukman
2f2cf00a9f Cleaned up the code: factored out switch/case into a separate function, put
constants in an array for quick lookup. Stole the idea from elsewhere in
Jello.

llvm-svn: 5017
2002-12-13 12:00:06 +00:00
Misha Brukman
b6fb990276 Treat longs as ints => pretend they're all 32-bit values and squeeze them into
32-bit registers.

llvm-svn: 5008
2002-12-13 10:43:09 +00:00
Misha Brukman
fb02408496 Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
PHI nodes.

llvm-svn: 5001
2002-12-13 09:54:12 +00:00
Misha Brukman
20c9c61c6d Moves now select correct opcode based on the data size.
llvm-svn: 4981
2002-12-13 04:24:53 +00:00
Misha Brukman
7dc6877ce2 Implemented functions for emitting prologues and epilogues;
removed EBP from the list of callee-saved registers (it isn't one).

llvm-svn: 4929
2002-12-04 23:57:03 +00:00
Misha Brukman
101076f586 storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by value
instead of by reference, since they return the modified iterator.

llvm-svn: 4914
2002-12-04 17:14:13 +00:00
Misha Brukman
6e1c4851ea Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since
it is target-independent.

llvm-svn: 4911
2002-12-04 16:47:04 +00:00
Misha Brukman
5639a6279e Added support for callee- and caller-save registers.
llvm-svn: 4897
2002-12-03 23:11:21 +00:00
Misha Brukman
0b310e3359 Fix order of operands on a store from reg to [reg+offset].
llvm-svn: 4857
2002-12-02 21:10:35 +00:00
Misha Brukman
3ba057b8c4 Oops. Got the MOVrm and MOVmr mixed up. Fixed. We can now print out
instructions correctly.

llvm-svn: 4830
2002-11-22 23:15:27 +00:00
Misha Brukman
02c0acabb9 Added methods to read/write values to stack in .h, fixed implementation in
.cpp to return the iterator correctly.

llvm-svn: 4827
2002-11-22 22:43:47 +00:00
Misha Brukman
96283090dc Add definitions for function headers from MRegisterInfo.h:
Some functions are in X86RegisterInfo.cpp, others, because of the data they
need, are in X86RegisterClasses.cpp, which also defines some register classes:
byte, short, and int.

llvm-svn: 4784
2002-11-20 18:59:43 +00:00
Chris Lattner
d25a097994 Initial checkin of X86 backend.
We can instruction select exactly one instruction 'ret void'.  Wow.

llvm-svn: 4284
2002-10-25 22:55:53 +00:00