oota-llvm.git
16 years agoAdd patterns for CALL32m and CALL64m. They aren't matched in most
Dan Gohman [Thu, 29 May 2008 21:50:34 +0000 (21:50 +0000)]
Add patterns for CALL32m and CALL64m. They aren't matched in most
cases due to an isel deficiency already noted in
lib/Target/X86/README.txt, but they can be matched in this fold-call.ll
testcase, for example.

This is interesting mainly because it exposes a tricky tblgen bug;
tblgen was incorrectly computing the starting index for variable_ops
in the case of a complex pattern.

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

16 years agoRemove more iostream header includes. Needed to implement a "FlushStream"
Bill Wendling [Thu, 29 May 2008 21:46:33 +0000 (21:46 +0000)]
Remove more iostream header includes. Needed to implement a "FlushStream"
function to flush a specified std::ostream.

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

16 years agoRemove <iostream>.
Bill Wendling [Thu, 29 May 2008 21:29:39 +0000 (21:29 +0000)]
Remove <iostream>.

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

16 years agoAdd newline at end of file.
Owen Anderson [Thu, 29 May 2008 21:05:16 +0000 (21:05 +0000)]
Add newline at end of file.

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

16 years agoFix a tblgen problem handling variable_ops in tblgen instruction
Dan Gohman [Thu, 29 May 2008 19:57:41 +0000 (19:57 +0000)]
Fix a tblgen problem handling variable_ops in tblgen instruction
definitions. This adds a new construct, "discard", for indicating
that a named node in the input matching pattern is to be discarded,
instead of corresponding to a node in the output pattern. This
allows tblgen to know where the arguments for the varaible_ops are
supposed to begin.

This fixes "rdar://5791600", whatever that is ;-).

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

16 years agoconst-ify getOpcode.
Dan Gohman [Thu, 29 May 2008 19:53:46 +0000 (19:53 +0000)]
const-ify getOpcode.

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

16 years agoPrune and tidy #includes.
Dan Gohman [Thu, 29 May 2008 19:52:31 +0000 (19:52 +0000)]
Prune and tidy #includes.

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

16 years agoExpand small memmovs using inline code. Set the X86 threshold for expanding
Dan Gohman [Thu, 29 May 2008 19:42:22 +0000 (19:42 +0000)]
Expand small memmovs using inline code. Set the X86 threshold for expanding
memmove to a more plausible value, now that it's actually being used.

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

16 years agoFor PR1338: Rename test dirs
Anton Korobeynikov [Thu, 29 May 2008 19:17:15 +0000 (19:17 +0000)]
For PR1338: Rename test dirs

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

16 years agoRevert part of my last patch that I didn't intend to commit yet.
Owen Anderson [Thu, 29 May 2008 18:35:21 +0000 (18:35 +0000)]
Revert part of my last patch that I didn't intend to commit yet.

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

16 years agoAdd file with warning for backward comptibility. Should be removed after 2.4
Anton Korobeynikov [Thu, 29 May 2008 18:18:15 +0000 (18:18 +0000)]
Add file with warning for backward comptibility. Should be removed after 2.4

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

16 years agoUpdate guards
Anton Korobeynikov [Thu, 29 May 2008 18:17:53 +0000 (18:17 +0000)]
Update guards

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

16 years agoRenumbering needs to account for instruction slot offsets when performing lookups...
Owen Anderson [Thu, 29 May 2008 18:15:49 +0000 (18:15 +0000)]
Renumbering needs to account for instruction slot offsets when performing lookups in the index maps.

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

16 years agoRegenerate
Anton Korobeynikov [Thu, 29 May 2008 17:41:34 +0000 (17:41 +0000)]
Regenerate

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

16 years agoFor PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
Anton Korobeynikov [Thu, 29 May 2008 17:41:17 +0000 (17:41 +0000)]
For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"

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

16 years agoForce postdom to be linked into opt and bugpoint, even though it is no longer used...
Owen Anderson [Thu, 29 May 2008 17:00:13 +0000 (17:00 +0000)]
Force postdom to be linked into opt and bugpoint, even though it is no longer used by any passes.

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

16 years agoMove these tests into the proper directory.
Owen Anderson [Thu, 29 May 2008 16:30:29 +0000 (16:30 +0000)]
Move these tests into the proper directory.

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

