oota-llvm.git
16 years agoRemove llvm-upgrade
Tanya Lattner [Thu, 14 Feb 2008 07:57:12 +0000 (07:57 +0000)]
Remove llvm-upgrade

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

16 years agoSupport a new type of MachineOperand, MO_FPImmediate, used for holding
Nate Begeman [Thu, 14 Feb 2008 07:39:30 +0000 (07:39 +0000)]
Support a new type of MachineOperand, MO_FPImmediate, used for holding
FP Immediates, crazily enough

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

16 years agosimplify code, no functionality change.
Chris Lattner [Thu, 14 Feb 2008 07:39:01 +0000 (07:39 +0000)]
simplify code, no functionality change.

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

16 years agoMove some useful operands up into the all-targets .td
Nate Begeman [Thu, 14 Feb 2008 07:25:46 +0000 (07:25 +0000)]
Move some useful operands up into the all-targets .td

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

16 years agoNuke dead comment
Nate Begeman [Thu, 14 Feb 2008 07:23:11 +0000 (07:23 +0000)]
Nuke dead comment

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

16 years agoTestcase for PR2032.
Nick Lewycky [Thu, 14 Feb 2008 07:15:11 +0000 (07:15 +0000)]
Testcase for PR2032.

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

16 years agoFix PR2032. Inform the alias analysis of changes to the underlying program.
Nick Lewycky [Thu, 14 Feb 2008 07:11:24 +0000 (07:11 +0000)]
Fix PR2032. Inform the alias analysis of changes to the underlying program.

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

16 years agoRemove llvm-upgrade.
Tanya Lattner [Thu, 14 Feb 2008 06:56:27 +0000 (06:56 +0000)]
Remove llvm-upgrade.

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

16 years agoupgrade some entries, remove stuff that is done.
Chris Lattner [Thu, 14 Feb 2008 06:19:02 +0000 (06:19 +0000)]
upgrade some entries, remove stuff that is done.

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

16 years agothe mid-level optimizer removes this stuff.
Chris Lattner [Thu, 14 Feb 2008 05:43:18 +0000 (05:43 +0000)]
the mid-level optimizer removes this stuff.

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

16 years agothis one is easy.
Chris Lattner [Thu, 14 Feb 2008 05:41:38 +0000 (05:41 +0000)]
this one is easy.

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

16 years agoThis readme entry is done, testcase here: CodeGen/X86/zero-remat.ll
Chris Lattner [Thu, 14 Feb 2008 05:39:46 +0000 (05:39 +0000)]
This readme entry is done, testcase here: CodeGen/X86/zero-remat.ll

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

16 years agoPR2027, Fix bugpoint's -find-bugs option, clean up the code.
Nick Lewycky [Thu, 14 Feb 2008 05:01:46 +0000 (05:01 +0000)]
PR2027, Fix bugpoint's -find-bugs option, clean up the code.

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

16 years agoFix test.
Evan Cheng [Thu, 14 Feb 2008 01:32:53 +0000 (01:32 +0000)]
Fix test.

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

16 years agoAllow the APInt form of ComputeMaskedBits to operate on i128 types.
Dan Gohman [Wed, 13 Feb 2008 23:13:32 +0000 (23:13 +0000)]
Allow the APInt form of ComputeMaskedBits to operate on i128 types.

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

16 years agoAssigning an APInt to 0 with plain assignment gives it a one-bit
Dan Gohman [Wed, 13 Feb 2008 23:07:24 +0000 (23:07 +0000)]
Assigning an APInt to 0 with plain assignment gives it a one-bit
size. Initialize these APInts to properly-sized zero values.

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

16 years agoAvoid setting bits that aren't demanded.
Dan Gohman [Wed, 13 Feb 2008 22:43:25 +0000 (22:43 +0000)]
Avoid setting bits that aren't demanded.

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

16 years agoFix a typo in a comment.
Dan Gohman [Wed, 13 Feb 2008 22:32:12 +0000 (22:32 +0000)]
Fix a typo in a comment.

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

16 years agoSimplify some logic in ComputeMaskedBits. And change ComputeMaskedBits
Dan Gohman [Wed, 13 Feb 2008 22:28:48 +0000 (22:28 +0000)]
Simplify some logic in ComputeMaskedBits. And change ComputeMaskedBits
to pass the mask APInt by value, not by reference.

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

