Commit Graph

36884 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes 5cef9cfd09 Position Independent Code (PIC) support [1]
- Modified instruction format to handle pseudo instructions
- Added LoadAddr SDNode to load symbols.

llvm-svn: 42778
2007-10-09 02:55:31 +00:00
Steve Naroff 8e748cb4e9 Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recognized as types).
llvm-svn: 42777
2007-10-08 23:10:47 +00:00
Fariborz Jahanian da6c012ee7 Added a new class for Interfaces qualified by protocol list.
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).

llvm-svn: 42776
2007-10-08 23:06:41 +00:00
Evan Cheng 3b3e6097a3 Update test.
llvm-svn: 42775
2007-10-08 22:20:32 +00:00
Evan Cheng f5ec10b64c Bug fix. X86 was emitting redundant setcc and test instructions before a conditional move.
llvm-svn: 42774
2007-10-08 22:16:29 +00:00
Steve Naroff b163154c2d Removed unused instance variable from FieldDecl.
llvm-svn: 42773
2007-10-08 21:56:47 +00:00
Chris Lattner ba9dddb01e Rename FileVariable -> FileVar for consistency with its class name,
likewise block and param.  Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering.  This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.

llvm-svn: 42772
2007-10-08 21:37:32 +00:00
Chris Lattner 15b7278931 add a comment.
llvm-svn: 42771
2007-10-08 21:36:22 +00:00
Chris Lattner 6776a8d359 Move identifierTable.h to the right folder.
llvm-svn: 42770
2007-10-08 21:35:59 +00:00
Dan Gohman 5942e5a5fb Call getFunctionNumber() instead of referencing FunctionNumber directly,
for consistency.

llvm-svn: 42769
2007-10-08 21:27:12 +00:00
Dan Gohman ac546cc28f 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
Steve Naroff 71c3c1c715 Convert Selector Maps/Sets to use stronger typing (now that we have DenseMapInfo in IdentifierTable.h).
llvm-svn: 42767
2007-10-08 21:05:34 +00:00
Devang Patel 1166312e8b Code gen case statement ranges.
llvm-svn: 42766
2007-10-08 20:57:48 +00:00
Dan Gohman a24b431b27 These two tests now require only three multiply instructions,
instead of four.

llvm-svn: 42765
2007-10-08 20:48:12 +00:00
Fariborz Jahanian e90597f593 Several small patches to do pretty printing for objective-c top-level decls
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to 
take note of the change I made to CFGRecStmtDeclVisitor.h

llvm-svn: 42764
2007-10-08 18:53:38 +00:00
Chris Lattner 104c48ab8f Various improvements to the documentation, contributed by
Joshua Haberman!

llvm-svn: 42763
2007-10-08 18:42:45 +00:00
Dan Gohman a160361c85 Migrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} to
use ISD::{S,U}DIVREM and ISD::{S,U}MUL_HIO. Move the lowering code
associated with these operators into target-independent in LegalizeDAG.cpp
and TargetLowering.cpp.

llvm-svn: 42762
2007-10-08 18:33:35 +00:00
Evan Cheng 18109c88c3 Allow x86 compare to be commutable by default.
llvm-svn: 42761
2007-10-08 18:27:46 +00:00
Gordon Henriksen 44dd8fbd26 C and Objective Caml bindings for PHINode::addIncoming etc.
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Dan Gohman 5c6d0c3b99 DAGCombiner support for UDIVREM/SDIVREM and UMUL_LOHI/SMUL_LOHI.
Check if one of the two results unneeded so see if a simpler operator
could bs used. Also check to see if each of the two computations could be
simplified if they were split into separate operators. Factor out the code
that calls visit() so that it can be used for this purpose.

llvm-svn: 42759
2007-10-08 17:57:15 +00:00
Evan Cheng 4c73befe28 LLVM does not use the old style simple isel any more.
llvm-svn: 42758
2007-10-08 17:54:24 +00:00
Evan Cheng acc8b68e5f Remove debugging printf to get build going on x86-64.
llvm-svn: 42757
2007-10-08 17:49:43 +00:00
Fariborz Jahanian 092e34d15b Removed unnecessary base class from some of objective-c classes:
ObjcProtocolDecl is now derived from ScopedDecl. ObjcForwardProtocolDecl from Decl.
ObjcImplementationDecl fom NamedDecl.

llvm-svn: 42756
2007-10-08 17:35:11 +00:00
Dan Gohman 71f0d7d76e When we start enabling SMUL_LOHI/UMUL_LOHI or SDIVREM/UDIVREM in
target-indepenent lowering, don't use them on PowerPC.

llvm-svn: 42755
2007-10-08 17:28:24 +00:00
Fariborz Jahanian 4b2113c281 Return NULL on invalid protocol.
llvm-svn: 42754
2007-10-08 16:07:03 +00:00
Dan Gohman b08c8bfe41 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 2c6a821fd7 Move the space in overview output for commands out of each of the
commands and into the common code.

llvm-svn: 42752
2007-10-08 15:45:12 +00:00
Dan Gohman afedc063ab Simplify getIntPtrType, allowing it to work for arbitrary pointer sizes.
llvm-svn: 42751
2007-10-08 15:16:25 +00:00
Dan Gohman 5e79a6108f Use correct parentheses with the '&& "..."' idiom in an assert.
llvm-svn: 42750
2007-10-08 15:13:30 +00:00
Dan Gohman fadf40a655 In -debug mode, dump SelectionDAGs both before and after the
optimization passes.

llvm-svn: 42749
2007-10-08 15:12:17 +00:00
Dan Gohman ea3c73629f Fix grammar in a comment.
llvm-svn: 42748
2007-10-08 15:10:04 +00:00
Dan Gohman 13ab93efde Add explicit keywords.
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
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
Gordon Henriksen acf684315e Fixed downrev Ocaml compatibility.
llvm-svn: 42744
2007-10-08 12:16:59 +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
Chris Lattner bcd30bb0cd 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 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
Chris Lattner 7cdae91966 Finish off PR1723, by working around some strange compiler bug.
llvm-svn: 42737
2007-10-07 17:57:10 +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
Chris Lattner c330d008f4 remove unneeded #include
llvm-svn: 42731
2007-10-07 08:59:27 +00:00
Chris Lattner ef6b136781 move IdentifierTable.h from liblex to libbasic.
llvm-svn: 42730
2007-10-07 08:58:51 +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