Commit Graph

15472 Commits

Author SHA1 Message Date
Chris Lattner
4c7b07a66f Expose method and ivars for measuring inline asm length properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:50:07 +00:00
Andrew Lenharth
7445ea6b17 Move some warnings to debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30933 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:38:22 +00:00
Rafael Espindola
33d06bcfd4 add FNEGS and FNEGD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30932 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:37:35 +00:00
Chris Lattner
0eff5ad3db Fix another dtor issue. The function local statics in this function were
being destroyed at inconvenient times.  Switch to using non-local ManagedStatic
objects, which actually also speeds up ConstRules::get.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:22:21 +00:00
Rafael Espindola
5395538307 add SBCS and SUBS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30930 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:19:20 +00:00
Rafael Espindola
26a76d1024 implement calls to functions that return long
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30929 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 16:47:22 +00:00
Rafael Espindola
42b62f3f81 implement unordered floating point compares
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30928 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 13:14:59 +00:00
Jim Laskey
339ec4cb15 Workaround for templates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30927 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 13:02:19 +00:00
Jim Laskey
774f85465e Clean up dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30926 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 13:01:34 +00:00
Chris Lattner
efa3da5593 avoid a ctor/dtor issue with the ProgramName global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 00:06:24 +00:00
Chris Lattner
500d8bff20 shrink anon-ns and mark stuff static. No functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30922 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 22:09:17 +00:00
Chris Lattner
15bdc96c5b add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 22:01:26 +00:00
Chris Lattner
26d2990e03 Lower X%C into X/C+stuff. This allows the 'division by a constant' logic to
apply to rems as well as divs.  This fixes PR945 and speeds up ReedSolomon
from 14.57s to 10.90s (which is now faster than gcc).

It compiles CodeGen/X86/rem.ll into:

_test1:
        subl $4, %esp
        movl %esi, (%esp)
        movl $2155905153, %ecx
        movl 8(%esp), %esi
        movl %esi, %eax
        imull %ecx
        addl %esi, %edx
        movl %edx, %eax
        shrl $31, %eax
        sarl $7, %edx
        addl %eax, %edx
        imull $255, %edx, %eax
        subl %eax, %esi
        movl %esi, %eax
        movl (%esp), %esi
        addl $4, %esp
        ret
_test2:
        movl 4(%esp), %eax
        movl %eax, %ecx
        sarl $31, %ecx
        shrl $24, %ecx
        addl %eax, %ecx
        andl $4294967040, %ecx
        subl %ecx, %eax
        ret
_test3:
        subl $4, %esp
        movl %esi, (%esp)
        movl $2155905153, %ecx
        movl 8(%esp), %esi
        movl %esi, %eax
        mull %ecx
        shrl $7, %edx
        imull $255, %edx, %eax
        subl %eax, %esi
        movl %esi, %eax
        movl (%esp), %esi
        addl $4, %esp
        ret

instead of div/idiv instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30920 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:58:32 +00:00
Evan Cheng
130a6471b9 Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:34:05 +00:00
Chris Lattner
3657ffe037 add a minor dag combine noticed when looking at PR945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30915 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:23:19 +00:00
Evan Cheng
494cec6e58 Doh. This wasn't causing problems by luck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30914 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 19:13:59 +00:00
Evan Cheng
cf12ec4897 Some X86ISD::CMP were created with wrong ValueType's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30913 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 19:12:56 +00:00
Chris Lattner
f0edc6c18b Fix massive resource leaks in the bytecode reader. Reading a bytecode file
with ParseBytecodeFile used to leak both a ModuleProvider (and related
bytecode parser stuff attached to it) AND a file descriptor, which was
never closed.  This prevented gccld/llvm-ld/llvm-link from linking together
apps with more that ~252 .bc files on darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30912 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 18:32:30 +00:00
Chris Lattner
65d8c1e8d4 mark call adjustments as modifying the SP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30911 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 18:00:26 +00:00
Chris Lattner
93b8e490c4 adjcallstack up/down clobbers the sp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30910 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 18:00:14 +00:00
Chris Lattner
740c2e0799 adjcallstackup/down clobbers the stack pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 17:57:58 +00:00
Chris Lattner
1e5e97462b mark adjcallstack up/down as clobbering and using the SP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30908 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 17:56:34 +00:00
Chris Lattner
33e4869ba0 Move the Imp tblgen class from the X86 backend to common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30907 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 17:49:27 +00:00
Chris Lattner
6ec3626be4 restore my previous patch, now that the X86 backend bug has been fixed:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061009/038518.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30906 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 17:45:38 +00:00
Chris Lattner
f18c074e1b Mark ADJCALLSTACKUP/DOWN as clobbering ESP so that virtregmap will notice
that it can't assume ESP is unmodified across the instrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30905 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 17:42:56 +00:00
Jim Laskey
3ad175bd70 D'oh - need to use the rigth kind of store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30903 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 15:22:24 +00:00
Evan Cheng
b870100f2a Backing out Chris' last commit. It's breaking llvm-gcc bootstrapping.
It's turning:
        movl -24(%ebp), %esp
        subl $16, %esp
        movl -24(%ebp), %ecx
