oota-llvm.git
16 years agoConstified operator<< in APSInt.
Ted Kremenek [Fri, 8 Feb 2008 07:14:19 +0000 (07:14 +0000)]
Constified operator<< in APSInt.

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

16 years agoAvoid needlessly casting away const qualifiers.
Dan Gohman [Fri, 8 Feb 2008 03:29:40 +0000 (03:29 +0000)]
Avoid needlessly casting away const qualifiers.

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

16 years agoAvoid needlessly casting away const qualifiers.
Dan Gohman [Fri, 8 Feb 2008 03:26:46 +0000 (03:26 +0000)]
Avoid needlessly casting away const qualifiers.

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

16 years agoAdded missing entries in X86 load / store folding tables.
Evan Cheng [Fri, 8 Feb 2008 00:12:56 +0000 (00:12 +0000)]
Added missing entries in X86 load / store folding tables.

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

16 years agoBegin setting features for target based on target triple string.
Devang Patel [Thu, 7 Feb 2008 22:32:50 +0000 (22:32 +0000)]
Begin setting features for target based on target triple string.

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

16 years agoRemove remnant of load folding in local register allocator. Patch by Holger Schurig.
Evan Cheng [Thu, 7 Feb 2008 19:46:55 +0000 (19:46 +0000)]
Remove remnant of load folding in local register allocator. Patch by Holger Schurig.

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

16 years agoFollow Chris' suggestion; change the PseudoSourceValue accessors
Dan Gohman [Thu, 7 Feb 2008 18:41:25 +0000 (18:41 +0000)]
Follow Chris' suggestion; change the PseudoSourceValue accessors
to return pointers instead of references, since this is always what
is needed.

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

16 years agoAdd SourceValue information for outgoing argument stores on x86.
Dan Gohman [Thu, 7 Feb 2008 16:28:05 +0000 (16:28 +0000)]
Add SourceValue information for outgoing argument stores on x86.

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

16 years agoDon't abort if a MemOperand is missing a SourceValue; just print it
Dan Gohman [Thu, 7 Feb 2008 16:18:00 +0000 (16:18 +0000)]
Don't abort if a MemOperand is missing a SourceValue; just print it
as <unknown>. And make some minor adjustments to the MemOperand
dump format.

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

16 years agoFix a x86-64 codegen deficiency. Allow gv + offset when using rip addressing mode.
Evan Cheng [Thu, 7 Feb 2008 08:53:49 +0000 (08:53 +0000)]
Fix a x86-64 codegen deficiency. Allow gv + offset when using rip addressing mode.
Before:
_main:
        subq    $8, %rsp
        leaq    _X(%rip), %rax
        movsd   8(%rax), %xmm1
        movss   _X(%rip), %xmm0
        call    _t
        xorl    %ecx, %ecx
        movl    %ecx, %eax
        addq    $8, %rsp
        ret
Now:
_main:
        subq    $8, %rsp
        movsd   _X+8(%rip), %xmm1
        movss   _X(%rip), %xmm0
        call    _t
        xorl    %ecx, %ecx
        movl    %ecx, %eax
        addq    $8, %rsp
        ret

Notice there is another idiotic codegen issue that needs to be fixed asap:
xorl    %ecx, %ecx
movl    %ecx, %eax

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

16 years agoIn some cases, e.g. ADD32ri, no transformation is made. Guide against it.
Evan Cheng [Thu, 7 Feb 2008 08:29:53 +0000 (08:29 +0000)]
In some cases, e.g. ADD32ri, no transformation is made. Guide against it.

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

16 years agoDon't make up new directives. (".set_foobar")
Nick Lewycky [Thu, 7 Feb 2008 06:36:26 +0000 (06:36 +0000)]
Don't make up new directives. (".set_foobar")

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

16 years agoFix a typo in a comment.
Dan Gohman [Thu, 7 Feb 2008 02:30:40 +0000 (02:30 +0000)]
Fix a typo in a comment.

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

