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

138 Commits

Author SHA1 Message Date
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
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
6d6ab846af Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +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
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
Alkis Evlogimenos
5e78d4bd75 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
e128cb3295 Revert changes. Will implement this using a different set of primitives
llvm-svn: 11091
2004-02-02 23:08:58 +00:00
Alkis Evlogimenos
e20cdc6437 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
Alkis Evlogimenos
ac4fe24ed8 I wonder how this didn't cause any tests to fail...
llvm-svn: 10462
2003-12-14 13:30:19 +00:00
Alkis Evlogimenos
29127b8825 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.

llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Chris Lattner
e595976ed9 Add some "useful" methods
llvm-svn: 10277
2003-12-01 05:30:29 +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
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Misha Brukman
cda7f97dbb The word dependent' has no a'.
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Chris Lattner
138a3fc9ab Completely eliminate the per-machine-instruction regsUsed set.
This substantially shrinks the size of each machine instruction, which should
make allocation faster and the cache footprint of the machine code lighter.

Here are some timings for code generation of the larger benchmarks we have.
This are timings of code generation phases of the X86 JIT, when compiled in
debug mode:

		Before	After	Diff
164.gzip:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2031	0.1757	-15.6%
  TOTAL		0.5585	0.4999	-11.7%
Ptrdist-bc:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2070	0.1933	- 7.1%
  TOTAL		0.6972	0.6464	- 7.9%
197.parser:
  InstSel	0.2148	0.2148	- 0.0%
  RegAlloc	0.4941	0.4277	-15.5%
  TOTAL		1.3749	1.2851	- 7.0%
175.vpr:
  InstSel	0.2519	0.2109	-19.4%
  RegAlloc	0.5976	0.5663	- 5.5%
  TOTAL		1.6933	1.6347	- 3.5%
254.gap:
  InstSel	1.1328	0.9921	-14.2%
  RegAlloc	2.6933	2.4804	- 8.6%
  TOTAL		7.7871	7.2499	- 7.4%

llvm-svn: 7622
2003-08-05 22:39:13 +00:00
Chris Lattner
a826c8d485 Do not insert physical regsiters into the regsUsed set
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
Chris Lattner
8da1b00db6 Remove unused method
llvm-svn: 7608
2003-08-05 17:09:08 +00:00
Chris Lattner
b047a0d449 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
Vikram S. Adve
19309fca4b Add an assertion.
llvm-svn: 7326
2003-07-25 20:58:57 +00:00
Vikram S. Adve
6aa3abf7fa 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
e133e7d852 Leak fix: delete old objects before reallocation in an assignment operator!
llvm-svn: 7055
2003-07-02 01:25:44 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Chris Lattner
7aaea42f1e Minor cleanups:
* Document the MOTy namespace correctly for doxygen
  * Eliminate usage of the MachineOpCode typedef, which should eventually
    be eliminated entirely.

llvm-svn: 6584
2003-06-03 15:42:53 +00:00
Chris Lattner
68f1b02a60 Remove NonCopyable base class to clean up doxygen output
llvm-svn: 6551
2003-06-02 22:07:37 +00:00
Vikram S. Adve
c40874054e Support for annul/pred and other future flags on op codes.
Support for recording the physical register for implcit references.

llvm-svn: 6471
2003-05-31 07:43:01 +00:00
Vikram S. Adve
ab50c0aee5 Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags.  Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".

llvm-svn: 6342
2003-05-27 00:06:48 +00:00
Chris Lattner
cfa7a8f9a2 Remove obsolete ctor
llvm-svn: 5301
2003-01-15 19:47:02 +00:00
Chris Lattner
f254db43cd Add support for the CC registers for Sparc BE
llvm-svn: 5296
2003-01-15 19:22:06 +00:00
Chris Lattner
ab69d9da2f Move annotation to support library
llvm-svn: 5268
2003-01-14 21:29:58 +00:00
Chris Lattner
1f29ca49c7 * Add 3 new types of MachineOperand: ConstantPoolIndex ExternalSymbol and GlobalAddress's
* Add new isPCRelative modifier flag which should be used in place of MO_PCRelativeDisp type.
* Fix a bug in isPhysicalRegister
* Add new setOpcode and RemoveOperand methods

llvm-svn: 5209
2003-01-13 00:18:17 +00:00
Chris Lattner
84cb1f5dbc * Frame indices are signed
* Cluster modification methods together

llvm-svn: 5164
2002-12-28 20:05:44 +00:00
Chris Lattner
aea2f8e9da *** empty log message ***
llvm-svn: 5138
2002-12-25 05:00:49 +00:00
Chris Lattner
7ac77c761c Add new opIsUse method
llvm-svn: 5062
2002-12-15 22:05:02 +00:00
Chris Lattner
026fa9948b Add capability to have a MachineBasicBlock as an operand to a MachineInstr
Add a bunch of methods to MachineOperand is* to reduce usage of MO_foo

llvm-svn: 5032
2002-12-15 08:01:02 +00:00
Misha Brukman
940cfa8597 Instead of checking op.getType() against MO_VirtualRegister and
MO_MachineRegister, we no longer distinguish Virtual vs. Machine registers
externally, they're ALL registers, all equal.

Registers are only differentiated whether they are >=
MRegisterInfo::FirstVirtual or not.

llvm-svn: 4823
2002-11-22 22:40:52 +00:00
Chris Lattner
6315957999 Add helper method
llvm-svn: 4744
2002-11-18 06:57:05 +00:00