into
        movl -24(%ebp), %esp
        subl $16, %esp
        movl %esp, (%esp)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30902 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 08:00:47 +00:00
Chris Lattner
f78ae9eb8a fix compilation failure of smg2000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30900 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 03:55:48 +00:00
Chris Lattner
f183cabba8 If we see a load from a stack slot into a physreg, consider it as providing
the stack slot.  This fixes PR943.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 02:34:07 +00:00
Nick Lewycky
078ff41220 Replace custom dispatch code with two uses of InstVisitor. Improves
compile-time performance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30896 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 02:02:44 +00:00
Chris Lattner
4fe4f254ce Fold "zero extending vector loads" now that evan added the chain manip stuff.
This compiles both tests in X86/vec_ss_load_fold.ll into:

_test1:
        movss 4(%esp), %xmm0
        subss LCPI1_0, %xmm0
        mulss LCPI1_1, %xmm0
        minss LCPI1_2, %xmm0
        xorps %xmm1, %xmm1
        maxss %xmm1, %xmm0
        cvttss2si %xmm0, %eax
        andl $65535, %eax
        ret

instead of:

_test1:
        movss LCPI1_0, %xmm0
        movss 4(%esp), %xmm1
        subss %xmm0, %xmm1
        movss LCPI1_1, %xmm0
        mulss %xmm0, %xmm1
        movss LCPI1_2, %xmm0
        minss %xmm0, %xmm1
        xorps %xmm0, %xmm0
        maxss %xmm0, %xmm1
        cvttss2si %xmm1, %eax
        andl $65535, %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30894 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 22:09:58 +00:00
Evan Cheng
82a9164fb4 ComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30892 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 21:06:01 +00:00
Evan Cheng
af9db75943 Add properties to ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30891 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 21:03:53 +00:00
Jim Laskey
7aed46c25b Alias analysis of TRUNCSTORE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30889 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:55:16 +00:00
Jim Laskey
2d84c4c7b3 Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30884 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 17:52:19 +00:00
Jim Laskey
c2b19f3449 Handle aliasing of loadext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30883 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 17:47:52 +00:00
Andrew Lenharth
b4eb092bcd Reduce the amount of state in the lowering code and drop old pattern ISel functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30881 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 16:24:51 +00:00
Jim Laskey
7ca56aff22 Fix regression in combiner alias analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30880 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 13:47:09 +00:00
Evan Cheng
2e49f090f9 Naming consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30878 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 07:10:22 +00:00
Chris Lattner
d615ded96e Use cute tblgen tricks to make zap handling more powerful. Specifically,
when the dag combiner simplifies an and mask, notice this and allow those bits
to be missing from the zap mask.

This compiles Alpha/zapnot4.ll into:

        sll $16,3,$0
        zapnot $0,3,$0
        ret $31,($26),1

instead of:

        ldah $0,1($31)
        lda $0,-8($0)
        sll $16,3,$1
        and $1,$0,$0
        ret $31,($26),1

It would be *really* nice to replace the hunk of code in the
AlphaISelDAGToDAG.cpp file that matches (and (srl (x, C), c2) into
(SRL (ZAPNOTi)) with a similar pattern, but I've spent enough time poking
at alpha.  Make andrew will do this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 05:13:56 +00:00
Andrew Lenharth
82c3d8f81a Jimptables working again on alpha.
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30873 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:29:42 +00:00
Chris Lattner
78feeb0460 Remove dead/redundant instructions. These are handled by ZAPNOTi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30872 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:12:39 +00:00
Chris Lattner
755480681c add two helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30869 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 03:58:02 +00:00
Andrew Lenharth
d13ba8064d This entry is done. switched to the gcc way of doing things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30867 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 01:48:03 +00:00
Evan Cheng
9629abac79 FindModifiedNodeSlot needs to add LoadSDNode ivars to create proper SelectionDAGCSEMap ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 01:47:58 +00:00
Chris Lattner
8ca5afe4fc This has apparently been fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30864 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 01:44:46 +00:00
Rafael Espindola
493a7fc5c3 uint <-> double conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30862 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 20:38:57 +00:00
Evan Cheng
45aeccc1fd Also update getNodeLabel for LoadSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30861 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 20:11:26 +00:00
Evan Cheng
0ac1c6ad9a SDNode::dump should also print out extension type and VT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30860 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 20:05:10 +00:00
Rafael Espindola
667c349feb add fp sub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 19:35:01 +00:00