16 years agoAdd a newline at the end of this file.
Duncan Sands [Thu, 29 May 2008 14:38:23 +0000 (14:38 +0000)]
Add a newline at the end of this file.

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

16 years agoRe-enable the newly simplified ADCE. This fixes a regression on
Owen Anderson [Thu, 29 May 2008 08:48:21 +0000 (08:48 +0000)]
Re-enable the newly simplified ADCE.  This fixes a regression on
Dhrystone introduced by its removal.

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

16 years agoReplace the old ADCE implementation with a new one that more simply solves
Owen Anderson [Thu, 29 May 2008 08:45:13 +0000 (08:45 +0000)]
Replace the old ADCE implementation with a new one that more simply solves
the one case that ADCE catches that normal DCE doesn't: non-induction variable
loop computations.

This implementation handles this problem without using postdominators.

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

16 years agoImplement vector shift up / down and insert zero with ps{rl}lq / ps{rl}ldq.
Evan Cheng [Thu, 29 May 2008 08:22:04 +0000 (08:22 +0000)]
Implement vector shift up / down and insert zero with ps{rl}lq / ps{rl}ldq.

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

16 years agoRemove debugging code.
Owen Anderson [Thu, 29 May 2008 08:15:48 +0000 (08:15 +0000)]
Remove debugging code.

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

16 years agoAdd nounwind.
Evan Cheng [Thu, 29 May 2008 07:09:24 +0000 (07:09 +0000)]
Add nounwind.

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

16 years agoXOR?RI instructions aren't as cheap as moves.
Bill Wendling [Thu, 29 May 2008 03:46:36 +0000 (03:46 +0000)]
XOR?RI instructions aren't as cheap as moves.

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

16 years agoconvert more operand loops to iterator formulation
Gabor Greif [Thu, 29 May 2008 01:59:18 +0000 (01:59 +0000)]
convert more operand loops to iterator formulation

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

16 years agoImplement "AsCheapAsAMove" for some obviously cheap instructions: xor and the
Bill Wendling [Thu, 29 May 2008 01:02:09 +0000 (01:02 +0000)]
Implement "AsCheapAsAMove" for some obviously cheap instructions: xor and the
like.

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

16 years agoconvert another operand loop to iterator formulation
Gabor Greif [Thu, 29 May 2008 00:51:08 +0000 (00:51 +0000)]
convert another operand loop to iterator formulation

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

16 years agoAdd a flag to indicate that an instruction is as cheap (or cheaper) than a move
Bill Wendling [Wed, 28 May 2008 22:54:52 +0000 (22:54 +0000)]
Add a flag to indicate that an instruction is as cheap (or cheaper) than a move
instruction to execute. This can be used for transformations (like two-address
conversion) to remat an instruction instead of generating a "move"
instruction. The idea is to decrease the live ranges and register pressure and
all that jazz.

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

16 years agoCheck the "isSafeToMove" predicate, which has a series of tests to make sure
Bill Wendling [Wed, 28 May 2008 22:52:47 +0000 (22:52 +0000)]
Check the "isSafeToMove" predicate, which has a series of tests to make sure
that it's safe to remat an instruction.

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

16 years agoRemap VNInfo data as well when doing renumbering.
Owen Anderson [Wed, 28 May 2008 22:40:08 +0000 (22:40 +0000)]
Remap VNInfo data as well when doing renumbering.

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

16 years agoFactor the numbering computation into a separate method, and add the slightest attemp...
Owen Anderson [Wed, 28 May 2008 20:54:50 +0000 (20:54 +0000)]
Factor the numbering computation into a separate method, and add the slightest attempt at some renumbering logic, which is currently unused.

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

16 years agoFix PR2289: vr defined by multiple implicit_def as result of coalescing.
Evan Cheng [Wed, 28 May 2008 17:40:10 +0000 (17:40 +0000)]
Fix PR2289: vr defined by multiple implicit_def as result of coalescing.

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

16 years agoTeach local register allocator to deal with landing pad MBB's.
Evan Cheng [Wed, 28 May 2008 17:22:32 +0000 (17:22 +0000)]
Teach local register allocator to deal with landing pad MBB's.

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

16 years agoUpdate some comments noticed in a recent checkin
Nate Begeman [Wed, 28 May 2008 16:31:36 +0000 (16:31 +0000)]
Update some comments noticed in a recent checkin

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

