Chris Lattner
c6c1106909
Instead of storing operands as std::vector<Use>, just maintain a pointer
...
and num operands in the User class. this allows us to embed the operands
directly in the subclasses if possible. For example, for binary operators
we store the two operands in the derived class.
The has several effects:
1. it improves locality because the operands and instruction are together
2. it makes accesses to operands faster (one less load) if you access them
through the derived class pointer. For example this:
Value *GetBinaryOperatorOp(BinaryOperator *I, int i) {
return I->getOperand(i);
}
Was compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 4(%esp), %edx
movl 8(%esp), %eax
sall $4, %eax
movl 24(%edx), %ecx
addl %ecx, %eax
movl (%eax), %eax
ret
and is now compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 8(%esp), %eax
movl 4(%esp), %edx
sall $4, %eax
addl %edx, %eax
movl 44(%eax), %eax
ret
Accesses through "Instruction*" are unmodified.
3. This reduces memory consumption (by about 3%) by eliminating 1 word of
vector overhead and a malloc header on a seperate object.
4. This speeds up gccas about 10% (both debug and release builds) on
large things (such as 176.gcc). For example, it takes a debug build
from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s
llvm-svn: 19883
2005-01-29 00:29:39 +00:00
Chris Lattner
a7ce993d7f
Do not clean up if the MappedFile was never used or if the client already
...
closed the file. This unbreaks the build.
llvm-svn: 19871
2005-01-28 16:08:23 +00:00
Jeff Cohen
29092b4f26
Get VC++ compiling again
...
llvm-svn: 19869
2005-01-28 07:29:32 +00:00
Reid Spencer
dab05f06a4
Convert some old C-style casts to C++ style.
...
llvm-svn: 19868
2005-01-28 07:22:20 +00:00
Chris Lattner
d009d52fe5
Add some methods.
...
llvm-svn: 19817
2005-01-24 19:55:34 +00:00
Misha Brukman
b2961bf931
primitive' has no
a'
...
llvm-svn: 19808
2005-01-24 16:28:03 +00:00
Chris Lattner
b7a64c49f0
Do not return true from isSized for things without a size (like functions and
...
labels) even though they are concrete. This fixes the DSA regressions from
last night.
llvm-svn: 19807
2005-01-24 16:00:52 +00:00
Chris Lattner
766ad3378c
This giant patch speeds up Type::isSized(). Before, this would have to search
...
large nested types over and over again to determine if they are sized or not.
Now, isSized() is able to make snap decisions about all concrete types, which
are a common occurance (and includes all primitives).
On 177.mesa, this speeds up DSE from 39.5s -> 21.3s and GCSE from
13.2s -> 11.3s, reducing gccas time from 80s -> 61s (this is a debug build).
DSE and GCSE are still too slow on this testcase, but this is a simple
improvement.
llvm-svn: 19800
2005-01-24 02:08:34 +00:00
Chris Lattner
65c4c91477
Add an accessor.
...
llvm-svn: 19794
2005-01-23 22:57:27 +00:00
Chris Lattner
38249d15df
Expose more information from register allocation to passes that run after
...
it.
llvm-svn: 19788
2005-01-23 22:13:36 +00:00
Chris Lattner
519fcf19c2
Give SelectionDAG a TargetLowering instance instead of TM instance.
...
llvm-svn: 19778
2005-01-23 04:36:06 +00:00
Chris Lattner
18d4178fe6
Remove two dead methods and improve the comments for DiffFilesWithTolerance.
...
Also, make DiffFilesWithTolerance take sys::Path objects instead of std::strings.
llvm-svn: 19770
2005-01-23 03:30:39 +00:00
Chris Lattner
236f3c69b8
New method.
...
llvm-svn: 19765
2005-01-23 03:11:38 +00:00
Jeff Cohen
43692e25e9
Fix VC++ complaint
...
llvm-svn: 19747
2005-01-22 16:30:58 +00:00
Chris Lattner
9ee3bbc844
Keep track of node depth for each node
...
llvm-svn: 19732
2005-01-21 21:39:38 +00:00
Chris Lattner
bd8da4c80e
Apparently destroyFile() now throws an exception. Since this class is
...
designed to be put on the stack, that's not cool. Catch and ignore the
exception.
llvm-svn: 19723
2005-01-20 23:31:35 +00:00
Chris Lattner
8e17ad37f2
Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
...
llvm-svn: 19713
2005-01-20 18:50:39 +00:00
Chris Lattner
7005632b59
Add an accessor for targets that pass args in regs
...
llvm-svn: 19702
2005-01-19 20:19:58 +00:00
Chris Lattner
2a03fa3a5c
Add a new method, described in the comment.
...
llvm-svn: 19683
2005-01-19 06:53:02 +00:00
Jeff Cohen
a3414ac8c7
Add missing data types for VC++
...
llvm-svn: 19680
2005-01-19 05:08:31 +00:00
Chris Lattner
4938a7c8a1
Move all data members to the end of the class.
...
Add a hook to find out how the target handles shift amounts that are out of
range. Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
This defaults to undefined, which is conservatively correct.
llvm-svn: 19676
2005-01-19 03:36:03 +00:00
Chris Lattner
0697def39d
Keep track of the returned value type as well.
...
llvm-svn: 19669
2005-01-18 19:26:18 +00:00
Chris Lattner
818e819e43
Allow setcc operations to have non-bool types.
...
llvm-svn: 19655
2005-01-18 02:51:41 +00:00
Chris Lattner
e2fd07b43d
Make methods private, add a method.
...
llvm-svn: 19634
2005-01-17 17:14:43 +00:00
Chris Lattner
783a9d8893
Add methods
...
llvm-svn: 19627
2005-01-17 02:24:59 +00:00
Chris Lattner
8dd332e4e5
Add comments
...
Add fields to hold the result type of setcc operations and shift amounts.
llvm-svn: 19618
2005-01-16 23:59:30 +00:00
Chris Lattner
e38f72316d
Revamp supported ops. Instead of just being supported or not, we now keep
...
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.
llvm-svn: 19609
2005-01-16 07:27:49 +00:00
Reid Spencer
5d058e0ec8
Provide support for HP/UX aCC compiler's variant of hash_map and hash_set
...
(RogueWave). These are implemented in rw/stdex/hash_map.h and
rw/stdex/hash_set.h on HP/UX.
llvm-svn: 19600
2005-01-16 02:58:39 +00:00
Chris Lattner
605b9a23a2
Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
...
llvm-svn: 19586
2005-01-16 01:31:31 +00:00
Chris Lattner
dfb3741f64
Improve compatibility with aCC on HPUX. Patch by Duraid Madina
...
llvm-svn: 19585
2005-01-16 01:22:18 +00:00
Chris Lattner
1d0e1ffe02
Move some information out of LegalizeDAG into the generic Target interface.
...
llvm-svn: 19581
2005-01-16 01:10:58 +00:00
Chris Lattner
ee53940434
Add some helper methods.
...
llvm-svn: 19570
2005-01-15 06:52:18 +00:00
Chris Lattner
2f65e8798f
Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
...
llvm-svn: 19568
2005-01-15 06:17:04 +00:00
Chris Lattner
98611ce291
Add a new target-independent code generator flag.
...
llvm-svn: 19567
2005-01-15 06:00:32 +00:00
Chris Lattner
3df2651c81
Change CopyFromReg to take and produce a chain node, allowing it to be used
...
with physregs that are not live across the entire block.
llvm-svn: 19560
2005-01-14 22:37:20 +00:00
Chris Lattner
c73bf62770
Start adding some new operators, give IMPLICIT_DEF a chain operand.
...
llvm-svn: 19558
2005-01-14 22:07:46 +00:00
Chris Lattner
eff86ebbc3
Add a method
...
llvm-svn: 19540
2005-01-13 23:26:28 +00:00
Chris Lattner
c6f23adb2a
Add a method
...
llvm-svn: 19538
2005-01-13 22:58:50 +00:00
Chris Lattner
7a8788c9ac
Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
...
llvm-svn: 19535
2005-01-13 20:50:02 +00:00
Chris Lattner
000509e7b0
Add a new node type, add comments.
...
llvm-svn: 19525
2005-01-13 17:58:35 +00:00
Chris Lattner
92c07c0dba
New method.
...
llvm-svn: 19516
2005-01-12 18:37:33 +00:00
Chris Lattner
f01a5206ea
Update comments to indicate CopyFrom/ToReg take physregs as well as vregs.
...
llvm-svn: 19514
2005-01-12 18:11:36 +00:00
Reid Spencer
710115945a
Fix the documentation for executeAndWait so the argument comments are
...
actually attributed to the arguments by doxygen.
llvm-svn: 19473
2005-01-11 06:37:27 +00:00
Chris Lattner
1b9caa4504
Add MEMSET/MEMCPY/MEMMOVE operations. Fix a really bad bug in the vector
...
SDNode ctor.
llvm-svn: 19462
2005-01-11 05:56:17 +00:00
Chris Lattner
a942f987c0
Add support for bottom-up graphs.
...
llvm-svn: 19446
2005-01-11 00:24:59 +00:00
Chris Lattner
9ed0d66c8a
Add a helper method.
...
llvm-svn: 19442
2005-01-10 23:25:04 +00:00
Chris Lattner
a4f7c88eb6
Add support for graph operations, and add a viewGraph method to SelectionDAG.
...
llvm-svn: 19440
2005-01-10 23:05:53 +00:00
Chris Lattner
3db5a50eb5
Add a helper method
...
llvm-svn: 19439
2005-01-10 23:05:07 +00:00
Jeff Cohen
8b03a55724
Apply feedback from Chris.
...
llvm-svn: 19432
2005-01-10 04:23:32 +00:00
Jeff Cohen
a7f1ae5dc0
Apply feed back from Chris:
...
1. Rename createLoaderPass to CreateProfileLoaderPass
2. Opt shouldn't use the pass registered in CodeGen.
llvm-svn: 19431
2005-01-10 03:56:27 +00:00