1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

5805 Commits

Author SHA1 Message Date
Chris Lattner
18867ab274 don't use intptr_t without including it.
llvm-svn: 42921
2007-10-12 18:16:23 +00:00
Chris Lattner
e80faf3036 Make this compute the correct offset, handling alignment of the element
pointer correctly.

llvm-svn: 42918
2007-10-12 17:49:52 +00:00
Neil Booth
078f455d15 Implement correctly-rounded decimal->binary conversion, i.e. conversion
from user input strings.

Such conversions are more intricate and subtle than they may appear;
it is unlikely I have got it completely right first time.  I would
appreciate being informed of any bugs and incorrect roundings you
might discover.

llvm-svn: 42912
2007-10-12 16:02:31 +00:00
Dan Gohman
a75e4a62e6 Change the names used for internal labels to use the current
function symbol name instead of a codegen-assigned function
number.

Thanks Evan! :-)

llvm-svn: 42908
2007-10-12 14:53:36 +00:00
Evan Cheng
d11cd4a095 EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.

llvm-svn: 42899
2007-10-12 08:50:34 +00:00
Evan Cheng
bfc8d5c279 Cosmetic.
llvm-svn: 42897
2007-10-12 08:40:44 +00:00
Chris Lattner
e47ae5fe94 make operator== work with non-equal sized bitvectors, as long as
the extra bits are all zeros.  This allows  "010" and "010000" to be
treated as equal.

llvm-svn: 42889
2007-10-12 03:48:59 +00:00
Dan Gohman
ab5c3ed0d1 Add intrinsics for sin, cos, and pow. These use llvm_anyfloat_ty, and so
may be overloaded with vector types. And add a testcase for codegen for
these.

llvm-svn: 42885
2007-10-12 00:01:22 +00:00
Dan Gohman
f8ab690988 Add runtime library names for pow.
llvm-svn: 42880
2007-10-11 23:09:10 +00:00
Dan Gohman
bc5fc4f519 Add an ISD::FPOW node type.
llvm-svn: 42879
2007-10-11 23:06:37 +00:00
Ted Kremenek
ee654dc6ef Provided accessors to internal allocator for ImutAVLTree and ImmutableSet.
Added postfix ++,-- support for ImmutableSet::iterator.

llvm-svn: 42877
2007-10-11 21:51:04 +00:00
Arnold Schwaighofer
d47210011e Added tail call optimization to the x86 back end. It can be
enabled by passing -tailcallopt to llc.  The optimization is
performed if the following conditions are satisfied:
* caller/callee are fastcc
* elf/pic is disabled OR
  elf/pic enabled + callee is in module + callee has
  visibility protected or hidden

llvm-svn: 42870
2007-10-11 19:40:01 +00:00
Dale Johannesen
0ee2a2fb59 Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet,
just format transformations.  Make readers and
writers work.  Split constants into 2 doubles in
Legalize.

llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Chris Lattner
0330d81fcf make bitvector &= do the right thing if vectors have mismatched length.
llvm-svn: 42860
2007-10-11 06:12:33 +00:00
Chris Lattner
ba2ff1f992 Add a new use_iterator::atEnd() method, which allows us to shrink
pred_iterator down to a single ivar.

llvm-svn: 42859
2007-10-11 04:18:11 +00:00
Ted Kremenek
6781a1791a Added iterators to ImmutableSet.
llvm-svn: 42851
2007-10-11 00:14:49 +00:00
Ted Kremenek
7ebd4a09c9 Added some doxygen comments to ImmutableSet.
llvm-svn: 42850
2007-10-10 23:47:03 +00:00
Ted Kremenek
4c37e29cf4 Removed uninformative assertions that catch problems that will
fire anyway at runtime due to a NULL dereference.

llvm-svn: 42848
2007-10-10 23:35:04 +00:00
Ted Kremenek
89e6ab12de Removed "height" of an AVL tree node from its Profile. This is
implicitly captured by using the addresses of its children in the
profile.

llvm-svn: 42847
2007-10-10 23:32:01 +00:00
Ted Kremenek
d0843e54f5 Removed spurious forward declaration to a structure that will no longer be used.
llvm-svn: 42839
2007-10-10 20:45:34 +00:00
Ted Kremenek
e5e9880bfc Added some doxygen comments to a few methods of ImutAVLTree.
llvm-svn: 42837
2007-10-10 20:44:21 +00:00
Ted Kremenek
9b6872e3d5 Added preliminary support for iterators in ImutAVLTree.
Implemented ImutAVLTree::isEqual.