16 years agoUpdate text to point people at the right version of the tutorial for
Chris Lattner [Wed, 28 May 2008 06:16:08 +0000 (06:16 +0000)]
Update text to point people at the right version of the tutorial for
their release.

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

16 years agoImplement PR2370: memmove(x,x,size) -> noop.
Chris Lattner [Wed, 28 May 2008 05:30:41 +0000 (05:30 +0000)]
Implement PR2370: memmove(x,x,size) -> noop.

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

16 years agoAdd chain inputs for loads.
Chris Lattner [Wed, 28 May 2008 04:25:57 +0000 (04:25 +0000)]
Add chain inputs for loads.

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

16 years agoFix CodeGen/Generic/2005-10-21-longlonggtu.ll on ia64.
Chris Lattner [Wed, 28 May 2008 04:14:30 +0000 (04:14 +0000)]
Fix CodeGen/Generic/2005-10-21-longlonggtu.ll on ia64.

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

16 years agoloads should get chains. THis helps but does not solve CodeGen/Generic/2003-05-27...
Chris Lattner [Wed, 28 May 2008 04:06:52 +0000 (04:06 +0000)]
loads should get chains.  THis helps but does not solve CodeGen/Generic/2003-05-27-phifcmpd.ll
on ia64.

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

16 years agoFix 2006-04-28-Sign-extend-bool.ll for ia64.
Chris Lattner [Wed, 28 May 2008 04:00:06 +0000 (04:00 +0000)]
Fix 2006-04-28-Sign-extend-bool.ll  for ia64.

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

16 years agoreindent.
Chris Lattner [Wed, 28 May 2008 03:59:32 +0000 (03:59 +0000)]
reindent.

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

16 years agoFix the encoding for two more "rm" instructions that were using MRMSrcReg.
Dan Gohman [Wed, 28 May 2008 01:50:19 +0000 (01:50 +0000)]
Fix the encoding for two more "rm" instructions that were using MRMSrcReg.

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

16 years agoFixed X86 encoding error CVTPS2PD and CVTPD2PS when the source operand
Mon P Wang [Wed, 28 May 2008 00:42:27 +0000 (00:42 +0000)]
Fixed X86 encoding error CVTPS2PD and CVTPD2PS when the source operand
is a memory location

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

16 years agoDon't attempt to create VZEXT_LOAD out of an extload. This an issue where the
Nate Begeman [Wed, 28 May 2008 00:24:25 +0000 (00:24 +0000)]
Don't attempt to create VZEXT_LOAD out of an extload.  This an issue where the
code generator would do something like this:

f64 = load f32 <anyext>, f32mem
v2f64 = insertelt undef, %0, 0
v2f64 = insertelt %1, 0.0, 1

into

v2f64 = vzext_load f32mem

which on x86 is movsd, when you really wanted a cvtss2sd/movsd pair.

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

16 years agouse space insted of tabs
Nick Kledzik [Wed, 28 May 2008 00:06:14 +0000 (00:06 +0000)]
use space insted of tabs

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

16 years agofix infinite recursion if a global's initializer references the global
Nick Kledzik [Tue, 27 May 2008 22:07:08 +0000 (22:07 +0000)]
fix infinite recursion if a global's initializer references the global

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

16 years agoMake Use::init() private, it breaks invariants, clients should assign or use set().
Gabor Greif [Tue, 27 May 2008 21:29:38 +0000 (21:29 +0000)]
Make Use::init() private, it breaks invariants, clients should assign or use set().

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

16 years agoUse Function::getEntryBlock instead of Function::begin, for clarity.
Dan Gohman [Tue, 27 May 2008 20:55:29 +0000 (20:55 +0000)]
Use Function::getEntryBlock instead of Function::begin, for clarity.

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

16 years agoPrint debug output when any edge becomes executable, including
Dan Gohman [Tue, 27 May 2008 20:47:30 +0000 (20:47 +0000)]
Print debug output when any edge becomes executable, including
the first visited edge.

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

16 years agoAdd instcombine after global optimizations.
Devang Patel [Tue, 27 May 2008 20:42:44 +0000 (20:42 +0000)]
Add instcombine after global optimizations.

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

16 years agoFix a word-o and add an explicit keyword.
Dan Gohman [Tue, 27 May 2008 20:41:18 +0000 (20:41 +0000)]
Fix a word-o and add an explicit keyword.

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

