Duncan Sands
eb04d356e3
Remove an apparently useless routine: there should
...
be no need to split the result of a vector RET node,
since they are always already legal.
llvm-svn: 53462
2008-07-11 17:02:09 +00:00
Duncan Sands
1e3fe05638
It is pointless to turn a UINT_TO_FP into an
...
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.
llvm-svn: 53461
2008-07-11 17:00:14 +00:00
Duncan Sands
58130a26f4
Add two missing SINT_TO_FP libcalls.
...
llvm-svn: 53460
2008-07-11 16:57:02 +00:00
Duncan Sands
52f1dbf139
Port a shift-by-1 optimization from LegalizeDAG: it
...
was presumably added after the rest of the code was
copied to LegalizeTypes.
llvm-svn: 53459
2008-07-11 16:54:57 +00:00
Duncan Sands
669d4d6909
Add support for 128 bit shifts and 32 bit shifts
...
on 16 bit machines.
llvm-svn: 53458
2008-07-11 16:52:29 +00:00
Nick Lewycky
cafc3d583d
Document 'mask' in this calculation.
...
llvm-svn: 53454
2008-07-11 08:16:26 +00:00
Duncan Sands
94f659d6cb
Align comments, colons and cases. Remove trailing
...
whitespace.
llvm-svn: 53453
2008-07-11 07:37:30 +00:00
Nick Lewycky
12c88a28f5
Remove misleading constant from comment.
...
llvm-svn: 53452
2008-07-11 07:36:19 +00:00
Nick Lewycky
8cd0f2058e
Add another optimization from PR2330. Also catch some missing cases that are
...
similar.
llvm-svn: 53451
2008-07-11 07:20:53 +00:00
Bill Wendling
9f17caa9a9
The frame address on an x86-64 box needs to be offset by -8, not -4.
...
llvm-svn: 53450
2008-07-11 07:18:52 +00:00
Chris Lattner
07bfade2d4
a missed optimization that Eli spotted
...
llvm-svn: 53449
2008-07-11 06:40:29 +00:00
Chris Lattner
34b0895d4d
another bug in the same line.
...
llvm-svn: 53448
2008-07-11 06:38:16 +00:00
Chris Lattner
3cdb6789b9
fix a bug spotted by Eli's eagle eyes
...
llvm-svn: 53447
2008-07-11 06:36:01 +00:00
Chris Lattner
3d40848bfd
simplify and merge a bunch of code. Instead of comparing against
...
the min/max values for an integer type, compare against the min/max
values we can prove contain the input. This might be a tighter bound,
so this is general goodness.
llvm-svn: 53446
2008-07-11 05:40:05 +00:00
Chris Lattner
d1198896ae
fold away (x <= cst) earlier, allowing us to not have to
...
handle them in some code.
llvm-svn: 53445
2008-07-11 05:08:55 +00:00
Chris Lattner
16b8ae98c1
Fix folding of icmp's of i1 where the comparison is signed. The code
...
was using the algorithm for folding unsigned comparisons which is
completely wrong. This has been broken since the signless types change.
llvm-svn: 53444
2008-07-11 04:20:58 +00:00
Chris Lattner
f3f6b6d7af
Fix a bogus optimization: folding (slt (zext i1 A to i32), 1) -> (slt i1 A, true)
...
This cause a regression in InstCombine/JavaCompare, which was doing the right
thing on accident. To handle the missed case, generalize the comparisons based
on masked bits a little bit to handle comparisons against the max value. For
example, we can now xform (slt i32 (and X, 4), 4) -> (setne i32 (and X, 4), 4)
llvm-svn: 53443
2008-07-11 04:09:09 +00:00
Chris Lattner
43a2b1b16d
make this condition more precise.
...
llvm-svn: 53442
2008-07-11 03:54:57 +00:00
Chris Lattner
20b1bde882
regenerate
...
llvm-svn: 53440
2008-07-11 00:30:39 +00:00
Chris Lattner
9dff6fbe58
Implement PR2538
...
llvm-svn: 53438
2008-07-11 00:30:06 +00:00
Chris Lattner
78d60a220b
Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed
...
when working on legalizetypes. Both legalizetypes and legalizeops now
produce hte same code for CodeGen/ARM/fcopysign.ll.
llvm-svn: 53435
2008-07-10 23:46:13 +00:00
Chris Lattner
5e784a8ebd
make legalize types be a command line option: -enable-legalize-types.
...
llvm-svn: 53434
2008-07-10 23:37:50 +00:00
Ted Kremenek
4e5efc791c
Make typedef public to make MSVC++ happy.
...
llvm-svn: 53433
2008-07-10 23:24:20 +00:00
Ted Kremenek
d2eef72ae9
Make some typedefs public to make MSVC++ happy.
...
llvm-svn: 53432
2008-07-10 23:09:45 +00:00
Ted Kremenek
9bd15119cd
Make typedefs in ilist public (Visual C++ errors out when they are private).
...
llvm-svn: 53431
2008-07-10 22:58:10 +00:00
Bill Wendling
7e2acf0dc9
Pull r53428 from Gaz into mainline:
...
Remove warnings about unused/shadowed variables.
llvm-svn: 53430
2008-07-10 22:57:49 +00:00
Ted Kremenek
91171c5406
Added ImmutableMap constructor that accepts a const TreeTy*.
...
llvm-svn: 53429
2008-07-10 22:57:10 +00:00
Bill Wendling
3be8dca83f
Put CPPBackend tests into their own directory and run them only if they're
...
supported.
llvm-svn: 53427
2008-07-10 22:35:32 +00:00
Dan Gohman
c3f346dc55
Tidy up #includes.
...
llvm-svn: 53426
2008-07-10 22:26:19 +00:00
Dan Gohman
83d9009473
Add a SubclassData field to SDNode, similar to what's done
...
in Value, to make use of some otherwise unused space. Use this
field to shrink LoadSDNode and StoreSDNode by moving the
addressing mode and ext/trunc fields there.
llvm-svn: 53422
2008-07-10 21:44:59 +00:00
Dan Gohman
157e75d975
Fix a copy+pasto in an assertion string.
...
llvm-svn: 53419
2008-07-10 19:58:23 +00:00
Dan Gohman
b379840cf7
Stack objects have nonnegative indices, not just positive indices.
...
llvm-svn: 53418
2008-07-10 19:57:25 +00:00
Dan Gohman
bb0847c84c
Escape the graph name. This unbreaks -view-cfg.
...
llvm-svn: 53417
2008-07-10 19:55:54 +00:00
Dan Gohman
2b9dccb286
Remove this file; the code that it went with is no longer
...
in the repository.
llvm-svn: 53416
2008-07-10 19:55:04 +00:00
Dan Gohman
1f42b96c7e
Make stack slot coloring's debug output more consistent with
...
other passes.
llvm-svn: 53415
2008-07-10 19:49:32 +00:00
Evan Cheng
d7023b66ea
Change StackSlotForVirtReg (which maps vregs to frame indices) from std::map to IndexedMap.
...
llvm-svn: 53414
2008-07-10 18:23:23 +00:00
Chris Lattner
b5d45a49ea
Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)
...
llvm-svn: 53411
2008-07-10 16:49:53 +00:00
Chris Lattner
5f3c587276
Fix an altivec constant miscompilation that Duncan found through
...
his work on legalizetypes.
llvm-svn: 53410
2008-07-10 16:33:38 +00:00
Duncan Sands
a6c09579f0
Add support for 128 bit multiplicative operations.
...
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.
llvm-svn: 53408
2008-07-10 15:35:05 +00:00
Duncan Sands
90a916539d
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
...
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.
llvm-svn: 53407
2008-07-10 15:33:02 +00:00
Duncan Sands
91912e046a
Fix a FIXME: use an apint in CTTZ legalization.
...
llvm-svn: 53406
2008-07-10 15:30:54 +00:00
Duncan Sands
f2734eabf2
Remove PromoteIntRes_FP_ROUND - not sure what it
...
was doing there: FP_ROUND returns a float, not an
integer.
llvm-svn: 53405
2008-07-10 15:29:55 +00:00
Duncan Sands
16f5ab06b0
Make sure the alignment of the temporary created
...
in CreateStackStoreLoad is good enough for both
the source and destination types.
llvm-svn: 53404
2008-07-10 15:26:17 +00:00
Duncan Sands
a219bb03e1
Make the LegalizeType method naming scheme more regular.
...
llvm-svn: 53403
2008-07-10 15:25:04 +00:00
Duncan Sands
8afe39dc56
Don't barf when dumping a constant that contains
...
a ginormous value (eg: i128 -1).
llvm-svn: 53402
2008-07-10 11:23:14 +00:00
Duncan Sands
e667a05fcb
Correct a comment.
...
llvm-svn: 53401
2008-07-10 11:21:59 +00:00
Matthijs Kooijman
ca5124a630
Restructure dead argument elimination, try #3 :-)
...
Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of
dependencies between return values and/or arguments. Also make the handling of
arguments and return values the same.
The pass now looks properly inside returned structs, but only at the first
level (ie, not inside nested structs).
This version fixed a few more bugs and was cleaned up a bit. It now passes all
of LLVM's testing, and should still pass SPEC2006. There is still a minor bug
with regard to returning nested structs. Since there is currently nothing that
emits such IR, I will fix that in a seperate commit (partly because it requires
a non-trivial fix).
llvm-svn: 53400
2008-07-10 10:24:08 +00:00
Evan Cheng
3ec3113431
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
...
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
llvm-svn: 53394
2008-07-10 07:35:43 +00:00
Nick Lewycky
26ccb8e9a8
Fix overzealous optimization. Thanks to Duncan Sands for pointing out my error!
...
llvm-svn: 53393
2008-07-10 05:51:40 +00:00
Owen Anderson
65e43ae1e8
Use DenseMap instead of std::map in local register allocation. This improves the time on instcombine from .31s to .22s
...
llvm-svn: 53390
2008-07-10 01:56:35 +00:00