16 years agoA loop latch phi node may have uses inside loop, not just in loop header.
Devang Patel [Wed, 13 Feb 2008 22:23:07 +0000 (22:23 +0000)]
A loop latch phi node may have uses inside loop, not just in loop header.

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

16 years agoRename APInt's isPositive to isNonNegative, to reflect what it
Dan Gohman [Wed, 13 Feb 2008 22:09:18 +0000 (22:09 +0000)]
Rename APInt's isPositive to isNonNegative, to reflect what it
actually does.

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

16 years agoWhile moving exit condition, do not drop loop latch on the floor.
Devang Patel [Wed, 13 Feb 2008 22:06:36 +0000 (22:06 +0000)]
While moving exit condition, do not drop loop latch on the floor.

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

16 years agoAdd countTrailingOnes member functions to APInt.
Dan Gohman [Wed, 13 Feb 2008 21:11:05 +0000 (21:11 +0000)]
Add countTrailingOnes member functions to APInt.

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

16 years agoFix a typo in a comment.
Dan Gohman [Wed, 13 Feb 2008 20:56:53 +0000 (20:56 +0000)]
Fix a typo in a comment.

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

16 years agoAdd count{Leading,Trailing}Ones_{32,64} functions with simple implementations.
Dan Gohman [Wed, 13 Feb 2008 20:54:54 +0000 (20:54 +0000)]
Add count{Leading,Trailing}Ones_{32,64} functions with simple implementations.

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

16 years agoKeep track of exit value operand number when operands are swapped.
Devang Patel [Wed, 13 Feb 2008 19:48:48 +0000 (19:48 +0000)]
Keep track of exit value operand number when operands are swapped.

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

16 years agoEnable exception handling int JIT
Nicolas Geoffray [Wed, 13 Feb 2008 18:39:37 +0000 (18:39 +0000)]
Enable exception handling int JIT

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

16 years agoNew test, see comments.
Dale Johannesen [Wed, 13 Feb 2008 18:36:48 +0000 (18:36 +0000)]
New test, see comments.

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

16 years agoTeach LegalizeTypes how to expand and promote CTLZ,
Duncan Sands [Wed, 13 Feb 2008 18:01:53 +0000 (18:01 +0000)]
Teach LegalizeTypes how to expand and promote CTLZ,
CTTZ and CTPOP.  The expansion code differs from
that in LegalizeDAG in that it chooses to take the
CTLZ/CTTZ count from the Hi/Lo part depending on
whether the Hi/Lo value is zero, not on whether
CTLZ/CTTZ of Hi/Lo returned 32 (or whatever the
width of the type is) for it.  I made this change
because the optimizers may well know that Hi/Lo
is zero and exploit it.  The promotion code for
CTTZ also differs from that in LegalizeDAG: it
uses an "or" to get the right result when the
original value is zero, rather than using a compare
and select.  This also means the value doesn't
need to be zero extended.

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

16 years agogcc 3.2.3 is also bad.
Chris Lattner [Wed, 13 Feb 2008 17:50:24 +0000 (17:50 +0000)]
gcc 3.2.3 is also bad.

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

16 years agoFix the PPC JIT regressions by encoding zeroreg as 0 for BLR.
Chris Lattner [Wed, 13 Feb 2008 17:24:14 +0000 (17:24 +0000)]
Fix the PPC JIT regressions by encoding zeroreg as 0 for BLR.

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

16 years agoremove some dead code.
Chris Lattner [Wed, 13 Feb 2008 17:18:26 +0000 (17:18 +0000)]
remove some dead code.

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

16 years agoRemove use of ltdl
Devang Patel [Wed, 13 Feb 2008 17:11:39 +0000 (17:11 +0000)]
Remove use of ltdl

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

16 years agoAdd notes on Ada compilers that can be used for
Duncan Sands [Wed, 13 Feb 2008 16:46:10 +0000 (16:46 +0000)]
Add notes on Ada compilers that can be used for
the build.  Put all items that the user should
specify in bold.  Make it a debug build.

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

16 years agoFix typo. Thanks to Duncan for noticing.
Wojciech Matyjewicz [Wed, 13 Feb 2008 12:21:32 +0000 (12:21 +0000)]
Fix typo. Thanks to Duncan for noticing.

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

16 years agoAdd comments as per review feedback.
Wojciech Matyjewicz [Wed, 13 Feb 2008 11:51:34 +0000 (11:51 +0000)]
Add comments as per review feedback.

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