16 years agoIncorporated feedback: Check that the implicitly defined operands aren't used
Bill Wendling [Tue, 27 May 2008 20:40:52 +0000 (20:40 +0000)]
Incorporated feedback: Check that the implicitly defined operands aren't used
before deleting the instruction.

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

16 years agoTidy up whitespace in ConstantRange::print output.
Dan Gohman [Tue, 27 May 2008 20:29:07 +0000 (20:29 +0000)]
Tidy up whitespace in ConstantRange::print output.

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

16 years agoUse IPSCCPPass instead of IPConstantPropagationPass.
Devang Patel [Tue, 27 May 2008 20:18:45 +0000 (20:18 +0000)]
Use IPSCCPPass instead of IPConstantPropagationPass.

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

16 years agoSpecify a target so that this tests tests what it's intended to test.
Dan Gohman [Tue, 27 May 2008 17:55:57 +0000 (17:55 +0000)]
Specify a target so that this tests tests what it's intended to test.

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

16 years agoMake this test independent of the target-triple; the stack alignment
Dan Gohman [Tue, 27 May 2008 17:44:23 +0000 (17:44 +0000)]
Make this test independent of the target-triple; the stack alignment
is specifically what this test depends on.

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

16 years agoback out last commit: The .cpp file for a module should include its corresponding...
Gabor Greif [Tue, 27 May 2008 17:26:02 +0000 (17:26 +0000)]
back out last commit: The .cpp file for a module should include its corresponding header first, even if redundant.

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

16 years agoUse an explicit llvm:: prefix in the STATISTIC macro, so STATISTIC can still be
Matthijs Kooijman [Tue, 27 May 2008 12:41:24 +0000 (12:41 +0000)]
Use an explicit llvm:: prefix in the STATISTIC macro, so STATISTIC can still be
used when "using namespace llvm" is not in effect.

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

16 years agoFix some constructs that gcc-4.4 warns about.
Duncan Sands [Tue, 27 May 2008 11:50:51 +0000 (11:50 +0000)]
Fix some constructs that gcc-4.4 warns about.

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

16 years agoprune unneeded #includes
Gabor Greif [Tue, 27 May 2008 11:06:03 +0000 (11:06 +0000)]
prune unneeded #includes

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

16 years agoremove unneeded reinterpret_casts
Gabor Greif [Tue, 27 May 2008 11:03:29 +0000 (11:03 +0000)]
remove unneeded reinterpret_casts

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

16 years agoWe have the correct headers included to know that BB isa Value. No reinterpret_cast...
Gabor Greif [Tue, 27 May 2008 10:48:39 +0000 (10:48 +0000)]
We have the correct headers included to know that BB isa Value. No reinterpret_cast necessary.

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

16 years agoRemove ADCE from the optimization pipeline.
Owen Anderson [Tue, 27 May 2008 04:27:27 +0000 (04:27 +0000)]
Remove ADCE from the optimization pipeline.

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

16 years agoInequalityGraph::node() can create new nodes, invalidating iterators across
Nick Lewycky [Tue, 27 May 2008 00:59:05 +0000 (00:59 +0000)]
InequalityGraph::node() can create new nodes, invalidating iterators across
the set of nodes. Fix makeEqual to handle this by creating the new node first
then iterating across them second.

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

16 years agoGrammaro.
Nick Lewycky [Mon, 26 May 2008 22:49:36 +0000 (22:49 +0000)]
Grammaro.

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

16 years agoeliminate calls to deprecated Use::init() interface
Gabor Greif [Mon, 26 May 2008 21:33:52 +0000 (21:33 +0000)]
eliminate calls to deprecated Use::init() interface

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

16 years agoWhoops -- forgot PR reference on this test.
Nick Lewycky [Mon, 26 May 2008 20:23:33 +0000 (20:23 +0000)]
Whoops -- forgot PR reference on this test.

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

16 years agoThe Linux ABI emits an extra "movl %esp, %ebp" in function prologue and
Nick Lewycky [Mon, 26 May 2008 20:18:56 +0000 (20:18 +0000)]
The Linux ABI emits an extra "movl %esp, %ebp" in function prologue and
sometimes a "mov %ebp, %esp" in the epilogue.