16 years agoAdd support to FoldingSet for hashing APInt objects.
Dan Gohman [Wed, 6 Feb 2008 23:09:15 +0000 (23:09 +0000)]
Add support to FoldingSet for hashing APInt objects.

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

16 years agoRe-apply the memory operand changes, with a fix for the static
Dan Gohman [Wed, 6 Feb 2008 22:27:42 +0000 (22:27 +0000)]
Re-apply the memory operand changes, with a fix for the static
initializer problem, a minor tweak to the way the
DAGISelEmitter finds load/store nodes, and a renaming of the
new PseudoSourceValue objects.

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

16 years agoIt's PR1925, not PR1609.
Evan Cheng [Wed, 6 Feb 2008 22:07:17 +0000 (22:07 +0000)]
It's PR1925, not PR1609.

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

16 years agoTemporarily reverting:
Bill Wendling [Wed, 6 Feb 2008 20:03:07 +0000 (20:03 +0000)]
Temporarily reverting:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080128/057882.html

This is causing a miscompilation on PPC G5 and just now seeing it on iMac x86-64.

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

16 years agoFix a number of local register allocator issues: PR1609.
Evan Cheng [Wed, 6 Feb 2008 19:16:53 +0000 (19:16 +0000)]
Fix a number of local register allocator issues: PR1609.

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

16 years agosome more notes.
Chris Lattner [Wed, 6 Feb 2008 18:32:06 +0000 (18:32 +0000)]
some more notes.

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

16 years agomake it clear :)
Chris Lattner [Wed, 6 Feb 2008 18:00:48 +0000 (18:00 +0000)]
make it clear :)

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

16 years agoadd a bunch of random notes and fix some issues noticed by Gabor.
Chris Lattner [Wed, 6 Feb 2008 18:00:06 +0000 (18:00 +0000)]
add a bunch of random notes and fix some issues noticed by Gabor.

This is not ready for review or hacking, this is a work in progress :)

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

16 years agoRegAllocaLocal still *requires* LiveVariables since it runs PHIElimination, followed...
Evan Cheng [Wed, 6 Feb 2008 08:00:32 +0000 (08:00 +0000)]
RegAllocaLocal still *requires* LiveVariables since it runs PHIElimination, followed by TwoAddress which requires LiveVariables. We cannot run LiveVariables on non-SSA code.

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

16 years agoa starter shell for 2.2 release notes
Chris Lattner [Wed, 6 Feb 2008 06:30:34 +0000 (06:30 +0000)]
a starter shell for 2.2 release notes

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

16 years agoThrottle the non-local dependence analysis for basic blocks with more than 50 predece...
Tanya Lattner [Wed, 6 Feb 2008 00:54:55 +0000 (00:54 +0000)]
Throttle the non-local dependence analysis for basic blocks with more than 50 predecessors. Added command line option to play with this threshold.

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

16 years agoDon't dereference an invalid pointer if string is empty.
Anton Korobeynikov [Tue, 5 Feb 2008 23:34:40 +0000 (23:34 +0000)]
Don't dereference an invalid pointer if string is empty.

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

16 years agoFix PR1975: dag isel emitter produces patterns that isel wrong flag result.
Evan Cheng [Tue, 5 Feb 2008 22:50:29 +0000 (22:50 +0000)]
Fix PR1975: dag isel emitter produces patterns that isel wrong flag result.

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

16 years agoMove to getCALLSEQ_END to ensure CALLSEQ_END node produces a flag. This is consistent...
Evan Cheng [Tue, 5 Feb 2008 22:44:06 +0000 (22:44 +0000)]
Move to getCALLSEQ_END to ensure CALLSEQ_END node produces a flag. This is consistent with the definition in td file.

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

16 years agoMake RenamePass faster by making the 'is this a new phi node'
Chris Lattner [Tue, 5 Feb 2008 21:26:23 +0000 (21:26 +0000)]
Make RenamePass faster by making the 'is this a new phi node'
check more intelligent.  This speeds up mem2reg from 5.29s to
0.79s on a synthetic testcase with tons of predecessors and
phi nodes.

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

