Chris Lattner
1b57f8bbdf
implement expand of truncate. This allows truncates from i128 to i64 to
...
be supported on 32-bit hosts.
llvm-svn: 34257
2007-02-13 23:55:16 +00:00
Chris Lattner
c305c08493
Fix PR1198, by adding initial i128 support. Patch by Dan Gohman.
...
llvm-svn: 34256
2007-02-13 23:41:38 +00:00
Chris Lattner
656f6a6fdd
revert my previous switch lowering change, which miscompiles a few programs.
...
This will break a dj test until I have time to investigate.
llvm-svn: 34247
2007-02-13 20:09:07 +00:00
Lauro Ramos Venancio
7465000f94
Add a space between // and the comment.
...
llvm-svn: 34244
2007-02-13 18:10:13 +00:00
Lauro Ramos Venancio
4aecadf112
Add "original alignment" to function arguments flags.
...
llvm-svn: 34240
2007-02-13 13:50:08 +00:00
Chris Lattner
8038c3c99e
eliminate vector-related allocations
...
llvm-svn: 34223
2007-02-13 06:01:22 +00:00
Evan Cheng
21a7c64466
Allow any MachineBasicBlock (not just the entry block) to have live-in physical
...
registers. Make sure liveinterval analysis is correctly creating live ranges
for them.
llvm-svn: 34217
2007-02-13 01:30:55 +00:00
Chris Lattner
9ea0b706d9
Fix switch lowering to order cases in zext order, which is how we emit the
...
comparisons. This fixes an infinite loop on CodeGen/Generic/switch-lower.ll
and PR1197
llvm-svn: 34216
2007-02-13 01:05:56 +00:00
Chris Lattner
7223d491cb
eliminate temporary vectors.
...
llvm-svn: 34161
2007-02-10 20:31:59 +00:00
Chris Lattner
109373538b
encapsulate the rest of the StructLayout members.
...
llvm-svn: 34157
2007-02-10 19:59:22 +00:00
Chris Lattner
9dafd9fe90
Privatize StructLayout::MemberOffsets, adding an accessor
...
llvm-svn: 34156
2007-02-10 19:55:17 +00:00
Evan Cheng
a86214b294
Add function live-ins to entry block live-in set.
...
llvm-svn: 34112
2007-02-10 02:43:39 +00:00
Evan Cheng
6dc088ffd4
Add live-ins to MachineBasicBlock.
...
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Evan Cheng
14f837357e
Rename some variables to avoid confusion with SelectionDAGISel::BB.
...
llvm-svn: 34110
2007-02-10 01:08:18 +00:00
Evan Cheng
14f4a6715d
Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().
...
llvm-svn: 34066
2007-02-08 22:16:19 +00:00
Evan Cheng
1b155ac243
Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
...
llvm-svn: 34065
2007-02-08 22:13:59 +00:00
Evan Cheng
96b886b846
Fixed a long standing spiller bug that's exposed by Thumb:
...
The code sequence before the spiller is something like:
= tMOVrr
%reg1117 = tMOVrr
%reg1078 = tLSLri %reg1117, 2
The it starts spilling:
%r0 = tRestore <fi#5>, 0
%r1 = tRestore <fi#7>, 0
%r1 = tMOVrr %r1<kill>
tSpill %r1, <fi#5>, 0
%reg1078 = tLSLri %reg1117, 2
It restores the value while processing the first tMOVrr. At this point, the
spiller remembers fi#5 is available in %r0. Next it processes the second move.
It restores the source before the move and spills the result afterwards. The
move becomes a noop and is deleted. However, a spill has been inserted and that
should invalidate reuse of %r0 for fi#5 and add reuse of %r1 for fi#5.
Therefore, %reg1117 (which is also assigned fi#5) should get %r1, not %r0.
llvm-svn: 34039
2007-02-08 06:04:54 +00:00
Bill Wendling
ccf772cc6b
Split the addPassesToEmitFile method up into two. This is so that we can
...
do some common stuff, then on our own add an object file writer (by calling
a concrete function), and then do some finishing stuff, if need be.
llvm-svn: 34032
2007-02-08 01:36:53 +00:00
Bill Wendling
55a2facbf9
Add function to create a file writer.
...
llvm-svn: 34031
2007-02-08 01:35:27 +00:00
Bill Wendling
48653bfaa4
Moved from include/llvm/CodeGen to lib/CodeGen.
...
llvm-svn: 34027
2007-02-08 01:30:50 +00:00
Nate Begeman
fe7a46c1e1
Fix a fixme by correctly calculating preferred alignments for functions,
...
based on the alignment of the symbol and the target data's preferred align
for that type.
Also, rename some arguments for consistency.
llvm-svn: 33984
2007-02-07 05:47:16 +00:00
Chris Lattner
c0fcd78ca0
Two fixes:
...
1. Memset takes an i32 for the value to set, not i8. This was causing GCC to
ICE all over the place (PR1183).
2. memcpy/memmove were not properly zext/trunc'ing the size in some cases.
llvm-svn: 33970
2007-02-06 19:06:38 +00:00
Chris Lattner
fc117b2338
Fix PR1181 and CodeGen/CBackend/2007-02-05-memset.ll
...
llvm-svn: 33957
2007-02-06 06:07:51 +00:00
Chris Lattner
775422640b
Oops, swap this. This fixes a regression I introduced in the ARM backend.
...
llvm-svn: 33946
2007-02-06 01:56:31 +00:00
Chris Lattner
b9788ffe38
Fix PR1178
...
llvm-svn: 33924
2007-02-05 21:23:52 +00:00
Anton Korobeynikov
a4e7de7c93
Fixing silly "not-implemented" bug in AsmPrinter. This fixes PR1169.
...
llvm-svn: 33888
2007-02-04 23:27:42 +00:00
Chris Lattner
15fb4ef992
switch the VRBaseMap in the scheduler from an std::map to a DenseMap. This
...
speeds up the isel pass from 2.5570s to 2.4722s on kc++ (3.4%).
llvm-svn: 33879
2007-02-04 08:47:20 +00:00
Chris Lattner
59d7c680b5
Introduce new UnarySDNode/BinarySDNode/TernarySDNode nodes, which coallocate
...
their operands with the node itself. This reduces malloc traffic for operand
lists. This reduces isel time on kc++ from 2.6164 to 2.5570s, about 2.3%.
llvm-svn: 33878
2007-02-04 08:35:21 +00:00
Chris Lattner
dcdf1edd93
eliminate the SDNode::setValueTypes method.
...
llvm-svn: 33876
2007-02-04 07:37:24 +00:00
Chris Lattner
2b6734a983
eliminate a bunch of duplicate ctors and helper functions.
...
llvm-svn: 33875
2007-02-04 07:28:00 +00:00
Chris Lattner
8bbd45cd6e
move MorphNode to out of line and merge setNodeOperands into it. There is
...
no behavior or performance change here.
llvm-svn: 33869
2007-02-04 02:49:29 +00:00
Chris Lattner
ccd1f36346
simplify MorphNodeTo to take a VTList operand.
...
llvm-svn: 33868
2007-02-04 02:41:42 +00:00
Chris Lattner
7e8b8e7a68
eliminate some extraneous methods in SDNode
...
llvm-svn: 33867
2007-02-04 02:32:44 +00:00
Chris Lattner
f3b4a0cc95
Give each selectiondag node class a home for it's vtable and rtti info
...
llvm-svn: 33866
2007-02-04 02:23:32 +00:00
Chris Lattner
1d3dd991ca
Switch VAlueMap from std::map to DenseMap.
...
llvm-svn: 33863
2007-02-04 01:35:11 +00:00
Chris Lattner
e5eccb6d76
Switch NodeMap from std::map to DenseMap, this speeds up isel by 2.3%
...
llvm-svn: 33862
2007-02-04 01:31:47 +00:00
Chris Lattner
4ca925808f
swtich vector-> smallvector, speeding up selectiondag stuff 1%
...
llvm-svn: 33861
2007-02-04 01:20:02 +00:00
Chris Lattner
135ccecbfb
Switch promoted/expanded ops over to using a DenseMap. Vector related maps
...
aren't worth it.
llvm-svn: 33860
2007-02-04 01:17:38 +00:00
Chris Lattner
703db6bfd8
switch LegalizedNodes from std::map to a DenseMap. This speeds up isel
...
time as a whole on kc++ by 11%.
llvm-svn: 33857
2007-02-04 00:50:02 +00:00
Chris Lattner
3ff6e94719
Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding
...
up isel on kimwitu by 0.7%.
llvm-svn: 33853
2007-02-04 00:27:56 +00:00
Chris Lattner
6af2a892de
Eliminate some std::sets. This speeds up isel of kimwitu by about 0.9%
...
llvm-svn: 33852
2007-02-04 00:24:41 +00:00
Chris Lattner
ff53aecb1a
Switch SelectionDAG::ReplaceAllUsesOfValueWith to use a SmallSetVector for
...
the users set (most nodes have 1 or 2 users). This speeds up the isel pass
3.2% on kimwitu.
llvm-svn: 33849
2007-02-04 00:14:31 +00:00
Bill Wendling
2a34ef4219
Pass in non-Mach-O-specific parameters to the GetTargetRelocation method.
...
llvm-svn: 33816
2007-02-03 02:39:40 +00:00
Chris Lattner
b35593a1c5
switch the sched unit map over to use a DenseMap instead of std::map. This
...
speeds up isel as a whole time by 2.6%.
llvm-svn: 33810
2007-02-03 01:34:13 +00:00
Chris Lattner
f1b9b2068c
Switch ComputeTopDownOrdering over to using a densemap. This speeds up
...
isel as a whole by 3.3%.
llvm-svn: 33809
2007-02-03 01:12:36 +00:00
Evan Cheng
99236f5cfe
Pasto
...
llvm-svn: 33806
2007-02-03 00:43:46 +00:00
Reid Spencer
05c293d1f0
Use short form of BinaryOperator create function.
...
llvm-svn: 33784
2007-02-02 14:09:34 +00:00
Reid Spencer
591bfa1e0b
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Jim Laskey
56f947d112
Slip up
...
llvm-svn: 33758
2007-02-01 17:48:20 +00:00
Jim Laskey
13d6220cbb
Emit labels as label_n and not as debug_n
...
llvm-svn: 33757
2007-02-01 17:46:10 +00:00