Force these tests that rely on counting 'mov' to use i686-apple-darwin8.8.0
where they were written.

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

16 years agoFactor code to copy global value attributes like
Duncan Sands [Mon, 26 May 2008 19:58:59 +0000 (19:58 +0000)]
Factor code to copy global value attributes like
the section or the visibility from one global
value to another: copyAttributesFrom.  This is
particularly useful for duplicating functions:
previously this was done by explicitly copying
each attribute in turn at each place where a
new function was created out of an old one, with
the result that obscure attributes were regularly
forgotten (like the collector or the section).
Hopefully now everything is uniform and nothing
is forgotten.

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

16 years agoUse a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about...
Owen Anderson [Mon, 26 May 2008 10:07:43 +0000 (10:07 +0000)]
Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about a third.

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

16 years agoThe enabling of remat in 2-address conversion breaks this test:
Bill Wendling [Mon, 26 May 2008 05:49:49 +0000 (05:49 +0000)]
The enabling of remat in 2-address conversion breaks this test:

Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
Failed with exit(1) at line 1
while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |&  grep {1 .*folded into instructions}
child process exited abnormally

Make this conditional for now.

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

16 years agoA problem that's exposed when machine LICM is enabled. Consider this code:
Bill Wendling [Mon, 26 May 2008 05:18:34 +0000 (05:18 +0000)]
A problem that's exposed when machine LICM is enabled. Consider this code:

LBB1_3:   # bb
...
        xorl    %ebp, %ebp
        subl    (%ebx), %ebp
...
        incl    %ecx
        cmpl    %edi, %ecx
        jl      LBB1_3  # bb

Whe using machine LICM, LLVM converts it into:

        xorl %esi, %esi
LBB1_3: # bb
...
        movl    %esi, %ebp
        subl    (%ebx), %ebp
...
        incl    %ecx
        cmpl    %edi, %ecx
        jl      LBB1_3  # bb

Two address conversion inserts the copy instruction. However, it's cheaper to
rematerialize it, and remat helps reduce register pressure.

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

16 years agoUse {} instead of "" in RUN lines.
Nick Lewycky [Mon, 26 May 2008 01:27:08 +0000 (01:27 +0000)]
Use {} instead of "" in RUN lines.

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

16 years agoDon't treat values as signed when looking at loop steppings in HowForToNonZero.
Nick Lewycky [Sun, 25 May 2008 23:43:32 +0000 (23:43 +0000)]
Don't treat values as signed when looking at loop steppings in HowForToNonZero.

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

16 years ago"ret (constexpr)" can't be folded into a Constant. Add a method to
Nick Lewycky [Sun, 25 May 2008 20:56:15 +0000 (20:56 +0000)]
"ret (constexpr)" can't be folded into a Constant. Add a method to
Analysis/ConstantFolding to fold ConstantExpr's, then make instcombine use it
to try to use targetdata to fold constant expressions on void instructions.

Also extend the icmp(inttoptr, inttoptr) folding to handle the case where
int size != ptr size.

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

16 years agoCreate archives with the same permissions are ar.
Owen Anderson [Sat, 24 May 2008 05:42:29 +0000 (05:42 +0000)]
Create archives with the same permissions are ar.

Patch by Mikael Lepistö.

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

16 years agoFix win32 when no bison is around, PR2331, patch by 'hume'.
Chris Lattner [Sat, 24 May 2008 05:11:48 +0000 (05:11 +0000)]
Fix win32 when no bison is around, PR2331, patch by 'hume'.

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

16 years agoAdd FreeBSD/PPC support, patch by Marcel Moolenaar!
Chris Lattner [Sat, 24 May 2008 04:58:48 +0000 (04:58 +0000)]
Add FreeBSD/PPC support, patch by Marcel Moolenaar!

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