16 years agoImplement sseregparm.
Dale Johannesen [Tue, 5 Feb 2008 20:46:33 +0000 (20:46 +0000)]
Implement sseregparm.

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

16 years agoIf a vr is already marked alive in a bb, then it has PHI uses that are visited earlie...
Evan Cheng [Tue, 5 Feb 2008 20:04:18 +0000 (20:04 +0000)]
If a vr is already marked alive in a bb, then it has PHI uses that are visited earlier, then it is not killed in the def block (i.e. not dead).

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

16 years agoregenerate
Chris Lattner [Tue, 5 Feb 2008 19:43:53 +0000 (19:43 +0000)]
regenerate

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

16 years agoMake the check for GCC version more robust, fix shared library
Chris Lattner [Tue, 5 Feb 2008 19:43:40 +0000 (19:43 +0000)]
Make the check for GCC version more robust, fix shared library
dependencies in makefile, and fix llvm_cv_no_link_all_option
on darwin.

Patch by Shantonu Sen, more info here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012410.html

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

16 years agoAdded FoldingSet profiling support to ImmutableSet.
Ted Kremenek [Tue, 5 Feb 2008 18:50:25 +0000 (18:50 +0000)]
Added FoldingSet profiling support to ImmutableSet.

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

16 years agoChanged profiling method for ImmutableMap to once again just use its
Ted Kremenek [Tue, 5 Feb 2008 17:30:43 +0000 (17:30 +0000)]
Changed profiling method for ImmutableMap to once again just use its
unique ImutAVLTree* for profiling.

Modified ImutAVLTree:
 (1) changed ComputeHash() to ComputeDigest() and
 (2) changed Profile() to use the computed digest and
 (3) modified insertion of IMutAVLTree into the FoldingSet owned by
     the ImutAVLTreeFactory object to use profiling instead of computing
     a direct hash.  This fixes a bug where our abuse of the FoldingSet would
     not work when the FoldingSet was resized.

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

16 years agoIdent mnemonics appropriately
Nate Begeman [Tue, 5 Feb 2008 08:49:09 +0000 (08:49 +0000)]
Ident mnemonics appropriately

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

16 years agodump the module *before* we delete it, not after.
Chris Lattner [Tue, 5 Feb 2008 06:18:42 +0000 (06:18 +0000)]
dump the module *before* we delete it, not after.

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

16 years agoFix a bug compiling PR1978 (perhaps not the only one though) which
Chris Lattner [Tue, 5 Feb 2008 04:45:32 +0000 (04:45 +0000)]
Fix a bug compiling PR1978 (perhaps not the only one though) which
was incorrectly simplifying "x == (gep x, 1, i)" into false, even
though i could be negative.  As it turns out, all the code to
handle this already existed, we just need to disable the incorrect
optimization case and let the general case handle it.

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

16 years agoFix an obscure read-after-free bug that Duncan found.
Owen Anderson [Tue, 5 Feb 2008 04:34:03 +0000 (04:34 +0000)]
Fix an obscure read-after-free bug that Duncan found.

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

16 years agoMissed one.
Dale Johannesen [Tue, 5 Feb 2008 01:12:10 +0000 (01:12 +0000)]
Missed one.

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

16 years agoThis should also work on x86 now.
Evan Cheng [Tue, 5 Feb 2008 00:25:31 +0000 (00:25 +0000)]
This should also work on x86 now.

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

16 years agoUnbreak teh build.
Evan Cheng [Tue, 5 Feb 2008 00:25:13 +0000 (00:25 +0000)]
Unbreak teh build.

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

16 years agoDo not unconditionally redefine vec_ext_v16qi and
Dale Johannesen [Mon, 4 Feb 2008 23:27:29 +0000 (23:27 +0000)]
Do not unconditionally redefine vec_ext_v16qi and
vec_ext_v4si builtins.  This is a hack; they should
be defined here, then resolved in the X86 BE.
However there is enough other stuff missing in the
X86 BE for SSE41 that this will do for now.

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

