Commit Graph

1231 Commits

Author SHA1 Message Date
Chris Lattner
f921a51891 Fix PR861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29796 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 20:24:53 +00:00
Chris Lattner
228a18e0f2 switch the SUnit pred/succ sets from being std::sets to being smallvectors.
This reduces selectiondag time on kc++ from 5.43s to 4.98s (9%).  More
significantly, this speeds up the default ppc scheduler from ~1571ms to 1063ms,
a 33% speedup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 00:09:56 +00:00
Chris Lattner
be384162c6 minor changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:57:46 +00:00
Chris Lattner
f83482dcad Use the appropriate typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29730 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 20:59:32 +00:00
Chris Lattner
0b3e525a3a Start using SDVTList more consistently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 19:11:05 +00:00
Chris Lattner
70046e920f add a new SDVTList type and new SelectionDAG::getVTList methods to streamline
the creation of canonical VTLists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 17:46:01 +00:00
Chris Lattner
f9f37fc52c eliminate use of getNode that takes vector of valuetypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:53:35 +00:00
Chris Lattner
2fa6d3b1fc Add a new getNode() method that takes a pointer to an already-intern'd list
of value-type nodes.  This avoids having to do mallocs for std::vectors of
valuetypes when a node returns more than one type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:31:51 +00:00
Chris Lattner
e51ee04c3d remove SelectionDAG::InsertISelMapEntry, it is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:24:39 +00:00
Chris Lattner
213a16c637 Add code to resize the CSEMap hash table. This doesn't speedup codegen of
kimwitu, but seems like a good idea from a "avoid performance cliffs" standpoint :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29675 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:19:25 +00:00
Chris Lattner
130fc13506 Add the actual constant to the hash for ConstantPool nodes. Thanks to
Rafael Espindola for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 20:12:44 +00:00
Chris Lattner
dd28900168 Switch to using SuperFastHash instead of adding all elements together. This
doesn't significantly improve performance but it helps a small amount.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-12 01:07:10 +00:00
Chris Lattner
7ed9ea81f8 Switch NodeID to track 32-bit chunks instead of 8-bit chunks, for a 2.5%
speedup in isel time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:55:53 +00:00
Chris Lattner
c9f8f41680 Remove 8 more std::map's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29631 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:55:30 +00:00
Chris Lattner
61b09412fe Move the BBNodes, GlobalValues, TargetGlobalValues, Constants, TargetConstants,
RegNodes, and ValueNodes maps into the CSEMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29626 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:01:22 +00:00
Chris Lattner
4a283e90af eliminate the NullaryOps map, use CSEMap instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 18:38:11 +00:00
Chris Lattner
3577e38c2b change internal impl of dag combiner so that calls to CombineTo never have to
make a temporary vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 17:56:38 +00:00
Chris Lattner
b9ea4a39b8 Change one ReplaceAllUsesWith method to take an array of operands to replace
instead of a vector of operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 17:46:28 +00:00
Chris Lattner
bd564bfc63 Start eliminating temporary vectors used to create DAG nodes. Instead, pass
in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.

I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.

We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.

It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29566 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 02:23:42 +00:00
Chris Lattner
f06f35e30b Eliminate some malloc traffic by allocating vectors on the stack. Change some
method that took std::vector<SDOperand> to take a pointer to a first operand
and #operands.

This speeds up isel on kc++ by about 3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29561 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 01:09:31 +00:00
Chris Lattner
a5682853b9 Revamp the "CSEMap" datastructure used in the SelectionDAG class. This
eliminates a bunch of std::map's in the SelectionDAG, replacing them with a
home-grown hashtable.