llvm-svn: 42833
2007-10-10 18:11:16 +00:00
Ted Kremenek
7a878948f9 Renamed internal method "Create" of ImutAVLTree to "CreateNode".
llvm-svn: 42825
2007-10-10 16:27:33 +00:00
Bill Wendling
19a314f8ac Fix 80-column violations
llvm-svn: 42823
2007-10-10 05:45:59 +00:00
Dale Johannesen
76458ddf1e Next PPC long double bits: ppcf128->i32 conversion.
Surprisingly complicated.
Adds getTargetNode for 2 outputs, no inputs (missing).

llvm-svn: 42822
2007-10-10 01:01:31 +00:00
Chris Lattner
a65ec649fd Add new MemoryBuffer::getMemBufferCopy method.
llvm-svn: 42815
2007-10-09 21:46:38 +00:00
Devang Patel
779882dd87 Fix indentation.
llvm-svn: 42814
2007-10-09 21:41:00 +00:00
Ted Kremenek
a8e090bd1c Added implementation of immutable (functional) maps and sets, as
implemented on top of a functional AVL tree.  The AVL balancing code
is inspired by the OCaml implementation of Map, which also uses a functional
AVL tree.

Documentation is currently limited and cleanups are planned, but this code
compiles and has been tested.

llvm-svn: 42813
2007-10-09 21:38:09 +00:00
Devang Patel
6020d2e01d Add LLVMFoldingBuilder
llvm-svn: 42806
2007-10-09 19:49:19 +00:00
Dan Gohman
d174f83e57 Remove an unnecessary friend declaration.
llvm-svn: 42805
2007-10-09 18:39:48 +00:00
Chris Lattner
03d9efc98a update prototype, fixing build error
llvm-svn: 42789
2007-10-09 16:27:44 +00:00
Dan Gohman
2fb0a249d7 Pass argc by value, not by reference, since it isn't modified.
llvm-svn: 42788
2007-10-09 16:04:57 +00:00
Chris Lattner
8ee06ab2ab Fix problems where DenseMap used operator!= instead of correctly
calling the traits implementation of isEqual.

llvm-svn: 42782
2007-10-09 05:42:12 +00:00
Chris Lattner
19cb9fa4cc Change a #include into a forward declaration
llvm-svn: 42781
2007-10-09 03:40:30 +00:00
Dan Gohman
a2ec0a3c2c Mark the prefetch intrinsic as IntrWriteArgMem, instead of the
default of IntrWriteMem, to at least indicate that it doesn't
"capture" the argument pointer.

llvm-svn: 42768
2007-10-08 21:15:07 +00:00
Gordon Henriksen
84b068154b C and Objective Caml bindings for PHINode::addIncoming etc.
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Dan Gohman
9ee1c4eee7 Add convenience overloads of SelectionDAG::getNode that take a SDVTList
and individual SDOperand operands.

llvm-svn: 42753
2007-10-08 15:49:58 +00:00
Dan Gohman
8c31acb71e Fix grammar in a comment.
llvm-svn: 42748
2007-10-08 15:10:04 +00:00
Dan Gohman
7fa473514d Add explicit keywords.
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
Neil Booth
f003f9bf1a 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
ffcd82d1ed 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
Chris Lattner
48e389b33a Allow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t)&ID)"
llvm-svn: 42741
2007-10-08 03:45:44 +00:00
Gordon Henriksen
8d8fae73c5 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
ddd980044f Finish off PR1723, by working around some strange compiler bug.
llvm-svn: 42737
2007-10-07 17:57:10 +00:00
Gordon Henriksen
454d171c26 C and Objective Caml bindings for GlobalVariable::isConstant.
llvm-svn: 42736
2007-10-07 17:31:42 +00:00
Neil Booth
6f9602ac12 Add back convertFromSignExtendedInteger.
llvm-svn: 42735
2007-10-07 12:15:41 +00:00
Neil Booth
db4dbedfea 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
6e01c5df37 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
726126f4d6 combineLostFractions does not need to be a member function
llvm-svn: 42729
2007-10-07 08:51:21 +00:00
Daniel Berlin
afb1610cf3 Some more problems noticed by Curtis
llvm-svn: 42717
2007-10-07 04:47:57 +00:00