16 years agoTypo.
Evan Cheng [Mon, 4 Feb 2008 23:10:38 +0000 (23:10 +0000)]
Typo.

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

16 years agoDwarf requires variable entries to be in the source order. Right now, since we are...
Evan Cheng [Mon, 4 Feb 2008 23:06:48 +0000 (23:06 +0000)]
Dwarf requires variable entries to be in the source order. Right now, since we are recording variable information at isel time this means parameters would appear in the reverse order. The short term fix is to issue recordVariable() at asm printing time instead.

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

16 years agoThis method should be virtual
Nate Begeman [Mon, 4 Feb 2008 23:04:24 +0000 (23:04 +0000)]
This method should be virtual

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

16 years agoEliminate some redundant code.
Nate Begeman [Mon, 4 Feb 2008 21:44:06 +0000 (21:44 +0000)]
Eliminate some redundant code.

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

16 years agoModified 'Profile' method of ImmutableMap to use the 'Profile' method
Ted Kremenek [Mon, 4 Feb 2008 21:17:02 +0000 (21:17 +0000)]
Modified 'Profile' method of ImmutableMap to use the 'Profile' method
of the contained ImutAVLTree root.

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

16 years agoDo not set time out, lets assume assembler will do its job in reasonable amount of...
Devang Patel [Mon, 4 Feb 2008 21:16:10 +0000 (21:16 +0000)]
Do not set time out, lets assume assembler will do its job in reasonable amount of time.

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

16 years agoModified node creation of ImutAVLTree to do a hash lookup for an existing
Ted Kremenek [Mon, 4 Feb 2008 21:15:24 +0000 (21:15 +0000)]
Modified node creation of ImutAVLTree to do a hash lookup for an existing
node in the FoldingSet of nodes held by the Factory object.  If we
we find a node with a matching hash, we do a full structural comparison.
Nodes are also now inserted into the FoldingSet only when we mark them
Immutable, as their children can change during intermediate-rebalancing.

The 'Profile' method for ImutAVLTree is no longer used when looking up
existing ImutAVLTrees with a given set of contents; instead the Profile method
is used by other clients that wish to insert such a tree into a folding set.
This means that we are not using FoldingSet in ImutAVLTreeFactory in the way
it was intended, but instead are using it as an opaque hashtable.

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

16 years agoAdded "bucket_iterators" to FoldingSet. Bucket iterators allow iteration
Ted Kremenek [Mon, 4 Feb 2008 21:11:17 +0000 (21:11 +0000)]
Added "bucket_iterators" to FoldingSet.  Bucket iterators allow iteration
over all the nodes in a particular bucket.

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

16 years agoSet error message.
Devang Patel [Mon, 4 Feb 2008 20:57:54 +0000 (20:57 +0000)]
Set error message.
Patch by Shantonu Sen.

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

16 years agoCrashes LegalizeTypes with "Do not know how to
Duncan Sands [Mon, 4 Feb 2008 18:07:02 +0000 (18:07 +0000)]
Crashes LegalizeTypes with "Do not know how to
expand the result of this operator!" (node: ctlz).

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

16 years agoCrashes LegalizeTypes with "Do not know how to split
Duncan Sands [Mon, 4 Feb 2008 18:05:42 +0000 (18:05 +0000)]
Crashes LegalizeTypes with "Do not know how to split
this operator's operand" (node: extract_subvector).

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

16 years agoremove target triple to make this test more "generic"
Chris Lattner [Mon, 4 Feb 2008 18:02:37 +0000 (18:02 +0000)]
remove target triple to make this test more "generic"

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

16 years agoFixed 80 col. violation.
Ted Kremenek [Mon, 4 Feb 2008 17:14:20 +0000 (17:14 +0000)]
Fixed 80 col. violation.

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

16 years agoconstified operator~().
Ted Kremenek [Mon, 4 Feb 2008 16:57:26 +0000 (16:57 +0000)]
constified operator~().

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

