Commit Graph

1904 Commits

Author SHA1 Message Date
Dale Johannesen
638ccd52b9 Next powerpc long double bits. Comparisons work,
although not well, and shortening FP converts.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42672 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-06 01:24:11 +00:00
Dale Johannesen
161e897b0f First round of ppc long double. call/return and
basic arithmetic works.
Rename RTLIB long double functions to distinguish
different flavors of long double; the lib functions
have different names, alas.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 20:04:43 +00:00
Dan Gohman
e14ea86744 Legalize support for MUL_LOHI and DIVREM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 14:17:22 +00:00
Dan Gohman
2eb4ebd953 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42635 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 14:11:58 +00:00
Dan Gohman
ccd60799cd Provide names for MUL_LOHI and DIVREM operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42634 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 14:11:04 +00:00
Evan Cheng
d5cb5a462b Chain producing nodes cannot be moved, not chain reading nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42627 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 01:42:35 +00:00
Evan Cheng
117c366219 Oops. Didn't mean to leave this in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42626 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 01:39:40 +00:00
Evan Cheng
f10c973797 If a node that defines a physical register that is expensive to copy. The
scheduler will try a number of tricks in order to avoid generating the
copies. This may not be possible in case the node produces a chain value
that prevent movement. Try unfolding the load from the node before to allow
it to be moved / cloned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42625 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 01:39:18 +00:00
Evan Cheng
39305cf553 Add a variant of getTargetNode() that takes a vector of MVT::ValueType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42620 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 01:10:49 +00:00
Evan Cheng
daccea18ca Silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42619 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 01:09:32 +00:00
Dan Gohman
cb406c2597 Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42585 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-03 19:26:29 +00:00
Dale Johannesen
9ab7fb3ba4 Rewrite sqrt and powi to use anyfloat. By popular demand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-02 17:43:59 +00:00
Dale Johannesen
a7ac2bd407 Fix stride computations for long double arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-01 23:08:35 +00:00
Evan Cheng
450ff01faf Remove simple scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-01 20:44:07 +00:00
Dale Johannesen
d89b117850 remove dup comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42486 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-30 19:08:12 +00:00
Dale Johannesen
88216af3ea Constant fold int-to-long-double conversions;
use APFloat for int-to-float/double; use
round-to-nearest for these (implementation-defined,
seems to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42484 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-30 18:19:03 +00:00
Dan Gohman
9fe4662d9a Teach SplitVectorOp how to split INSERT_VECTOR_ELT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 23:53:40 +00:00
Evan Cheng
22a529990b If two instructions are both two-address code, favors (schedule closer to
terminator) the one that has a CopyToReg use. This fixes
2006-05-11-InstrSched.ll with -new-cc-modeling-scheme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42453 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 22:32:30 +00:00
Evan Cheng
ddde335cb7 Remove a poor scheduling heuristic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 19:37:35 +00:00
Evan Cheng
74d2fd8dd8 Trim some unneeded fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42442 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 19:24:24 +00:00
Dale Johannesen
72292f0712 Fix long double -> uint64 conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42440 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 18:44:17 +00:00
Dale Johannesen
317096ab37 Add sqrt and powi intrinsics for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 01:08:20 +00:00
Evan Cheng
cd1c00cc65 Avoid inserting a live register more than once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 18:46:06 +00:00
Evan Cheng
64f638df56 Silence a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42389 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 07:35:39 +00:00
Evan Cheng
2dc7a0e075 Boogs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42388 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 07:29:27 +00:00
Evan Cheng
a2ee2756f7 Be smarter about which node to force schedule. Reduce # of duplications + copies; Added statistics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 07:09:03 +00:00
Evan Cheng
6e4c46cea5 Backtracking only when it won't create a cycle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42384 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 00:25:29 +00:00
Evan Cheng
42d60274ea - Move getPhysicalRegisterRegClass() from ScheduleDAG to MRegisterInfo.
- Added ability to emit cross class register copies to the BBRU scheduler.
- More aggressive backtracking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42375 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 21:36:17 +00:00
Dale Johannesen
2f42901dff Enable codegen for long double abs, sin, cos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42368 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 21:10:55 +00:00
Dale Johannesen
f41db2136f Fix f80 UNDEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 17:26:49 +00:00
Evan Cheng
9efce638d3 Allow copyRegToReg to emit cross register classes copies.
Tested with "make check"!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42346 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 06:25:56 +00:00
Dan Gohman
c3b0b5ca1d Move the setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand) and
the check to see if the assembler supports .loc from X86TargetLowering
into the superclass TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42297 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 15:10:49 +00:00
Evan Cheng
a6fb1b6743 Added major new capabilities to scheduler (only BURR for now) to support physical register dependency. The BURR scheduler can now backtrace and duplicate instructions in order to avoid "expensive / impossible to copy" values (e.g. status flag EFLAGS for x86) from being clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42284 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 01:54:36 +00:00
Dan Gohman
e40c7b0973 Use the correct result value type instead of using getValueType(0)
in ExpandEXTRACT_VECTOR_ELT and SplitVectorOp. This fixes an abort
in the included testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42264 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 15:54:53 +00:00
Chris Lattner
b690a005c1 initialize isstore/isload fields in ctor, fixing PR1695
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42222 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-22 07:02:12 +00:00
Dale Johannesen
910993e8dc Change APFloat::convertFromInteger to take the incoming
bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers.  Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 22:09:37 +00:00
Chris Lattner
dfe8934258 initialize SetCCResultContents, fixing PR1693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42193 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 17:06:39 +00:00
Dale Johannesen
73328d14ac More long double fixes. x86_64 should build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42155 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 23:55:34 +00:00
Dale Johannesen
f4d4832724 Fix longdouble -> uint conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42143 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 17:53:26 +00:00
Evan Cheng
713a98dee8 Use struct SDep instead of std::pair for SUnit pred and succ lists. First step
in tracking physical register output dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42125 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:38:40 +00:00
Evan Cheng
e0480d2ec2 Fix a bogus splat xform:
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 21:54:37 +00:00
Dale Johannesen
c7b21d520a Prevent crash on long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42103 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 18:36:59 +00:00
Devang Patel
8feb1f4467 Do not hide APInt::dump() inside #ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42068 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 22:24:00 +00:00
Devang Patel
ffe3612af4 This is not ideal but unbreaks build failure.
APInt::dump() is inside #ifndef NDEBUG, however SelectionDAG dump() routines are not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42047 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 20:03:03 +00:00
Dale Johannesen
118cd9dbba Adjust per revew comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42002 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16 16:51:49 +00:00
Dale Johannesen
9e3d3abd93 Remove the assumption that FP's are either float or
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 22:26:36 +00:00
Chris Lattner
3d6992fc7b Fix build problems on Cygwin (PR1652), patch by Patrick Walton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 06:09:48 +00:00
Evan Cheng
6600377546 Bug fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 00:06:00 +00:00
Evan Cheng
6900132813 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 23:45:46 +00:00
Evan Cheng
05e69c1f23 Yet another getTargetNode variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 23:39:49 +00:00