oota-llvm.git
17 years agoAdd an explicit target triple to make this test behave as expected on
Dan Gohman [Thu, 11 Oct 2007 23:04:36 +0000 (23:04 +0000)]
Add an explicit target triple to make this test behave as expected on
non-Apple hosts. And use the count script instead of wc + grep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42878 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProvided accessors to internal allocator for ImutAVLTree and ImmutableSet.
Ted Kremenek [Thu, 11 Oct 2007 21:51:04 +0000 (21:51 +0000)]
Provided accessors to internal allocator for ImutAVLTree and ImmutableSet.
Added postfix ++,-- support for ImmutableSet::iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42877 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd missing argument to PALIGNR
Dale Johannesen [Thu, 11 Oct 2007 20:58:37 +0000 (20:58 +0000)]
Add missing argument to PALIGNR

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42874 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix an assertion abort on sparc. malloc(0) is allowed to
Gabor Greif [Thu, 11 Oct 2007 19:40:35 +0000 (19:40 +0000)]
Fix an assertion abort on sparc. malloc(0) is allowed to
return NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42871 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded tail call optimization to the x86 back end. It can be
Arnold Schwaighofer [Thu, 11 Oct 2007 19:40:01 +0000 (19:40 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42870 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdding myself
Arnold Schwaighofer [Thu, 11 Oct 2007 18:54:49 +0000 (18:54 +0000)]
Adding myself

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42869 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNext PPC long double bits. First cut at constants.
Dale Johannesen [Thu, 11 Oct 2007 18:07:22 +0000 (18:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLower memcpy if it makes sense.
Devang Patel [Thu, 11 Oct 2007 17:21:57 +0000 (17:21 +0000)]
Lower memcpy if it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42864 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake bitvector &= do the right thing if vectors have mismatched length.
Chris Lattner [Thu, 11 Oct 2007 06:12:33 +0000 (06:12 +0000)]
make bitvector  &= do the right thing if vectors have mismatched length.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42860 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a new use_iterator::atEnd() method, which allows us to shrink
Chris Lattner [Thu, 11 Oct 2007 04:18:11 +0000 (04:18 +0000)]
Add a new use_iterator::atEnd() method, which allows us to shrink
pred_iterator down to a single ivar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42859 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded iterators to ImmutableSet.
Ted Kremenek [Thu, 11 Oct 2007 00:14:49 +0000 (00:14 +0000)]
Added iterators to ImmutableSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42851 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded some doxygen comments to ImmutableSet.
Ted Kremenek [Wed, 10 Oct 2007 23:47:03 +0000 (23:47 +0000)]
Added some doxygen comments to ImmutableSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42850 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemoved uninformative assertions that catch problems that will
Ted Kremenek [Wed, 10 Oct 2007 23:35:04 +0000 (23:35 +0000)]
Removed uninformative assertions that catch problems that will
fire anyway at runtime due to a NULL dereference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42848 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemoved "height" of an AVL tree node from its Profile. This is
Ted Kremenek [Wed, 10 Oct 2007 23:32:01 +0000 (23:32 +0000)]
Removed "height" of an AVL tree node from its Profile.  This is
implicitly captured by using the addresses of its children in the
profile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42847 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemoved spurious forward declaration to a structure that will no longer be used.
Ted Kremenek [Wed, 10 Oct 2007 20:45:34 +0000 (20:45 +0000)]
Removed spurious forward declaration to a structure that will no longer be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42839 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded some doxygen comments to a few methods of ImutAVLTree.
Ted Kremenek [Wed, 10 Oct 2007 20:44:21 +0000 (20:44 +0000)]
Added some doxygen comments to a few methods of ImutAVLTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42837 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdated VC++ build system.
Hartmut Kaiser [Wed, 10 Oct 2007 19:50:09 +0000 (19:50 +0000)]
Updated VC++ build system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42835 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded preliminary support for iterators in ImutAVLTree.
Ted Kremenek [Wed, 10 Oct 2007 18:11:16 +0000 (18:11 +0000)]
Added preliminary support for iterators in ImutAVLTree.
Implemented ImutAVLTree::isEqual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42833 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem
Chris Lattner [Wed, 10 Oct 2007 18:10:57 +0000 (18:10 +0000)]
Fix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem
illegal.  Thanks to gabor for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42832 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRenamed internal method "Create" of ImutAVLTree to "CreateNode".
Ted Kremenek [Wed, 10 Oct 2007 16:27:33 +0000 (16:27 +0000)]
Renamed internal method "Create" of ImutAVLTree to "CreateNode".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42825 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCorrect swapped arguments to getConstant.
Duncan Sands [Wed, 10 Oct 2007 09:54:50 +0000 (09:54 +0000)]
Correct swapped arguments to getConstant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42824 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix 80-column violations
Bill Wendling [Wed, 10 Oct 2007 05:45:59 +0000 (05:45 +0000)]
Fix 80-column violations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42823 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNext PPC long double bits: ppcf128->i32 conversion.
Dale Johannesen [Wed, 10 Oct 2007 01:01:31 +0000 (01:01 +0000)]
Next PPC long double bits: ppcf128->i32 conversion.
Surprisingly complicated.
Adds getTargetNode for 2 outputs, no inputs (missing).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42822 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBad choice of variable name.
Evan Cheng [Wed, 10 Oct 2007 00:11:40 +0000 (00:11 +0000)]
Bad choice of variable name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42821 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix an extremely stupid bug that prevented first round of coalescing (physical regist...
Evan Cheng [Tue, 9 Oct 2007 23:36:27 +0000 (23:36 +0000)]
Fix an extremely stupid bug that prevented first round of coalescing (physical registers only) from happening.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42820 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoModified XCode project to contain...
Ted Kremenek [Tue, 9 Oct 2007 21:49:49 +0000 (21:49 +0000)]
Modified XCode project to contain...

ADT/DenseSet.h
ADT/ImmutableMap.h
ADT/ImmutableSet.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42816 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd new MemoryBuffer::getMemBufferCopy method.
Chris Lattner [Tue, 9 Oct 2007 21:46:38 +0000 (21:46 +0000)]
Add new MemoryBuffer::getMemBufferCopy method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42815 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix indentation.
Devang Patel [Tue, 9 Oct 2007 21:41:00 +0000 (21:41 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42814 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded implementation of immutable (functional) maps and sets, as
Ted Kremenek [Tue, 9 Oct 2007 21:38:09 +0000 (21:38 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42813 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDo not walk invalid iterator.
Devang Patel [Tue, 9 Oct 2007 21:31:36 +0000 (21:31 +0000)]
Do not walk invalid iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42812 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd LLVMFoldingBuilder
Devang Patel [Tue, 9 Oct 2007 19:49:19 +0000 (19:49 +0000)]
Add LLVMFoldingBuilder

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42806 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove an unnecessary friend declaration.
Dan Gohman [Tue, 9 Oct 2007 18:39:48 +0000 (18:39 +0000)]
Remove an unnecessary friend declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42805 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoupdate prototype, fixing build error
Chris Lattner [Tue, 9 Oct 2007 16:27:44 +0000 (16:27 +0000)]
update prototype, fixing build error

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42789 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPass argc by value, not by reference, since it isn't modified.
Dan Gohman [Tue, 9 Oct 2007 16:04:57 +0000 (16:04 +0000)]
Pass argc by value, not by reference, since it isn't modified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42788 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLowerIntegerDivOrRem no longer exists.
Dan Gohman [Tue, 9 Oct 2007 15:45:13 +0000 (15:45 +0000)]
LowerIntegerDivOrRem no longer exists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42787 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix grammar in a comment.
Dan Gohman [Tue, 9 Oct 2007 15:44:37 +0000 (15:44 +0000)]
Fix grammar in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42786 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis is done.
Dan Gohman [Tue, 9 Oct 2007 15:42:21 +0000 (15:42 +0000)]
This is done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42785 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThese two tests now require only two multiply instructions,
Dan Gohman [Tue, 9 Oct 2007 15:39:37 +0000 (15:39 +0000)]
These two tests now require only two multiply instructions,
instead of four.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42784 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUnder 64-bit mode use LEA64_32r instead of LEA64r to save a byte.
Evan Cheng [Tue, 9 Oct 2007 07:14:53 +0000 (07:14 +0000)]
Under 64-bit mode use LEA64_32r instead of LEA64r to save a byte.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42783 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix problems where DenseMap used operator!= instead of correctly
Chris Lattner [Tue, 9 Oct 2007 05:42:12 +0000 (05:42 +0000)]
Fix problems where DenseMap used operator!= instead of correctly
calling the traits implementation of isEqual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42782 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoChange a #include into a forward declaration
Chris Lattner [Tue, 9 Oct 2007 03:40:30 +0000 (03:40 +0000)]
Change a #include into a forward declaration

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42781 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPosition Independent Code (PIC) support [3]
Bruno Cardoso Lopes [Tue, 9 Oct 2007 03:15:11 +0000 (03:15 +0000)]
Position Independent Code (PIC) support [3]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42780 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPosition Independent Code (PIC) support [2]
Bruno Cardoso Lopes [Tue, 9 Oct 2007 03:01:19 +0000 (03:01 +0000)]
Position Independent Code (PIC) support [2]
- Added a function to hold the stack location
  where GP must be stored during LowerCALL
- AsmPrinter now emits directives based on
  relocation type
- PIC_ set to default relocation type (same as GCC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42779 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPosition Independent Code (PIC) support [1]
Bruno Cardoso Lopes [Tue, 9 Oct 2007 02:55:31 +0000 (02:55 +0000)]
Position Independent Code (PIC) support [1]
- Modified instruction format to handle pseudo instructions
- Added LoadAddr SDNode to load symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42778 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdate test.
Evan Cheng [Mon, 8 Oct 2007 22:20:32 +0000 (22:20 +0000)]
Update test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42775 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBug fix. X86 was emitting redundant setcc and test instructions before a conditional...
Evan Cheng [Mon, 8 Oct 2007 22:16:29 +0000 (22:16 +0000)]
Bug fix. X86 was emitting redundant setcc and test instructions before a conditional move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42774 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCall getFunctionNumber() instead of referencing FunctionNumber directly,
Dan Gohman [Mon, 8 Oct 2007 21:27:12 +0000 (21:27 +0000)]
Call getFunctionNumber() instead of referencing FunctionNumber directly,
for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42769 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMark the prefetch intrinsic as IntrWriteArgMem, instead of the
Dan Gohman [Mon, 8 Oct 2007 21:15:07 +0000 (21:15 +0000)]
Mark the prefetch intrinsic as IntrWriteArgMem, instead of the
default of IntrWriteMem, to at least indicate that it doesn't
"capture" the argument pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42768 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThese two tests now require only three multiply instructions,
Dan Gohman [Mon, 8 Oct 2007 20:48:12 +0000 (20:48 +0000)]
These two tests now require only three multiply instructions,
instead of four.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42765 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoVarious improvements to the documentation, contributed by
Chris Lattner [Mon, 8 Oct 2007 18:42:45 +0000 (18:42 +0000)]
Various improvements to the documentation, contributed by
Joshua Haberman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42763 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMigrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} to
Dan Gohman [Mon, 8 Oct 2007 18:33:35 +0000 (18:33 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42762 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow x86 compare to be commutable by default.
Evan Cheng [Mon, 8 Oct 2007 18:27:46 +0000 (18:27 +0000)]
Allow x86 compare to be commutable by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42761 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoC and Objective Caml bindings for PHINode::addIncoming etc.
Gordon Henriksen [Mon, 8 Oct 2007 18:14:39 +0000 (18:14 +0000)]
C and Objective Caml bindings for PHINode::addIncoming etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42760 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDAGCombiner support for UDIVREM/SDIVREM and UMUL_LOHI/SMUL_LOHI.
Dan Gohman [Mon, 8 Oct 2007 17:57:15 +0000 (17:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42759 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLLVM does not use the old style simple isel any more.
Evan Cheng [Mon, 8 Oct 2007 17:54:24 +0000 (17:54 +0000)]
LLVM does not use the old style simple isel any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42758 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove debugging printf to get build going on x86-64.
Evan Cheng [Mon, 8 Oct 2007 17:49:43 +0000 (17:49 +0000)]
Remove debugging printf to get build going on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42757 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhen we start enabling SMUL_LOHI/UMUL_LOHI or SDIVREM/UDIVREM in
Dan Gohman [Mon, 8 Oct 2007 17:28:24 +0000 (17:28 +0000)]
When we start enabling SMUL_LOHI/UMUL_LOHI or SDIVREM/UDIVREM in
target-indepenent lowering, don't use them on PowerPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42755 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd convenience overloads of SelectionDAG::getNode that take a SDVTList
Dan Gohman [Mon, 8 Oct 2007 15:49:58 +0000 (15:49 +0000)]
Add convenience overloads of SelectionDAG::getNode that take a SDVTList
and individual SDOperand operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42753 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMove the space in overview output for commands out of each of the
Dan Gohman [Mon, 8 Oct 2007 15:45:12 +0000 (15:45 +0000)]
Move the space in overview output for commands out of each of the
commands and into the common code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSimplify getIntPtrType, allowing it to work for arbitrary pointer sizes.
Dan Gohman [Mon, 8 Oct 2007 15:16:25 +0000 (15:16 +0000)]
Simplify getIntPtrType, allowing it to work for arbitrary pointer sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42751 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse correct parentheses with the '&& "..."' idiom in an assert.
Dan Gohman [Mon, 8 Oct 2007 15:13:30 +0000 (15:13 +0000)]
Use correct parentheses with the '&& "..."' idiom in an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42750 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoIn -debug mode, dump SelectionDAGs both before and after the
Dan Gohman [Mon, 8 Oct 2007 15:12:17 +0000 (15:12 +0000)]
In -debug mode, dump SelectionDAGs both before and after the
optimization passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42749 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix grammar in a comment.
Dan Gohman [Mon, 8 Oct 2007 15:10:04 +0000 (15:10 +0000)]
Fix grammar in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42748 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd explicit keywords.
Dan Gohman [Mon, 8 Oct 2007 15:08:41 +0000 (15:08 +0000)]
Add explicit keywords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42747 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse APInt::tcExtract. It's cleaner, and works :)
Neil Booth [Mon, 8 Oct 2007 14:39:42 +0000 (14:39 +0000)]
Use APInt::tcExtract.  It's cleaner, and works :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42746 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a new function tcExtract for extracting a bignum from an
Neil Booth [Mon, 8 Oct 2007 13:47:12 +0000 (13:47 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42745 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFixed downrev Ocaml compatibility.
Gordon Henriksen [Mon, 8 Oct 2007 12:16:59 +0000 (12:16 +0000)]
Fixed downrev Ocaml compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42744 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBegin the process of allowing DomTree on MBB's. Step One: template DomTreeNode by...
Owen Anderson [Mon, 8 Oct 2007 07:44:39 +0000 (07:44 +0000)]
Begin the process of allowing DomTree on MBB's.  Step One: template DomTreeNode by making it a typedef of a templated DomTreeNodeBase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42743 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoKill cycle of an live range is always the last use index + 1.
Evan Cheng [Mon, 8 Oct 2007 06:59:30 +0000 (06:59 +0000)]
Kill cycle of an live range is always the last use index + 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42742 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t...
Chris Lattner [Mon, 8 Oct 2007 03:45:44 +0000 (03:45 +0000)]
Allow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t)&ID)"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42741 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoC and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
Gordon Henriksen [Mon, 8 Oct 2007 03:45:09 +0000 (03:45 +0000)]
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42740 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodisable this entirely: it is causing use of invalidated iterators and infinite looping.
Chris Lattner [Sun, 7 Oct 2007 22:00:31 +0000 (22:00 +0000)]
disable this entirely: it is causing use of invalidated iterators and infinite looping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42739 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix many regressions on x86 by avoiding dereferencing the end iterator.
Chris Lattner [Sun, 7 Oct 2007 21:53:12 +0000 (21:53 +0000)]
Fix many regressions on x86 by avoiding dereferencing the end iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42738 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFinish off PR1723, by working around some strange compiler bug.
Chris Lattner [Sun, 7 Oct 2007 17:57:10 +0000 (17:57 +0000)]
Finish off PR1723, by working around some strange compiler bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42737 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoC and Objective Caml bindings for GlobalVariable::isConstant.
Gordon Henriksen [Sun, 7 Oct 2007 17:31:42 +0000 (17:31 +0000)]
C and Objective Caml bindings for GlobalVariable::isConstant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42736 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd back convertFromSignExtendedInteger.
Neil Booth [Sun, 7 Oct 2007 12:15:41 +0000 (12:15 +0000)]
Add back convertFromSignExtendedInteger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42735 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNow that convertFromUnsignedParts has a sane, constant interface,
Neil Booth [Sun, 7 Oct 2007 12:10:57 +0000 (12:10 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42734 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReimplement convertFromUnsignedInteger so it is passed a const bignum.
Neil Booth [Sun, 7 Oct 2007 12:07:53 +0000 (12:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42733 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoconvertFromInteger, as originally written, expected sign-extended
Neil Booth [Sun, 7 Oct 2007 11:45:55 +0000 (11:45 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42732 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agocombineLostFractions does not need to be a member function
Neil Booth [Sun, 7 Oct 2007 08:51:21 +0000 (08:51 +0000)]
combineLostFractions does not need to be a member function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42729 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSome more problems noticed by Curtis
Daniel Berlin [Sun, 7 Oct 2007 04:47:57 +0000 (04:47 +0000)]
Some more problems noticed by Curtis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42717 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoC and Objective Caml bindings for PATypeHolder.
Gordon Henriksen [Sun, 7 Oct 2007 00:13:35 +0000 (00:13 +0000)]
C and Objective Caml bindings for PATypeHolder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42713 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBindings for the verifier.
Gordon Henriksen [Sat, 6 Oct 2007 21:00:36 +0000 (21:00 +0000)]
Bindings for the verifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42707 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDeleting some unnecessary glue.
Gordon Henriksen [Sat, 6 Oct 2007 17:10:44 +0000 (17:10 +0000)]
Deleting some unnecessary glue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42702 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdopting a uniform naming convention for type constructors in
Gordon Henriksen [Sat, 6 Oct 2007 16:56:09 +0000 (16:56 +0000)]
Adopting a uniform naming convention for type constructors in
bindings (part le deux).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42701 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOops, I really wanted to commit this part also :)
Anton Korobeynikov [Sat, 6 Oct 2007 16:39:43 +0000 (16:39 +0000)]
Oops, I really wanted to commit this part also :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42700 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMove merge code into new helper function.
Anton Korobeynikov [Sat, 6 Oct 2007 16:17:49 +0000 (16:17 +0000)]
Move merge code into new helper function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42699 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdopting a uniform naming convention for type constructors in bindings.
Gordon Henriksen [Sat, 6 Oct 2007 16:05:20 +0000 (16:05 +0000)]
Adopting a uniform naming convention for type constructors in bindings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42698 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdopting a uniform naming convention for constant constructors in bindings.
Gordon Henriksen [Sat, 6 Oct 2007 15:11:06 +0000 (15:11 +0000)]
Adopting a uniform naming convention for constant constructors in bindings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42697 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdding C and Ocaml bindings for ConstantExpr.
Gordon Henriksen [Sat, 6 Oct 2007 14:29:36 +0000 (14:29 +0000)]
Adding C and Ocaml bindings for ConstantExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42696 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoInclude DataTypes.h to provide intptr_t type. This fixes OpenBSD compilation of this...
Anton Korobeynikov [Sat, 6 Oct 2007 13:07:11 +0000 (13:07 +0000)]
Include DataTypes.h to provide intptr_t type. This fixes OpenBSD compilation of this file.
Inspired by Laurence Tratt's patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42695 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReapply 42677.
Evan Cheng [Sat, 6 Oct 2007 08:19:55 +0000 (08:19 +0000)]
Reapply 42677.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42692 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOops. Forgot this.
Evan Cheng [Sat, 6 Oct 2007 08:09:29 +0000 (08:09 +0000)]
Oops. Forgot this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42691 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCleaner, more general exponent output.
Neil Booth [Sat, 6 Oct 2007 07:29:25 +0000 (07:29 +0000)]
Cleaner, more general exponent output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42690 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agosilence warnings in no-assert build.
Chris Lattner [Sat, 6 Oct 2007 06:13:42 +0000 (06:13 +0000)]
silence warnings in no-assert build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42687 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorevert evan's patch until the header is committed
Chris Lattner [Sat, 6 Oct 2007 06:08:17 +0000 (06:08 +0000)]
revert evan's patch until the header is committed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42686 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded DAG xforms. e.g.
Evan Cheng [Sat, 6 Oct 2007 02:46:29 +0000 (02:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42677 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNext powerpc long double bits. Comparisons work,
Dale Johannesen [Sat, 6 Oct 2007 01:24:11 +0000 (01:24 +0000)]
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

17 years agoMake test work on non-x86 hosts.
Dale Johannesen [Sat, 6 Oct 2007 01:22:39 +0000 (01:22 +0000)]
Make test work on non-x86 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42671 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix and clarify some comments.
Neil Booth [Sat, 6 Oct 2007 00:43:45 +0000 (00:43 +0000)]
Fix and clarify some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42670 91177308-0d34-0410-b5e6-96231b3b80d8