16 years agoCrashed the new type legalizer. Not likely to catch
Duncan Sands [Mon, 4 Feb 2008 09:40:27 +0000 (09:40 +0000)]
Crashed the new type legalizer.  Not likely to catch
any bugs in the future since to get the crash you also
need hacked in fake libcall support (which creates odd
but legal trees), but since adding it doesn't hurt...
Thanks to Chris for this ultimately reduced version.

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

16 years agoI don't see how NodeUpdated can be called with a
Duncan Sands [Mon, 4 Feb 2008 09:29:17 +0000 (09:29 +0000)]
I don't see how NodeUpdated can be called with a
ReadyToProcess node - add an assertion to check
this.  Add an assertion to NodeDeleted that checks
that processed/ready nodes are indeed not deleted.
It is because they are never deleted that none of
the maps can have a deleted node as the source of
a mapping.  It does however seem to be possible in
theory to have a deleted value as the target of a
mapping, however this has not yet been spotted in
the wild.  Still mulling on what to do about this.
[The theoretical situation is this: a node A is
expanded/promoted/whatever to a newly created node
B.  Thus A->B is added to a map.  When the subtree
rooted at B is legalized it is conceivable that B
is deleted due to RAUW on a node somewhere above
it].

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

16 years agoThe rest of the SSE4.1 intrinsic patterns that are obvious to me. Getting
Nate Begeman [Mon, 4 Feb 2008 06:00:24 +0000 (06:00 +0000)]
The rest of the SSE4.1 intrinsic patterns that are obvious to me.  Getting
Evan's help with the rest.

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

16 years agoSome more SSE 4.1 intrinsic patterns.
Nate Begeman [Mon, 4 Feb 2008 05:34:34 +0000 (05:34 +0000)]
Some more SSE 4.1 intrinsic patterns.

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

16 years agoMake this test more aggressive, to cover recent improvements.
Owen Anderson [Mon, 4 Feb 2008 04:55:24 +0000 (04:55 +0000)]
Make this test more aggressive, to cover recent improvements.

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

16 years agoBe more precise when eliminating pointers bue to memcpy's. This allows more
Owen Anderson [Mon, 4 Feb 2008 04:53:00 +0000 (04:53 +0000)]
Be more precise when eliminating pointers bue to memcpy's.  This allows more
stores to be deleted in some cases.

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

16 years agoAllow GVN to hack on memcpy's, making them open to further optimization.
Owen Anderson [Mon, 4 Feb 2008 02:59:58 +0000 (02:59 +0000)]
Allow GVN to hack on memcpy's, making them open to further optimization.

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

16 years agoTag this test with the PR reference.
Nick Lewycky [Sun, 3 Feb 2008 16:35:19 +0000 (16:35 +0000)]
Tag this test with the PR reference.

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

16 years agoThere are some cases where icmp(add) can be folded into a new icmp. Handle them.
Nick Lewycky [Sun, 3 Feb 2008 16:33:09 +0000 (16:33 +0000)]
There are some cases where icmp(add) can be folded into a new icmp. Handle them.

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

16 years agoHack on vectors too.
Nick Lewycky [Sun, 3 Feb 2008 08:19:11 +0000 (08:19 +0000)]
Hack on vectors too.

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

16 years agoFold away one multiply in instcombine. This would normally be caught in
Nick Lewycky [Sun, 3 Feb 2008 07:42:09 +0000 (07:42 +0000)]
Fold away one multiply in instcombine. This would normally be caught in
reassociate anyways, but they could be generated during instcombine's run.

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

16 years agoFix typo
Chris Lattner [Sun, 3 Feb 2008 07:30:27 +0000 (07:30 +0000)]
Fix typo

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

16 years agoSSE 4.1 Intrinsics and detection
Nate Begeman [Sun, 3 Feb 2008 07:18:54 +0000 (07:18 +0000)]
SSE 4.1 Intrinsics and detection

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