16 years agoFix a serious brain-o. Obviously no-one reviewed my patch :(
Chris Lattner [Sat, 24 May 2008 04:06:28 +0000 (04:06 +0000)]
Fix a serious brain-o.  Obviously no-one reviewed my patch :(

This fixes PR2359

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

16 years agoFix PR2358 by resolving calls with undef arguments to overdefined.
Chris Lattner [Sat, 24 May 2008 03:59:33 +0000 (03:59 +0000)]
Fix PR2358 by resolving calls with undef arguments to overdefined.

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

16 years agoEliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq.
Evan Cheng [Sat, 24 May 2008 02:56:30 +0000 (02:56 +0000)]
Eliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq.

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

16 years agoEliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and x86.sse2.unpckl...
Evan Cheng [Sat, 24 May 2008 02:14:05 +0000 (02:14 +0000)]
Eliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and x86.sse2.unpckl.pd intrinsics. These will be lowered into shuffles.

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

16 years agoTweak how ConstantFP80Ty constants are output
Duncan Sands [Sat, 24 May 2008 01:00:52 +0000 (01:00 +0000)]
Tweak how ConstantFP80Ty constants are output
so that gcc doesn't warn about them.

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

16 years agoPut initialized const weak objects into correct
Dale Johannesen [Sat, 24 May 2008 00:10:20 +0000 (00:10 +0000)]
Put initialized const weak objects into correct
sections on ppc32 darwin.  g++.dg/abi/key2.C

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

16 years agoThis is done.
Evan Cheng [Sat, 24 May 2008 00:10:13 +0000 (00:10 +0000)]
This is done.

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

16 years agoNew loadl_pd and loadh_pd tests.
Evan Cheng [Sat, 24 May 2008 00:10:02 +0000 (00:10 +0000)]
New loadl_pd and loadh_pd tests.

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

16 years agoAutoupgrade x86.sse2.loadh.pd and x86.sse2.loadl.pd.
Evan Cheng [Sat, 24 May 2008 00:08:39 +0000 (00:08 +0000)]
Autoupgrade x86.sse2.loadh.pd and x86.sse2.loadl.pd.

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

16 years agoRemove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and...
Evan Cheng [Sat, 24 May 2008 00:07:29 +0000 (00:07 +0000)]
Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions.

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

16 years agoRemove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and...
Evan Cheng [Sat, 24 May 2008 00:07:06 +0000 (00:07 +0000)]
Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions.

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

16 years agoDocument common linkage.
Dale Johannesen [Fri, 23 May 2008 23:13:41 +0000 (23:13 +0000)]
Document common linkage.

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

16 years agoRevert 51440 as it breaks a bunch of PIC tests.
Evan Cheng [Fri, 23 May 2008 23:00:04 +0000 (23:00 +0000)]
Revert 51440 as it breaks a bunch of PIC tests.

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

16 years agolabel is a first-class type.
Dan Gohman [Fri, 23 May 2008 22:50:26 +0000 (22:50 +0000)]
label is a first-class type.

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

16 years agoIt turns out there are only 3 non-first-class type kinds left now, so
Dan Gohman [Fri, 23 May 2008 22:47:52 +0000 (22:47 +0000)]
It turns out there are only 3 non-first-class type kinds left now, so
it's simpler for isFirstClassType to use a negative test.

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

16 years agoRemove a bogus svn:mime-type property.
Dan Gohman [Fri, 23 May 2008 22:27:01 +0000 (22:27 +0000)]
Remove a bogus svn:mime-type property.

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

16 years agoUpdate the description of first-class types to reflect that
Dan Gohman [Fri, 23 May 2008 21:53:15 +0000 (21:53 +0000)]
Update the description of first-class types to reflect that
structs and arrays are now first-class. And fix a sentance
fragment in the insertvalue description. Thanks to Chris
for pointing these out!

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

16 years agoDon't silently truncate array extents to 32 bits.
Dan Gohman [Fri, 23 May 2008 21:40:55 +0000 (21:40 +0000)]
Don't silently truncate array extents to 32 bits.

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

16 years agoAdd a missed CommonLinkage check.
Dale Johannesen [Fri, 23 May 2008 21:33:27 +0000 (21:33 +0000)]
Add a missed CommonLinkage check.

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

16 years agoUse movlps / movhps to modify low / high half of 16-byet memory location.
Evan Cheng [Fri, 23 May 2008 21:23:16 +0000 (21:23 +0000)]
Use movlps / movhps to modify low / high half of 16-byet memory location.

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

16 years agoRemove lingering references to .llx and .tr in the tests.
Dan Gohman [Fri, 23 May 2008 21:15:35 +0000 (21:15 +0000)]
Remove lingering references to .llx and .tr in the tests.

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

16 years agoTidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
Dan Gohman [Fri, 23 May 2008 21:05:58 +0000 (21:05 +0000)]
Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
use it instead of duplicating its functionality.

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