This is still a work in progress: not all the maps have been moved over and the
hashtable never resizes.  That said, this still speeds up llc 20% on kimwitu++
with -fast -regalloc=local using a release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29550 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:03:03 +00:00
Evan Cheng
99157a00a6 Clear TopOrder before assigning topological order. Some clean ups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29546 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 22:13:29 +00:00
Evan Cheng
3b97acdbdb Reverse the FlaggedNodes after scanning up for flagged preds or else the order would be reversed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 22:12:12 +00:00
Chris Lattner
190a418bf6 Make SelectionDAG::RemoveDeadNodes iterative instead of recursive, which
also make it simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29524 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 17:45:20 +00:00
Jim Laskey
f492391de0 Copy the liveins for the first block. PR859
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29511 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 20:51:06 +00:00
Chris Lattner
3700f90c19 Work around a GCC 3.3.5 bug noticed by a user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29490 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 00:18:59 +00:00
Evan Cheng
c384d6c398 - Change AssignTopologicalOrder to return vector of SDNode* by reference.
- Tweak implementation to avoid using std::map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 22:00:34 +00:00
Jim Laskey
eb577ba3b8 Final polish on machine pass registries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29471 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 12:30:23 +00:00
Jim Laskey
9373beba60 Now that the ISel is available, it's possible to create a default instruction
scheduler creator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 19:14:14 +00:00
Jim Laskey
9ff542f2cc 1. Change use of "Cache" to "Default".
2. Added argument to instruction scheduler creators so the creators can do
special things.
3. Repaired target hazard code.
4. Misc.

More to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29450 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:29:48 +00:00
Jim Laskey
13ec702c43 Introducing plugable register allocators and instruction schedulers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 14:21:23 +00:00
Evan Cheng
e6f35d8a5c Added AssignTopologicalOrder() to assign each node an unique id based on their topological order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29431 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 08:20:41 +00:00
Evan Cheng
8825a485e2 PIC jump table entries are always 32-bit even in 64-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29422 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 01:03:13 +00:00
Evan Cheng
2641cad180 Remove InFlightSet hack. No longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 00:47:19 +00:00
Nate Begeman
4d9bbdc440 Code cleanups, per review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29347 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 16:46:58 +00:00
Evan Cheng
7c16d776cb AssignNodeIds should return unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29343 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 07:36:47 +00:00
Evan Cheng
091cba1b91 AssignNodeIds assign each node in the DAG an unique id.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29337 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 06:39:06 +00:00
Nate Begeman
2f1ae88445 Support jump tables when in PIC relocation model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 01:13:04 +00:00
Chris Lattner
c9cf4f1a75 Fix a case where LegalizeAllNodesNotLeadingTo could take exponential time.
This manifested itself as really long time to compile
Regression/CodeGen/Generic/2003-05-28-ManyArgs.ll on ppc.
This is PR847.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 23:55:56 +00:00
Reid Spencer
7107c3badf For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 16:18:00 +00:00
Reid Spencer
9160a6a18f Initialize some variables the compiler warns about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-25 20:44:41 +00:00
Jim Laskey
60f09928a0 Use an enumeration to eliminate data relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 20:57:35 +00:00
Evan Cheng
917ec983df If a shuffle is a splat, check if the argument is a build_vector with all elements being the same. If so, return the argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29242 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 08:25:53 +00:00
Chris Lattner
02b04b4d34 Build more debugger/selectiondag libraries as archives instead of .o files.
This works around bugs in some versions of the cygwin linker.

Patch contributed by Anton Korobeynikov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29239 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 00:10:47 +00:00
Evan Cheng
e7bec0dbb5 If a shuffle is unary, i.e. one of the vector argument is not needed, turn the
operand into a undef and adjust mask accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29232 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 22:44:41 +00:00
Chris Lattner
a15cf7045e Mems can be in the output list also. This is the second half of a fix for
PR833


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29224 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 19:02:21 +00:00
Andrew Lenharth
ae6153f943 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29221 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 17:43:27 +00:00
Andrew Lenharth
ed41f1bb19 Reduce number of exported symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29220 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 17:28:38 +00:00
Chris Lattner
917d2c9dc2 Add an out-of-line virtual method for the sdnode class to give it a home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 00:00:37 +00:00
Jim Laskey
16d42c6ac6 It was pointed out that DEBUG() is only available with -debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 18:25:13 +00:00