16 years agohandle the case where a node can become ready to process
Chris Lattner [Sun, 3 Feb 2008 07:13:32 +0000 (07:13 +0000)]
handle the case where a node can become ready to process
multiple times due to a RAUW.

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

16 years agoUse the new infrastructure for listening to node updates to
Chris Lattner [Sun, 3 Feb 2008 07:08:51 +0000 (07:08 +0000)]
Use the new infrastructure for listening to node updates to
keep the LegalizeTypes node flags up to date when doing a RAUW.
This fixes a nasty bug that Duncan ran into and makes the
previous (nonbuggy case) more efficent.

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

16 years agothe world doesn't need my debugging code.
Chris Lattner [Sun, 3 Feb 2008 07:01:05 +0000 (07:01 +0000)]
the world doesn't need my debugging code.

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

16 years agoChange the 'global modification' APIs in SelectionDAG to take a new
Chris Lattner [Sun, 3 Feb 2008 06:49:24 +0000 (06:49 +0000)]
Change the 'global modification' APIs in SelectionDAG to take a new
DAGUpdateListener object pointer instead of just returning a vector
of deleted nodes.  This makes the interfaces more efficient (no more
allocating a vector [at least a malloc], filling it in, then walking
it) and more clean.  This also allows the client to be notified of
nodes that are *changed* but not deleted.

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

16 years agoexplicitly include Compiler.h instead of getting it from tblgen in the middle of...
Chris Lattner [Sun, 3 Feb 2008 05:43:57 +0000 (05:43 +0000)]
explicitly include Compiler.h instead of getting it from tblgen in the middle of a class.

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

16 years agoGeneralize the SDOperand->SDOperand form of
Chris Lattner [Sun, 3 Feb 2008 03:35:22 +0000 (03:35 +0000)]
Generalize the SDOperand->SDOperand form of
SelectionDAG::ReplaceAllUsesWith to handle replacement of
an SDOperand with *any* sdoperand, not just one for a node with
a single result.  Note that this has a horrible FIXME'd hack in it
to work around PR1975.  This should be removed when PR1975 is fixed.

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

16 years agodon't do ReplaceUses on a result that doesn't exist.
Chris Lattner [Sun, 3 Feb 2008 03:20:59 +0000 (03:20 +0000)]
don't do ReplaceUses on a result that doesn't exist.

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

16 years agoadd a -view-legalize-types-dags option, for viewing the dags going into legalize...
Chris Lattner [Sun, 3 Feb 2008 02:05:04 +0000 (02:05 +0000)]
add a -view-legalize-types-dags option, for viewing the dags going into legalize types.

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

16 years agoGet rid of the annoying blank lines before labels.
Evan Cheng [Sat, 2 Feb 2008 08:39:46 +0000 (08:39 +0000)]
Get rid of the annoying blank lines before labels.

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

16 years agoDon't use uninitialized values. Fixes vec_align.ll on X86 Linux.
Nick Lewycky [Sat, 2 Feb 2008 08:29:58 +0000 (08:29 +0000)]
Don't use uninitialized values. Fixes vec_align.ll on X86 Linux.

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

16 years agoUnbreak ppc debug support.
Evan Cheng [Sat, 2 Feb 2008 05:06:29 +0000 (05:06 +0000)]
Unbreak ppc debug support.

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

16 years agoSDIsel processes llvm.dbg.declare by recording the variable debug information descrip...
Evan Cheng [Sat, 2 Feb 2008 04:07:54 +0000 (04:07 +0000)]
SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.

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

16 years agoAdd comment explaining what is lower level analysis pass.
Devang Patel [Sat, 2 Feb 2008 01:43:30 +0000 (01:43 +0000)]
Add comment explaining what is lower level analysis pass.

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

16 years agoDo not strip symbols when EH is ON.
Devang Patel [Sat, 2 Feb 2008 01:32:38 +0000 (01:32 +0000)]
Do not strip symbols when EH is ON.

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

