Chris Lattner
7b1362fa52
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.
llvm-svn: 29566
2006-08-08 02:23:42 +00:00
Chris Lattner
be2fc7b875
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%.
llvm-svn: 29561
2006-08-08 01:09:31 +00:00
Chris Lattner
1661ffa2eb
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.
llvm-svn: 29550
2006-08-07 23:03:03 +00:00
Evan Cheng
d64d5529b0
Clear TopOrder before assigning topological order. Some clean ups.
...
llvm-svn: 29546
2006-08-07 22:13:29 +00:00
Evan Cheng
0853250689
Reverse the FlaggedNodes after scanning up for flagged preds or else the order would be reversed.
...
llvm-svn: 29545
2006-08-07 22:12:12 +00:00
Chris Lattner
154ffd3c8f
Make SelectionDAG::RemoveDeadNodes iterative instead of recursive, which
...
also make it simpler.
llvm-svn: 29524
2006-08-04 17:45:20 +00:00
Jim Laskey
de4cc067a9
Copy the liveins for the first block. PR859
...
llvm-svn: 29511
2006-08-03 20:51:06 +00:00
Chris Lattner
8cc175963d
Work around a GCC 3.3.5 bug noticed by a user.
...
llvm-svn: 29490
2006-08-03 00:18:59 +00:00
Chris Lattner
992020cd59
Work around a bug in gcc 3.3.5, reported by a user
...
llvm-svn: 29489
2006-08-03 00:16:56 +00:00
Evan Cheng
92b45ad949
- Change AssignTopologicalOrder to return vector of SDNode* by reference.
...
- Tweak implementation to avoid using std::map.
llvm-svn: 29479
2006-08-02 22:00:34 +00:00
Jim Laskey
6d121090d3
Final polish on machine pass registries.
...
llvm-svn: 29471
2006-08-02 12:30:23 +00:00
Jim Laskey
f9f462bc5e
Now that the ISel is available, it's possible to create a default instruction
...
scheduler creator.
llvm-svn: 29452
2006-08-01 19:14:14 +00:00
Jim Laskey
f5e160063e
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.
llvm-svn: 29450
2006-08-01 18:29:48 +00:00
Jim Laskey
29880272a9
Forgot the added files for plugable machine passes.
...
llvm-svn: 29436
2006-08-01 16:31:08 +00:00
Jim Laskey
b92b14f422
Introducing plugable register allocators and instruction schedulers.
...
llvm-svn: 29434
2006-08-01 14:21:23 +00:00
Evan Cheng
e4fdb294ae
Added AssignTopologicalOrder() to assign each node an unique id based on their topological order.
...
llvm-svn: 29431
2006-08-01 08:20:41 +00:00
Evan Cheng
c1483b5e72
PIC jump table entries are always 32-bit even in 64-bit mode.
...
llvm-svn: 29422
2006-08-01 01:03:13 +00:00
Chris Lattner
557d3cacbe
Instead of blindly looking past constantexpr casts, actually constant
...
fold them. This correctly truncates constants that are too large for the
destination slot and makes the code easier to understand. This fixes PR853
and Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll
llvm-svn: 29408
2006-07-29 01:57:19 +00:00
Evan Cheng
3b5f1c6248
Remove InFlightSet hack. No longer needed.
...
llvm-svn: 29373
2006-07-28 00:47:19 +00:00
Chris Lattner
1e3a35a824
Print empty inline asms as a blank line instead of:
...
# InlineAsm Start
# InlineAsm End
llvm-svn: 29372
2006-07-28 00:17:20 +00:00
Jim Laskey
f77eeceeba
Working toward registration of register allocators.
...
llvm-svn: 29360
2006-07-27 20:05:00 +00:00
Nate Begeman
952d922bf1
Code cleanups, per review
...
llvm-svn: 29347
2006-07-27 16:46:58 +00:00
Evan Cheng
bdb2562804
AssignNodeIds should return unsigned.
...
llvm-svn: 29343
2006-07-27 07:36:47 +00:00
Evan Cheng
5783fd4aab
AssignNodeIds assign each node in the DAG an unique id.
...
llvm-svn: 29337
2006-07-27 06:39:06 +00:00
Chris Lattner
92a0b69813
Add some advice
...
llvm-svn: 29324
2006-07-27 04:24:14 +00:00
Nate Begeman
3d5f5b4e8b
Support jump tables when in PIC relocation model
...
llvm-svn: 29318
2006-07-27 01:13:04 +00:00
Chris Lattner
cbd19c14f1
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.
llvm-svn: 29313
2006-07-26 23:55:56 +00:00
Reid Spencer
10b9edbb69
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
llvm-svn: 29287
2006-07-26 16:18:00 +00:00
Reid Spencer
fb0feb79f0
Initialize some variables the compiler warns about.
...
llvm-svn: 29277
2006-07-25 20:44:41 +00:00
Jim Laskey
085a8477a7
Eliminate data relocations by using NULL instead of global empty list.
...
llvm-svn: 29250
2006-07-21 21:15:20 +00:00
Jim Laskey
a67adda697
Use an enumeration to eliminate data relocations.
...
llvm-svn: 29249
2006-07-21 20:57:35 +00:00
Evan Cheng
3b2a8d2749
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.
...
llvm-svn: 29242
2006-07-21 08:25:53 +00:00
Chris Lattner
109640a240
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.
llvm-svn: 29239
2006-07-21 00:10:47 +00:00
Evan Cheng
fe4cf8c64a
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.
llvm-svn: 29232
2006-07-20 22:44:41 +00:00
Chris Lattner
77e6cda5d0
Mems can be in the output list also. This is the second half of a fix for
...
PR833
llvm-svn: 29224
2006-07-20 19:02:21 +00:00
Andrew Lenharth
bf871a2ad5
80 cols
...
llvm-svn: 29221
2006-07-20 17:43:27 +00:00
Andrew Lenharth
c1074954fb
Reduce number of exported symbols
...
llvm-svn: 29220
2006-07-20 17:28:38 +00:00
Andrew Lenharth
0311b39af2
Fix linking on Alpha
...
llvm-svn: 29219
2006-07-20 17:27:58 +00:00
Chris Lattner
2d0f9f0d59
Move MVT::getVectorType out of line, it is large and shouldn't be inlined.
...
llvm-svn: 29195
2006-07-19 00:40:45 +00:00
Chris Lattner
3415e20ae6
Add an out-of-line virtual method for the sdnode class to give it a home.
...
llvm-svn: 29192
2006-07-19 00:00:37 +00:00
Chris Lattner
65c5f1b9e0
On 64-bit targets like ppc64, we should use .quad to output pointer directives,
...
not .long.
llvm-svn: 29157
2006-07-15 01:34:12 +00:00
Chris Lattner
ac585b37b1
Add an out-of-line virtual function to home class.
...
llvm-svn: 29154
2006-07-14 23:08:47 +00:00
Jim Laskey
4d97a53442
Fixed a bug handling void function types.
...
Requires rebuild of llvm-gcc4 (touch llvm-debug.cpp.)
llvm-svn: 29131
2006-07-13 15:27:42 +00:00
Jim Laskey
d19ba2cf6c
It was pointed out that DEBUG() is only available with -debug.
...
llvm-svn: 29106
2006-07-11 18:25:13 +00:00
Jim Laskey
4c0d841280
Ensure that dump calls that are associated with asserts are removed from
...
non-debug build.
llvm-svn: 29105
2006-07-11 17:58:07 +00:00
Jim Laskey
6fe083c694
1. Support for c++ mangled names.
...
2. Support for private/protected class members.
llvm-svn: 29104
2006-07-11 15:58:09 +00:00
Chris Lattner
1f9dfd6157
Fix CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll and PR818.
...
llvm-svn: 29099
2006-07-11 01:40:09 +00:00
Evan Cheng
90a25bcd6f
Ugly hack! Add helper functions InsertInFlightSetEntry and
...
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.
llvm-svn: 28987
2006-06-29 23:57:05 +00:00
Evan Cheng
6ec6e10b48
Add support to print 4-, 8-, and 16- byte constant literals in special
...
sections. e.g. On Darwin that would be .literal4 and .literal8.
llvm-svn: 28977
2006-06-29 00:26:09 +00:00
Chris Lattner
496bd3fbf6
Use hidden visibility to make symbols in an anonymous namespace get
...
dropped. This shrinks libllvmgcc.dylib another 67K
llvm-svn: 28975
2006-06-28 23:17:24 +00:00