Neil Booth
49c6aab7b8
Use APInt::tcExtract. It's cleaner, and works :)
...
llvm-svn: 42746
2007-10-08 14:39:42 +00:00
Neil Booth
b618216e56
Add a new function tcExtract for extracting a bignum from an
...
arbitrary range of bits embedded in the middle of another bignum.
This kind of operation is desirable in many cases of software
floating point, e.g. converting bignum integers to floating point
numbers of fixed precision (you want to extract the precision most
significant bits).
Elsewhere, add an assertion, and exit the shift functions early if
the shift count is zero.
llvm-svn: 42745
2007-10-08 13:47:12 +00:00
Owen Anderson
74529b7d5f
Begin the process of allowing DomTree on MBB's. Step One: template DomTreeNode by making it a typedef of a templated DomTreeNodeBase.
...
llvm-svn: 42743
2007-10-08 07:44:39 +00:00
Evan Cheng
21a58a72c5
Kill cycle of an live range is always the last use index + 1.
...
llvm-svn: 42742
2007-10-08 06:59:30 +00:00
Gordon Henriksen
783f7bbabd
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
...
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.
llvm-svn: 42740
2007-10-08 03:45:09 +00:00
Chris Lattner
b20757d578
disable this entirely: it is causing use of invalidated iterators and infinite looping.
...
llvm-svn: 42739
2007-10-07 22:00:31 +00:00
Chris Lattner
8dd66ab3b2
Fix many regressions on x86 by avoiding dereferencing the end iterator.
...
llvm-svn: 42738
2007-10-07 21:53:12 +00:00
Gordon Henriksen
751ebf7b9a
C and Objective Caml bindings for GlobalVariable::isConstant.
...
llvm-svn: 42736
2007-10-07 17:31:42 +00:00
Neil Booth
03f58ab706
Add back convertFromSignExtendedInteger.
...
llvm-svn: 42735
2007-10-07 12:15:41 +00:00
Neil Booth
ba205229e7
Now that convertFromUnsignedParts has a sane, constant interface,
...
convertFromZeroExtendedInteger can be simplified as it doesn't need
to make a copy of the source bignum.
llvm-svn: 42734
2007-10-07 12:10:57 +00:00
Neil Booth
6c1c8588ae
Reimplement convertFromUnsignedInteger so it is passed a const bignum.
...
It used to modify its argument in-place.
This interface is saner and the implementation more efficient. It will
be needed for decimal->binary conversion.
llvm-svn: 42733
2007-10-07 12:07:53 +00:00
Neil Booth
5f00973393
convertFromInteger, as originally written, expected sign-extended
...
input. APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input. Make this
assumption explicit in the function name.
llvm-svn: 42732
2007-10-07 11:45:55 +00:00
Neil Booth
d3985924f4
combineLostFractions does not need to be a member function
...
llvm-svn: 42729
2007-10-07 08:51:21 +00:00
Gordon Henriksen
ffb4876cfb
C and Objective Caml bindings for PATypeHolder.
...
llvm-svn: 42713
2007-10-07 00:13:35 +00:00
Gordon Henriksen
c3d661a0ee
Bindings for the verifier.
...
llvm-svn: 42707
2007-10-06 21:00:36 +00:00
Anton Korobeynikov
67ac2de8bf
Oops, I really wanted to commit this part also :)
...
llvm-svn: 42700
2007-10-06 16:39:43 +00:00
Anton Korobeynikov
c59496f737
Move merge code into new helper function.
...
llvm-svn: 42699
2007-10-06 16:17:49 +00:00
Gordon Henriksen
ed7beaa3fa
Adopting a uniform naming convention for type constructors in bindings.
...
llvm-svn: 42698
2007-10-06 16:05:20 +00:00
Gordon Henriksen
1046c73d12
Adopting a uniform naming convention for constant constructors in bindings.
...
llvm-svn: 42697
2007-10-06 15:11:06 +00:00
Gordon Henriksen
7ce3176696
Adding C and Ocaml bindings for ConstantExpr.
...
llvm-svn: 42696
2007-10-06 14:29:36 +00:00
Evan Cheng
0de312dd7d
Reapply 42677.
...
llvm-svn: 42692
2007-10-06 08:19:55 +00:00
Neil Booth
32897f5eb0
Cleaner, more general exponent output.
...
llvm-svn: 42690
2007-10-06 07:29:25 +00:00
Chris Lattner
2a9bcb9ea7
silence warnings in no-assert build.
...
llvm-svn: 42687
2007-10-06 06:13:42 +00:00
Chris Lattner
82217bd155
revert evan's patch until the header is committed
...
llvm-svn: 42686
2007-10-06 06:08:17 +00:00
Evan Cheng
f4b5d491df
Added DAG xforms. e.g.
...
(vextract (v4f32 s2v (f32 load $addr)), 0) -> (f32 load $addr)
(vextract (v4i32 bc (v4f32 s2v (f32 load $addr))), 0) -> (i32 load $addr)
Remove x86 specific patterns.
llvm-svn: 42677
2007-10-06 02:46:29 +00:00
Dale Johannesen
f864ac96d8
Next powerpc long double bits. Comparisons work,
...
although not well, and shortening FP converts.
llvm-svn: 42672
2007-10-06 01:24:11 +00:00
Neil Booth
c8b650ab14
Fix and clarify some comments.
...
llvm-svn: 42670
2007-10-06 00:43:45 +00:00
Neil Booth
0ea72a9a91
Generalize tcFullMultiply so that the operands can be of differing
...
part widths. Also, return the number of parts actually required to
hold the result's value.
Remove an over-cautious condition from rounding of float->hex conversion.
llvm-svn: 42669
2007-10-06 00:24:48 +00:00
Gordon Henriksen
1d0d24c4fd
Wrapping Value::dump.
...
llvm-svn: 42668
2007-10-06 00:08:49 +00:00
Gordon Henriksen
7330acdec7
Removing the silly CHelpers header by rolling wrap and unwrap into the C
...
bindings headers themselves, hidden behind #ifdef __cplusplus.
llvm-svn: 42666
2007-10-05 23:59:36 +00:00
Evan Cheng
1151ffde70
Commute x86 cmove instructions by swapping the operands and change the condition
...
to its inverse.
Testing this as llcbeta
llvm-svn: 42661
2007-10-05 23:13:21 +00:00
Evan Cheng
42a13757de
This is done.
...
llvm-svn: 42656
2007-10-05 22:34:59 +00:00
Evan Cheng
484cab7a2f
Enable convertToThreeAddress for X86 by default.
...
llvm-svn: 42655
2007-10-05 22:31:10 +00:00
Devang Patel
a69f987b66
Fix bug in updating dominance frontier after loop
...
unswitch when frontier includes basic blocks that
are not inside loop.
llvm-svn: 42654
2007-10-05 22:29:34 +00:00
Evan Cheng
d3ccf00870
INC64_32r -> LEA64_32r is better than INC64_32r -> LEA32r, but it still can
...
cause performance degradation.
llvm-svn: 42653
2007-10-05 21:55:32 +00:00
Evan Cheng
fa2c828687
In 64-bit mode, avoid using leal with 32-bit 32-bit address size, e.g.
...
leal 1(%ecx), %edi, which requires 67H prefix.
llvm-svn: 42647
2007-10-05 20:34:26 +00:00
Dale Johannesen
c0154c06d6
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.
llvm-svn: 42644
2007-10-05 20:04:43 +00:00
Evan Cheng
aac0f8e351
Add support to convert more 64-bit instructions to 3-address instructions.
...
llvm-svn: 42642
2007-10-05 18:20:36 +00:00
Evan Cheng
97eba74a52
ADC and SBB uses EFLAGS.
...
llvm-svn: 42640
2007-10-05 17:59:57 +00:00
Dan Gohman
43c29dce18
Change a few more spaces to tabs in assembly output.
...
llvm-svn: 42638
2007-10-05 15:58:41 +00:00
Dan Gohman
b074f23dff
Change a space to a tab in the assembly output of a .globl directive
...
for consistency.
llvm-svn: 42637
2007-10-05 15:54:58 +00:00
Dan Gohman
12334acbfb
Legalize support for MUL_LOHI and DIVREM.
...
llvm-svn: 42636
2007-10-05 14:17:22 +00:00
Dan Gohman
2682bb6df2
Fix a typo in a comment.
...
llvm-svn: 42635
2007-10-05 14:11:58 +00:00
Dan Gohman
1a77dfba15
Provide names for MUL_LOHI and DIVREM operators.
...
llvm-svn: 42634
2007-10-05 14:11:04 +00:00
Evan Cheng
a8a9c15e30
Testing convertToThreeeAddress as X86 llcbeta.
...
llvm-svn: 42630
2007-10-05 08:04:01 +00:00
Evan Cheng
84d0ebc10a
Chain producing nodes cannot be moved, not chain reading nodes.
...
llvm-svn: 42627
2007-10-05 01:42:35 +00:00
Evan Cheng
991cf47221
Oops. Didn't mean to leave this in.
...
llvm-svn: 42626
2007-10-05 01:39:40 +00:00
Evan Cheng
79e9713b11
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.
llvm-svn: 42625
2007-10-05 01:39:18 +00:00
Evan Cheng
a851e2b92e
Added storeRegToAddr, loadRegFromAddr, and unfoldMemoryOperand's.
...
llvm-svn: 42624
2007-10-05 01:34:55 +00:00
Evan Cheng
6912b50958
Not needed any more.
...
llvm-svn: 42623
2007-10-05 01:34:14 +00:00