16 years agoSome code clean up.
Evan Cheng [Wed, 13 Feb 2008 09:56:03 +0000 (09:56 +0000)]
Some code clean up.

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

16 years agoSimplify.
Evan Cheng [Wed, 13 Feb 2008 09:18:16 +0000 (09:18 +0000)]
Simplify.

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

16 years agoSimplify.
Evan Cheng [Wed, 13 Feb 2008 09:13:21 +0000 (09:13 +0000)]
Simplify.

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

16 years agoFix a potential serious problem where kills belonging to the val# defined by a two...
Evan Cheng [Wed, 13 Feb 2008 09:06:18 +0000 (09:06 +0000)]
Fix a potential serious problem where kills belonging to the val# defined by a two-address instruction is also on the val# that defines the input.

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

16 years ago* Cannot safely commute an instruction there are other defs which can reach its uses.
Evan Cheng [Wed, 13 Feb 2008 08:41:08 +0000 (08:41 +0000)]
* Cannot safely commute an instruction there are other defs which can reach its uses.
* Ignore copy instructions which have already been coalesced.

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

16 years agoAdd a note pointing to PR1996.
Eli Friedman [Wed, 13 Feb 2008 07:56:04 +0000 (07:56 +0000)]
Add a note pointing to PR1996.

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

16 years agoIn SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower this
Chris Lattner [Wed, 13 Feb 2008 07:39:09 +0000 (07:39 +0000)]
In SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower this
node as soon as we create it in SDISel.  Previously we would lower it in
legalize.  The problem with this is that it only exposes the argument
loads implied by FORMAL_ARGUMENTs after legalize, so that only dag combine 2
can hack on them.  This causes us to miss some optimizations because
datatype expansion also happens here.

Exposing the loads early allows us to do optimizations on them.  For example
we now compile arg-cast.ll to:

_foo:
movl $2147483647, %eax
andl 8(%esp), %eax
ret

where we previously produced:

_foo:
subl $12, %esp
movsd 16(%esp), %xmm0
movsd %xmm0, (%esp)
movl $2147483647, %eax
andl 4(%esp), %eax
addl $12, %esp
ret

It might also make sense to do this for ISD::CALL nodes, which have implicit
stores on many targets.

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

16 years agodon't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
Chris Lattner [Wed, 13 Feb 2008 07:35:30 +0000 (07:35 +0000)]
don't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
DAGCombine is now quite good at zapifying them.

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

16 years agoteach dag combiner how to eliminate MERGE_VALUES nodes.
Chris Lattner [Wed, 13 Feb 2008 07:25:05 +0000 (07:25 +0000)]
teach dag combiner how to eliminate MERGE_VALUES nodes.

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

16 years agoreadme updates
Nate Begeman [Wed, 13 Feb 2008 07:06:12 +0000 (07:06 +0000)]
readme updates

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

