Commit Graph

26953 Commits

Author SHA1 Message Date
Chris Lattner
871a87de9a new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30919 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:56:15 +00:00
Evan Cheng
f6f1f4e7cf Add another cyclic dag test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30918 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:38:45 +00:00
Evan Cheng
1fae00f1ad Use RemoveDeadNode to kill dead node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:35:19 +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
Evan Cheng
4326ef582b Prior load folding check on chain operand was too strict. It requires the
chain operand to point to the load being folded. Now we relax this, traversing
up the chain, if it doesn't reach the load, then it's ok. We will create a
TokenFactor (of all the chain operands and the load's chain) to capture all
the control flow dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30897 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 02:08:53 +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
Evan Cheng
32159c13f9 Update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30895 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 01:42:03 +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
Chris Lattner
ffe945e1c7 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30893 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 22:07:38 +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
Evan Cheng
94b3040fef Added properties such as SDNPHasChain to ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30890 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 21:02:01 +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
Chris Lattner
bcc3f0a61d regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30888 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:13:09 +00:00
Chris Lattner
1ceb6c830f Add support for let expressions around an mdef. This implements a new part
of Regression/TableGen/MultiClass.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30887 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:12:44 +00:00
Chris Lattner
f187bab7bb add test for mdef in a let
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30886 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:12:14 +00:00
Bill Wendling
82e2eea168 Clean-up of formatting and spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30885 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:00:22 +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
Jim Laskey
98dd175f86 Explict processor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30882 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 17:14:14 +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
Jim Laskey
5aec0b061c Make sure combiner alias analysis does it's thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30879 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 13:42:49 +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
Evan Cheng
27b1bb999b Test case for the recently fixed FindModifiedNodeSlot bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30877 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 07:01:37 +00:00
Bill Wendling
3cd5ca6c72 Put code example inside of "doc_code" divisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30876 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 06:30:10 +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
Chris Lattner
3d2da9a426 new testcase, this should turn into zap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30874 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 05:10:19 +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
39e73f7c83 Special case tblgen generated code for patterns like (and X, 255) or (or X, 42).
The dag/inst combiners often 'simplify' the masked value based on whether
or not the bits are live or known zero/one.  This is good and dandy, but
often causes special case patterns to fail, such as alpha's CMPBGE pattern,
which looks like "(set GPRC:$RC, (setuge (and GPRC:$RA, 255), (and GPRC:$RB, 255)))".
Here the pattern for (and X, 255) should match actual dags like (and X, 254) if
the dag combiner proved that the missing bits are already zero (one for 'or').

For CodeGen/Alpha/cmpbge.ll:test2 for example, this results in:

        sll $16,1,$0
        cmpbge $0,$17,$0
        ret $31,($26),1

instead of:

        sll $16,1,$0
        and $0,254,$0
        and $17,255,$1
        cmpule $1,$0,$0
        ret $31,($26),1

... and requires no target-specific code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30871 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:05:55 +00:00
Chris Lattner
2f239b9289 Both of these functions should turn into cmpbge instructions, even though
the second has an and of 254 not 255.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30870 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 03:59:48 +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
Chris Lattner
be8e72120d Split some code out into a new method. The generated code is exactly
identical, this is just a refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30868 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 03:35:34 +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