16 years agoFixing a bug creating floating point constants of type other
Gordon Henriksen [Sat, 2 Feb 2008 01:07:50 +0000 (01:07 +0000)]
Fixing a bug creating floating point constants of type other
than double through the C bindings. Thanks to Tomas Lindquist
Olsen for reporting it.

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

16 years agoFrame index can be negative.
Evan Cheng [Sat, 2 Feb 2008 00:17:00 +0000 (00:17 +0000)]
Frame index can be negative.

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

16 years agoCBackend: Implement unaligned load/store.
Lauro Ramos Venancio [Fri, 1 Feb 2008 21:25:59 +0000 (21:25 +0000)]
CBackend: Implement unaligned load/store.

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

16 years agoDon't drop function/call return attributes like 'nounwind'.
Duncan Sands [Fri, 1 Feb 2008 20:37:16 +0000 (20:37 +0000)]
Don't drop function/call return attributes like 'nounwind'.

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

16 years agoUpdate llvm.dbg.func.start.
Evan Cheng [Fri, 1 Feb 2008 09:12:11 +0000 (09:12 +0000)]
Update llvm.dbg.func.start.

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

16 years agoRemove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implie...
Evan Cheng [Fri, 1 Feb 2008 09:10:45 +0000 (09:10 +0000)]
Remove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before.

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

16 years agoRename RecordLabel to RecordSourceLine because that's what it is doing.
Evan Cheng [Fri, 1 Feb 2008 02:05:57 +0000 (02:05 +0000)]
Rename RecordLabel to RecordSourceLine because that's what it is doing.

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

16 years agoAdd convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov!
Anton Korobeynikov [Thu, 31 Jan 2008 23:02:33 +0000 (23:02 +0000)]
Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov!

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

16 years agoRevert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.
Evan Cheng [Thu, 31 Jan 2008 21:00:00 +0000 (21:00 +0000)]
Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.

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

16 years agoChris' change to print an approximation to long doubles
Dale Johannesen [Thu, 31 Jan 2008 18:34:01 +0000 (18:34 +0000)]
Chris' change to print an approximation to long doubles
exposed a bug in APFloat's long double->double conversion of
NaNs.  Broke several things in the ieee part of gcc testsuite.

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

16 years agoReapply the patch with fix.
Anton Korobeynikov [Thu, 31 Jan 2008 17:43:25 +0000 (17:43 +0000)]
Reapply the patch with fix.

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

16 years agorevert anton's recent stringmap patch, which breaks clang.
Chris Lattner [Thu, 31 Jan 2008 17:24:51 +0000 (17:24 +0000)]
revert anton's recent stringmap patch, which breaks clang.

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

16 years agoMake StringMap to be more STL'ish. Patch by Mikhail Glushenkov!
Anton Korobeynikov [Thu, 31 Jan 2008 12:30:40 +0000 (12:30 +0000)]
Make StringMap to be more STL'ish. Patch by Mikhail Glushenkov!

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

16 years agoWhitespace cleanup
Anton Korobeynikov [Thu, 31 Jan 2008 12:10:41 +0000 (12:10 +0000)]
Whitespace cleanup

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

16 years agoAdd a comment for a nasty short term hack.
Evan Cheng [Thu, 31 Jan 2008 10:05:13 +0000 (10:05 +0000)]
Add a comment for a nasty short term hack.

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

16 years agoAdd an extra operand to LABEL nodes which distinguishes between debug, EH, or misc...
Evan Cheng [Thu, 31 Jan 2008 09:59:15 +0000 (09:59 +0000)]
Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.

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

16 years agoAllow ComplexExpressions in InstrInfo.td files to be slightly more... complex! Comple...
Christopher Lamb [Thu, 31 Jan 2008 07:27:46 +0000 (07:27 +0000)]
Allow ComplexExpressions in InstrInfo.td files to be slightly more... complex! ComplexExpressions can now have attributes which affect how TableGen interprets
the pattern when generating matchin code.

The first (and currently, only) attribute causes the immediate parent node of the ComplexPattern operand to be passed into the matching code rather than the node at the root of the entire DAG containing the pattern.

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