16 years agoAdd test for PR1996. (This is my first time adding a test for a
Eli Friedman [Wed, 13 Feb 2008 06:55:57 +0000 (06:55 +0000)]
Add test for PR1996.  (This is my first time adding a test for a
transform, so please review.)

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

16 years agoAdd testcase for recent legalizer change
Nate Begeman [Wed, 13 Feb 2008 06:48:40 +0000 (06:48 +0000)]
Add testcase for recent legalizer change

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

16 years agoSupport legalizing insert_vector_elt on targets where the element
Nate Begeman [Wed, 13 Feb 2008 06:43:04 +0000 (06:43 +0000)]
Support legalizing insert_vector_elt on targets where the element
type is not legal.

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

16 years agoNew tests.
Evan Cheng [Wed, 13 Feb 2008 03:23:53 +0000 (03:23 +0000)]
New tests.

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

16 years agoInitial support for copy elimination by commuting its definition MI.
Evan Cheng [Wed, 13 Feb 2008 03:01:43 +0000 (03:01 +0000)]
Initial support for copy elimination by commuting its definition MI.
PR1877.
A3 = op A2 B0<kill>
...
B1 = A3      <- this copy
...
   = op A3   <- more uses

==>

B2 = op B0 A2<kill>
...
B1 = B2      <- now an identify copy
...
   = op B2   <- more uses

This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%.

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

16 years agoMake register scavenging happy by not using a reg (CR0) that isn't defined
Nate Begeman [Wed, 13 Feb 2008 02:58:33 +0000 (02:58 +0000)]
Make register scavenging happy by not using a reg (CR0) that isn't defined

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

16 years ago- Added removeValNo() to remove all live ranges of a particular value#.
Evan Cheng [Wed, 13 Feb 2008 02:48:26 +0000 (02:48 +0000)]
- Added removeValNo() to remove all live ranges of a particular value#.
- removeRange() can now update value# information.

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

16 years agocommuteInstr() can now commute non-ssa machine instrs.
Evan Cheng [Wed, 13 Feb 2008 02:46:49 +0000 (02:46 +0000)]
commuteInstr() can now commute non-ssa machine instrs.

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

16 years agoAdded debugging routine dumpUses.
Evan Cheng [Wed, 13 Feb 2008 02:45:38 +0000 (02:45 +0000)]
Added debugging routine dumpUses.

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

16 years agoConvert SelectionDAG::ComputeMaskedBits to use APInt instead of uint64_t.
Dan Gohman [Wed, 13 Feb 2008 00:35:47 +0000 (00:35 +0000)]
Convert SelectionDAG::ComputeMaskedBits to use APInt instead of uint64_t.
Add an overload that supports the uint64_t interface for use by clients
that haven't been updated yet.

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

16 years ago__DATA not __DATA__ is the right segment name on darwin.
Dale Johannesen [Tue, 12 Feb 2008 23:35:09 +0000 (23:35 +0000)]
__DATA not __DATA__ is the right segment name on darwin.
Spotted by Nick Kledzik.

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

16 years agoRemove some dead code
Nate Begeman [Tue, 12 Feb 2008 22:54:40 +0000 (22:54 +0000)]
Remove some dead code

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

16 years agoSSE4.1 64b integer insert/extract pattern support
Nate Begeman [Tue, 12 Feb 2008 22:51:28 +0000 (22:51 +0000)]
SSE4.1 64b integer insert/extract pattern support
Move formats into the formats file

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

16 years agoChange APInt::getBitsSet to accept a "half-open" range, where the
Dan Gohman [Tue, 12 Feb 2008 21:47:33 +0000 (21:47 +0000)]
Change APInt::getBitsSet to accept a "half-open" range, where the
hiBit parameter marks the index one past the last desired set bit.

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

16 years agoNote that these instructions are for x86-32 linux
Duncan Sands [Tue, 12 Feb 2008 21:40:21 +0000 (21:40 +0000)]
Note that these instructions are for x86-32 linux
(the only platform on which the Ada compiler even
builds).

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

16 years agoAdd more spacing.
Duncan Sands [Tue, 12 Feb 2008 21:28:39 +0000 (21:28 +0000)]
Add more spacing.

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

16 years agoAdd instructions for building Ada and Fortran.
Duncan Sands [Tue, 12 Feb 2008 21:22:58 +0000 (21:22 +0000)]
Add instructions for building Ada and Fortran.
Adjust mentions of gcc4 to be 4.0/4.2 agnostic.
This file should probably be renamed tor
 GCCFEBuildInstrs.html...

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

16 years agoRe-apply the patch to improve the optimizations of memcpy's, with several
Owen Anderson [Tue, 12 Feb 2008 21:15:18 +0000 (21:15 +0000)]
Re-apply the patch to improve the optimizations of memcpy's, with several
bugs fixed.  This now passes PPC bootstrap.

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

16 years agoGeneralize getCopyFromParts and getCopyToParts to
Duncan Sands [Tue, 12 Feb 2008 20:46:31 +0000 (20:46 +0000)]
Generalize getCopyFromParts and getCopyToParts to
handle arbitrary precision integers and any number
of parts.  For example, on a 32 bit machine an i50
corresponds to two i32 parts.  getCopyToParts will
extend the i50 to an i64 then write half of the i64
to each part; getCopyFromParts will combine the two
i32 parts into an i64 then truncate the result to
i50.

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

16 years agoRevert r46916 PPCTargetAsmInfo.cpp.
Evan Cheng [Tue, 12 Feb 2008 19:25:12 +0000 (19:25 +0000)]
Revert r46916 PPCTargetAsmInfo.cpp.

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

16 years agoOnly using x86-64 rip relative addressing in non-staic mode?
Evan Cheng [Tue, 12 Feb 2008 19:20:46 +0000 (19:20 +0000)]
Only using x86-64 rip relative addressing in non-staic mode?

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

16 years agoDon't mask the isel bug.
Evan Cheng [Tue, 12 Feb 2008 19:11:29 +0000 (19:11 +0000)]
Don't mask the isel bug.

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

16 years agoThis test assumes no SSE4.1.
Evan Cheng [Tue, 12 Feb 2008 19:11:08 +0000 (19:11 +0000)]
This test assumes no SSE4.1.

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

16 years agoAdd a doxygen comment for SrcValueSDNode, to make its purpose
Dan Gohman [Tue, 12 Feb 2008 18:52:52 +0000 (18:52 +0000)]
Add a doxygen comment for SrcValueSDNode, to make its purpose
clear and to clarify how it differs from MemOperandSDNode.

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

16 years agoRemove dead code.
Devang Patel [Tue, 12 Feb 2008 18:20:50 +0000 (18:20 +0000)]
Remove dead code.

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

16 years agoNow that ScalarEvolution::print writes to the correct stream, there is
Wojciech Matyjewicz [Tue, 12 Feb 2008 15:12:40 +0000 (15:12 +0000)]
Now that ScalarEvolution::print writes to the correct stream, there is
no need to redirect stderr into stdout.

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

16 years agoChange negative grep into positive one in my yesterday's testcase.
Wojciech Matyjewicz [Tue, 12 Feb 2008 15:10:35 +0000 (15:10 +0000)]
Change negative grep into positive one in my yesterday's testcase.

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

16 years agoFix PR2002. Suppose n is the initial value for the induction
Wojciech Matyjewicz [Tue, 12 Feb 2008 15:09:36 +0000 (15:09 +0000)]
Fix PR2002. Suppose n is the initial value for the induction
variable (with step 1) and m is its final value. Then, the correct trip
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may
overflow and can't in general be interpreted as signed.

Patch by Nick Lewycky.

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

16 years agoFix for bug 1996: optimize out loads of undef. This code basically just
Eli Friedman [Tue, 12 Feb 2008 12:08:14 +0000 (12:08 +0000)]
Fix for bug 1996: optimize out loads of undef.  This code basically just
checks for a malloc/alloca immediately followed by a load.

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

16 years agoUpdate comment.
Evan Cheng [Tue, 12 Feb 2008 07:59:55 +0000 (07:59 +0000)]
Update comment.

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

16 years agoUnbreak various insert_vector_elt and extract_vector_elt tests in presence of SSE4.
Evan Cheng [Tue, 12 Feb 2008 07:59:45 +0000 (07:59 +0000)]
Unbreak various insert_vector_elt and extract_vector_elt tests in presence of SSE4.

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

16 years agoTest case for annotate builtin.
Tanya Lattner [Tue, 12 Feb 2008 07:46:33 +0000 (07:46 +0000)]
Test case for annotate builtin.

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

16 years agoFix some test cases.
Evan Cheng [Tue, 12 Feb 2008 07:22:46 +0000 (07:22 +0000)]
Fix some test cases.

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

16 years agoMore violation fixes.
Bill Wendling [Tue, 12 Feb 2008 07:12:46 +0000 (07:12 +0000)]
More violation fixes.

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

16 years agoFix validation errors: di -> dt.
Bill Wendling [Tue, 12 Feb 2008 07:09:05 +0000 (07:09 +0000)]
Fix validation errors: di -> dt.

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

16 years agoReformatting. Adding "doc_code" divisions for code examples. Updated some
Bill Wendling [Tue, 12 Feb 2008 07:06:19 +0000 (07:06 +0000)]
Reformatting. Adding "doc_code" divisions for code examples. Updated some
of the examples to reflect the current .TD files.

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

16 years agorip out llvm 2.2 stuff in preparation for llvm 2.3
Chris Lattner [Tue, 12 Feb 2008 06:29:45 +0000 (06:29 +0000)]
rip out llvm 2.2 stuff in preparation for llvm 2.3

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

16 years agoheavily refactor this to have less duplication between BUILD_FOR_WEBSITE mode and...
Chris Lattner [Tue, 12 Feb 2008 06:07:47 +0000 (06:07 +0000)]
heavily  refactor this to have less duplication between BUILD_FOR_WEBSITE mode and not.

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

16 years agoremove unknown details
Chris Lattner [Tue, 12 Feb 2008 05:07:12 +0000 (05:07 +0000)]
remove unknown details

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

16 years agoAdd 2.2 release tag.
Tanya Lattner [Tue, 12 Feb 2008 02:42:55 +0000 (02:42 +0000)]
Add 2.2 release tag.

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

16 years agoStuff noticed while grepping code
Nate Begeman [Mon, 11 Feb 2008 23:47:56 +0000 (23:47 +0000)]
Stuff noticed while grepping code

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

16 years agoCorrect the order of the arguments in the examples in the comments
Dan Gohman [Mon, 11 Feb 2008 23:45:14 +0000 (23:45 +0000)]
Correct the order of the arguments in the examples in the comments
for APInt::getBitsSet. And fix an off-by-one bug in "wrapping" mode.

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

16 years agoThe factories for ImutAVLTree/ImmutableSet/ImmutableMap now take an (optional)
Ted Kremenek [Mon, 11 Feb 2008 23:11:12 +0000 (23:11 +0000)]
The factories for ImutAVLTree/ImmutableSet/ImmutableMap now take an (optional)
BumpPtrAllocator argument to their constructors.  This BumpPtrAllocator
will be used to allocate trees.  If no BumpPtrAllocator is provided, one
is created (as before).

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

16 years agoAdded blurb for CellSPU progress
Scott Michel [Mon, 11 Feb 2008 21:05:47 +0000 (21:05 +0000)]
Added blurb for CellSPU progress

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

16 years agoGeneralize the handling of call and return arguments,
Duncan Sands [Mon, 11 Feb 2008 20:58:28 +0000 (20:58 +0000)]
Generalize the handling of call and return arguments,
in preparation for apint support.  These changes are
intended to have no functional effect.

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

16 years agoFrom Chris' review: use isa instead of explicitly using classof.
Dan Gohman [Mon, 11 Feb 2008 19:00:34 +0000 (19:00 +0000)]
From Chris' review: use isa instead of explicitly using classof.

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

16 years agoFrom Chris' review: minor corrections in comments.
Dan Gohman [Mon, 11 Feb 2008 19:00:03 +0000 (19:00 +0000)]
From Chris' review: minor corrections in comments.

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

16 years agoFrom Chris' review: use cast instead of dyn_cast with an assert.
Dan Gohman [Mon, 11 Feb 2008 18:58:42 +0000 (18:58 +0000)]
From Chris' review: use cast instead of dyn_cast with an assert.

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

16 years agoFrom Chris' review: fix 80 column violations
Dan Gohman [Mon, 11 Feb 2008 18:57:43 +0000 (18:57 +0000)]
From Chris' review: fix 80 column violations

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

16 years agoFrom Chris' review: change MemOperandSDNode's constructor to pass its
Dan Gohman [Mon, 11 Feb 2008 18:56:50 +0000 (18:56 +0000)]
From Chris' review: change MemOperandSDNode's constructor to pass its
argument by reference, rather than by value.

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

16 years agoIf the LHS of the comparison is a loop-invariant we also want to move it
Wojciech Matyjewicz [Mon, 11 Feb 2008 18:37:34 +0000 (18:37 +0000)]
If the LHS of the comparison is a loop-invariant we also want to move it
to the RHS. This simple change allows to compute loop iteration count
for loops with condition similar to the one in the testcase (which seems
to be quite common).

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

16 years agoAdded "Profile" method to APFloat for use with FoldingSet.
Ted Kremenek [Mon, 11 Feb 2008 17:24:50 +0000 (17:24 +0000)]
Added "Profile" method to APFloat for use with FoldingSet.

Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary
objects to a profile via dispatch to FoldingSetTrait<T>::Profile().

Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.

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

16 years agoAdd arbitrary integer support to getRegisterType and
Duncan Sands [Mon, 11 Feb 2008 11:09:23 +0000 (11:09 +0000)]
Add arbitrary integer support to getRegisterType and
getNumRegisters.  This is needed for calling functions
with apint parameters or return values.

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

16 years agoFix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
Wojciech Matyjewicz [Mon, 11 Feb 2008 11:03:14 +0000 (11:03 +0000)]
Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
arbitrary iteration.

The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the
computations (essentially, the division) in BinomialCoefficient() are
performed with the apprioprate bitwidth necessary to avoid overflow;
unsigned division is used instead of the signed one.

Computations in BinomialCoefficient() require support from the code
generator for APInts. Currently, we use a hack rounding up the
neccessary bitwidth to the nearest power of 2. The hack is easy to turn
off in future.

One remaining issue: we assume the divisor of the binomial coefficient
formula can be computed accurately using 16 bits. It means we can handle
AddRecs of length up to 9. In future, we should use APInts to evaluate
the divisor.

Thanks to Nicholas for cooperation!

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