Commit Graph

15683 Commits

Author SHA1 Message Date
Chris Lattner
7821a8afd3 falling off the end of a function is ok with an unreachable instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30950 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-14 00:21:48 +00:00
Jim Laskey
274062c172 Reduce the workload by not adding chain users to work list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30948 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 23:32:28 +00:00
Chris Lattner
dc78cbf457 Fix a bug where we incorrectly turned '(X & 0) == 0' into '(X & 0) >> -1',
which is undefined.  "0" isn't a power of 2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 22:46:18 +00:00
Chris Lattner
c50e2bcdf7 implement branch inspection/modification methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30946 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 21:21:17 +00:00
Evan Cheng
8b2794aeff Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 21:14:26 +00:00
Chris Lattner
4a84ad7a2b add the branch folding pass as a late cleanup pass for all targets. For now
it just deletes empty MBB's.  Soon it will do more :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30941 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:45:56 +00:00
Chris Lattner
eb15eeec39 disable some objectionable code, maybe we can bring this pass to life
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30939 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:43:10 +00:00
Chris Lattner
d77ddbc0ba remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30938 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:40:42 +00:00
Chris Lattner
6a250ecc99 add note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30937 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:20:58 +00:00
Chris Lattner
594f4c69e6 set isBarrier correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30936 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 19:10:34 +00:00
Chris Lattner
eea52d3297 Correctly handle instruction separators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30935 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:56:02 +00:00
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
Rafael Espindola
b47e1d033c add double <-> int conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30858 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 18:55:14 +00:00
Chris Lattner
55b5708b6b Fix another bug in extload promotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30857 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 18:54:19 +00:00
Rafael Espindola
0d9fe764df compare doubles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30856 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 16:33:47 +00:00
Rafael Espindola
4b20fbc01d initial support for fp compares. Unordered compares not implemented yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30854 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 12:56:00 +00:00
Evan Cheng
62f2a3c7aa Fix a bug introduced by my LOAD/LOADX changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30853 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 07:51:21 +00:00
Evan Cheng
a275ecbd10 More isel time load folding checking for nodes that produce flag values.
See comment in CanBeFoldedBy() for detailed explanation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 01:46:56 +00:00
Evan Cheng
f2ea84aadc Don't go too crazy with these AddComplexity. Try matching shufps with load
folding first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30848 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 21:42:15 +00:00
Evan Cheng
23425f5c74 Don't convert to MOVLP if using shufps etc. may allow load folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30847 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 21:39:25 +00:00
Evan Cheng
466685d41a Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30844 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:57:25 +00:00
Rafael Espindola
2dc0f2b55c add float -> double and double -> float conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30835 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:50:29 +00:00
Reid Spencer
f63697de04 Fix PR886:
The result of yyparse() was not being checked. When YYERROR or YYABORT is
called it causes yyparse() to return 1 to indicate the error. The code was
silently ignoring this situation because it previously expected either an
exception or a null ParserResult to indicate an error. The patch corrects
this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:36:59 +00:00
Chris Lattner
45d10470c9 Fix a bug pointed out by Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:28:13 +00:00
Rafael Espindola
ecdb9f93c4 add ADDS and ADCS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30830 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:18:28 +00:00
Rafael Espindola
48bc9fbf19 expand ISD::SELECT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30829 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 16:28:33 +00:00
Rafael Espindola
5af3a686a7 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30828 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 14:18:33 +00:00
Rafael Espindola
ad557f9d11 expand ISD::EXTLOAD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30827 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 14:13:40 +00:00
Rafael Espindola
896f10c309 most ARM targets are little endian
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30826 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 14:12:15 +00:00
Chris Lattner
c836333c3b Implement SROA of unions with mixed pointers/integers in them. This implements
PR892 and Transforms/ScalarRepl/union-pointer.ll:test2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30825 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-08 23:53:04 +00:00
Chris Lattner
5b121cc688 Implement Transforms/ScalarRepl/union-pointer.ll:test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30823 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-08 23:28:04 +00:00
Chris Lattner
6270f686b3 Eliminate more token factors by taking advantage of transitivity:
if TF depends on A and B, and A depends on B, TF just needs to depend on
A.  With Jim's alias-analysis stuff enabled, this compiles the testcase in
PR892 into:

__Z4test3Val:
        subl $44, %esp
        call L__Z3foov$stub
        movl %edx, 28(%esp)
        movl %eax, 32(%esp)
        movl %eax, 24(%esp)
        movl %edx, 36(%esp)
        movl 52(%esp), %ecx
        movl %ecx, 4(%esp)
        movl %eax, 8(%esp)
        movl %edx, 12(%esp)
        movl 48(%esp), %eax
        movl %eax, (%esp)
        call L__Z3bar3ValS_$stub
        addl $44, %esp
        ret

instead of:

__Z4test3Val:
        subl $44, %esp
        call L__Z3foov$stub
        movl %eax, 24(%esp)
        movl %edx, 28(%esp)
        movl 24(%esp), %eax
        movl %eax, 32(%esp)
        movl 28(%esp), %eax
        movl %eax, 36(%esp)
        movl 32(%esp), %eax
        movl 36(%esp), %ecx
        movl 52(%esp), %edx
        movl %edx, 4(%esp)
        movl %eax, 8(%esp)
        movl %ecx, 12(%esp)
        movl 48(%esp), %eax
        movl %eax, (%esp)
        call L__Z3bar3ValS_$stub
        addl $44, %esp
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30821 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-08 22:57:01 +00:00
Jim Laskey
7138234baf Combiner alias analysis passes Multisource (release-asserts.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30818 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 23:37:56 +00:00
Chris Lattner
3a7cd951c1 completely disable folding of loads into scalar sse instructions and provide
a framework for doing it right.  This fixes
CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll.

Once X86DAGToDAGISel::SelectScalarSSELoad is implemented right, this task
will be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30817 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 21:55:32 +00:00
Chris Lattner
6f98773203 convert packed FP add/sub/mul/div to use a multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30815 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 21:17:13 +00:00
Chris Lattner
941cc4561c one multiclass now defines all 8 variants of binary-scalar-sse-fp operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 20:55:57 +00:00
Chris Lattner
d2c99d5f7a Switch ADD/MUL/DIV/SUB scalarsse fp ops to a multiclass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30813 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 20:35:44 +00:00
Chris Lattner
6970eda7ca Random acts of shrinkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 19:49:05 +00:00
Chris Lattner
a7ebe556c8 Convert pand/por/pxor to use multiclass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30811 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 19:37:30 +00:00
Chris Lattner
70f4f2e513 Convert some more instructions over to use a new multiclass.
Fix a bug where the asmstring for PSUBQrm was wrong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30810 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 19:34:33 +00:00
Chris Lattner
5650eeb38e Fix a bug where PADDQrm printed paddd instead of paddq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30809 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 19:15:46 +00:00
Chris Lattner
7c47f9a7ea Add multiclass for SSE2 instructions that correspond to simple binops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30808 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 19:14:49 +00:00
Chris Lattner
45e123c62a rename:
PDI_binop_rm -> PDI_binop_rm_int
  PDI_binop_rmi -> PDI_binop_rmi_int

to make it clear that these are for use with intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30807 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 19:02:31 +00:00
Chris Lattner
d4060cc989 Convert saturating PADD/PSUB's to use a multiclass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 18:48:46 +00:00
Chris Lattner
8139e28a79 Convert PAVG*, PMADDWD, and PMUL* to use multiclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30805 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 18:39:00 +00:00
Chris Lattner
3dca490ff0 Fix typo in packsswb instr definition, where the load had the wrong type.
This allows us to use the multiclass for other packs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30804 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 18:23:58 +00:00
Rafael Espindola
e5bbd6d753 implement FUITOS and FUITOD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30803 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 14:24:52 +00:00
Rafael Espindola
5aca927ae6 implement FLDD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 14:03:39 +00:00
Rafael Espindola
d9ae778125 implement fadds, faddd, fmuls and fmuld
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30801 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 13:46:42 +00:00
Chris Lattner
783d45ef14 handle pmin/pmax with multiclasses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 07:49:33 +00:00
Chris Lattner
7733799464 simplify pack and shift intrinsics with multiclasses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 07:06:17 +00:00
Chris Lattner
01998742c3 Use a multiclass to simplify 'SSE2 Integer comparison'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30796 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 06:47:08 +00:00
Chris Lattner
736c020fc8 move class defns close to uses to make it easier to read
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 06:33:36 +00:00
Chris Lattner
fb996ee727 simplify horizontal op definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 06:31:41 +00:00
Chris Lattner
3b57a833a5 remove more unneeded type info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30793 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 06:27:03 +00:00
Chris Lattner
aab370db24 remove unneeded definitions and type info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30792 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 06:19:41 +00:00
Chris Lattner
15258d5f9d remove some unneeded type info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 06:17:43 +00:00
Chris Lattner
845fb75536 simplify patterns by merging in operand info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:50:25 +00:00
Chris Lattner
d1b651d5de Factor operands into packed unary classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:47:20 +00:00
Chris Lattner
dc5aa21b10 remove dead/duplicate instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:41:52 +00:00
Chris Lattner
a0ea63db75 Pull operand info up into parent class for scalar sse intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:26:13 +00:00
Chris Lattner
86c1b3a2fd convert the sole sd unary intrinsic to a multiclass for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:19:31 +00:00
Chris Lattner
3b8378552e pull operand string into the multiclass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:13:26 +00:00
Chris Lattner
9498ed8ac9 Remove RSQRTSS[rm] RCPSS[rm], which are dead.
Introduce SS_IntUnary, a multiclass to replace SS_Int[rm].


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 05:09:48 +00:00
Chris Lattner
4cc84edd3b eliminate redundancy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30783 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 04:52:09 +00:00
Chris Lattner
ed83a7019b Fix a bug legalizing zero-extending i64 loads into 32-bit loads. The bottom
part was always forced to be sextload, even when we needed an zextload.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 00:58:36 +00:00
Chris Lattner
0c79fed5f9 Set the jt section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:52:33 +00:00
Chris Lattner
cf9668f23d initialize ivar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30780 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:52:08 +00:00
Chris Lattner
0336fdba85 If a target uses a GOT, put it in the jt data section, not the text
section.  This will fix alpha when Andrew implements
AlphaTargetMachine::getTargetLowering().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:50:56 +00:00
Chris Lattner
111c2fa2a0 Alpha uses a got
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30778 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:46:51 +00:00
Chris Lattner
e0cfc8b2f2 jump tables handle pic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30776 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:32:29 +00:00
Chris Lattner
db3ea6754b print labels even if a MBB doesn't have a corresponding LLVM BB, just don't
print the LLVM BB label.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30775 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 21:28:17 +00:00
Rafael Espindola
935b1f8fce add optional input flag to FMRRD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30774 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 20:33:26 +00:00
Rafael Espindola
614057b843 add support for calling functions that return double
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 19:10:05 +00:00
Evan Cheng
3cff9f8947 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30770 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 18:57:51 +00:00
Chris Lattner
6e1f1fdd35 ugly codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30769 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 17:39:34 +00:00
Chris Lattner
4bdd2753db Fix a miscompilation of:
long long foo(long long X) {
  return (long long)(signed char)(int)X;
}

Instead of:

_foo:
        extsb r2, r4
        srawi r3, r4, 31
        mr r4, r2
        blr

we now produce:

_foo:
        extsb r4, r4
        srawi r3, r4, 31
        blr

This fixes a miscompilation in ConstantFolding.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30768 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 17:34:12 +00:00
Rafael Espindola
af1dabef35 fix some bugs affecting functions with no arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 17:26:30 +00:00
Rafael Espindola
1b5076887e fix the stack alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30766 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 14:29:47 +00:00
Rafael Espindola
4a408d46d4 add support for calling functions that have double arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30765 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 12:50:22 +00:00
Evan Cheng
a26eb5e1a7 Still need to support -mcpu=<> or cross compilation will fail. Doh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30764 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 09:17:41 +00:00
Evan Cheng
abc346ceda Do away with CPU feature list. Just use CPUID to detect MMX, SSE, SSE2, SSE3, and 64-bit support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 08:21:07 +00:00
Evan Cheng
88c1578011 It appears the inline asm in GetCpuIDAndInfo() may clobbers some registers if it isn't inlined (at < -O3). Force it to be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 07:50:56 +00:00
Chris Lattner
5504602836 MachineBasicBlock::splice was incorrectly updating parent pointers on
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 01:12:44 +00:00
Evan Cheng
786225adf0 Make use of getStore().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30759 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 23:01:46 +00:00
Evan Cheng
ad071e1cd1 Add getStore() helper function to create ISD::STORE nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 22:57:11 +00:00
Chris Lattner
9c78ecb511 Don't crash if an MBB doesn't have an LLVM BB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 21:40:14 +00:00
Rafael Espindola
39b5a21259 use a const ref for passing the vector to ArgumentLayout
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 17:46:48 +00:00
Rafael Espindola
a284584352 implement a ArgumentLayout class to factor code common to LowerFORMAL_ARGUMENTS and LowerCALL
implement FMDRR
add support for f64 function arguments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30754 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 16:48:49 +00:00
Jim Laskey
bc588b8bbf Alias analysis code clean ups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 15:07:25 +00:00
Chris Lattner
867b99f845 add a new SimplifyDemandedVectorElts method, which works similarly to
SimplifyDemandedBits.  The idea is that some operations can be simplified if
not all of the computed elements are needed.  Some targets (like x86) have a
large number of intrinsics that operate on a single element, but pass other
elts through unmodified.  If those other elements are not needed, the
intrinsics can be simplified to scalar operations, and insertelement ops can
be removed.

This turns (f.e.):

ushort %Convert_sse(float %f) {
        %tmp = insertelement <4 x float> undef, float %f, uint 0                ; <<4 x float>> [#uses=1]
        %tmp10 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1             ; <<4 x float>> [#uses=1]
        %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, uint 2           ; <<4 x float>> [#uses=1]
        %tmp12 = insertelement <4 x float> %tmp11, float 0.000000e+00, uint 3           ; <<4 x float>> [#uses=1]
        %tmp28 = tail call <4 x float> %llvm.x86.sse.sub.ss( <4 x float> %tmp12, <4 x float> < float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > )               ; <<4 x float>> [#uses=1]
        %tmp37 = tail call <4 x float> %llvm.x86.sse.mul.ss( <4 x float> %tmp28, <4 x float> < float 5.000000e-01, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > )               ; <<4 x float>> [#uses=1]
        %tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> %tmp37, <4 x float> < float 6.553500e+04, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > )               ; <<4 x float>> [#uses=1]
        %tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> zeroinitializer )          ; <<4 x float>> [#uses=1]
        %tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 )              ; <int> [#uses=1]
        %tmp69 = cast int %tmp to ushort                ; <ushort> [#uses=1]
        ret ushort %tmp69
}

into:

ushort %Convert_sse(float %f) {
entry:
        %tmp28 = sub float %f, 1.000000e+00             ; <float> [#uses=1]
        %tmp37 = mul float %tmp28, 5.000000e-01         ; <float> [#uses=1]
        %tmp375 = insertelement <4 x float> undef, float %tmp37, uint 0         ; <<4 x float>> [#uses=1]
        %tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> %tmp375, <4 x float> < float 6.553500e+04, float undef, float undef, float undef > )           ; <<4 x float>> [#uses=1]
        %tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> < float 0.000000e+00, float undef, float undef, float undef > )            ; <<4 x float>> [#uses=1]
        %tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 )              ; <int> [#uses=1]
        %tmp69 = cast int %tmp to ushort                ; <ushort> [#uses=1]
        ret ushort %tmp69
}

which improves codegen from:

_Convert_sse:
        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

to:

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


This is just a first step, it can be extended in many ways.  Testcase here:
Transforms/InstCombine/vec_demanded_elts.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 06:55:50 +00:00
Chris Lattner
06a248c238 Add insertelement/extractelement helper ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 06:24:58 +00:00
Chris Lattner
1907a7b37b Lower some min/max idioms to minss/maxss when unsafe fp math is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 04:11:26 +00:00
Chris Lattner
a66ba5f70b Don't bother setting JumpTableTextSection, it is about to disappear
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:13:59 +00:00
Chris Lattner
e08d6e915e Emit pic jumptables to the same section that the function is emitted to,
allowing label differences to work.  This fixes CodeGen/X86/pic_jumptable.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30744 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:13:28 +00:00
Chris Lattner
1da31ee472 Pass the MachineFunction into EmitJumpTableInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:01:21 +00:00
Chris Lattner
edad2b783f implement and use getSectionForFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:51:36 +00:00
Chris Lattner
6f6f69950f Use getSectionForFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:49:23 +00:00
Chris Lattner
29bd9e12d4 Use getSectionForFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30739 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:48:40 +00:00
Chris Lattner
6e79629dab use getSectionForFunction to decide which section to emit code into
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:47:13 +00:00
Chris Lattner
afbfdeddff Implement getSectionForFunction, use it when printing function body.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:43:52 +00:00
Chris Lattner
52f0670470 move getSectionForFunction to AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:42:47 +00:00
Chris Lattner
9b7ce7da82 Move getSectionForFunction to AsmPrinter, change it to return a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:42:20 +00:00
Chris Lattner
b56dcc453e implement DarwinTargetAsmInfo::getSectionForFunction, use it when outputting
function bodies


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 00:35:50 +00:00
Chris Lattner
f5b10ec509 Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30732 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 00:35:16 +00:00
Chris Lattner
fea13d33e5 emit jump table before debug info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 00:26:05 +00:00
Chris Lattner
37dfa02788 Always emit the jump table after the function so it's part of the same 'atom'
as the function body.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30730 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 00:24:46 +00:00
Chris Lattner
df20b96ffd getFilename/getDirectory shouldn't abort if the global has no init. This
can happen on bugpoint reduced testcases f.e..


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 23:06:26 +00:00
Evan Cheng
693163e74d Fix some typos that can cause a flag value to have more than one use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 22:23:53 +00:00
Chris Lattner
c055a9191f Fix a static dtor issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 22:13:11 +00:00
Chris Lattner
90aa839c88 Fix more static dtor issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 21:52:35 +00:00
Chris Lattner
b336409673 Fix some more static dtor issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 21:49:37 +00:00
Evan Cheng
e111303408 Added option -disable-x86-shuffle-opti to disable X86 specific vector shuffle optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 18:33:38 +00:00
Evan Cheng
8e0055de8a Formating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 18:33:00 +00:00
Jim Laskey
6ff23e5e84 More extensive alias analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 16:53:27 +00:00
Jim Laskey
0c0feb9d5f More long term solution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 10:40:15 +00:00
Chris Lattner
83e6c9925e Pattern match min/max nodes when we have sse. This implements
CodeGen/X86/scalar_sse_minmax.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 06:57:07 +00:00
Chris Lattner
68e8b9e775 add a note :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30717 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 05:52:13 +00:00
Chris Lattner
3a15503c82 This case isn't implemented yet. It seems unlikely to be needed, but if it
ever is, we want to get an assert instead of silent bad codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 04:58:58 +00:00
Jim Laskey
0f77fe5ea6 Work around for some problems with templates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 01:43:13 +00:00
Evan Cheng
c548428c5d Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
extra operand to LOADX to specify the exact value extension type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 00:56:09 +00:00
Chris Lattner
faf1daeb92 Use $( $| $) to represent alternatives in asm blocks instead of {|}. This
is needed to support targets where {|} aren't special symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 23:27:09 +00:00
Evan Cheng
bf497a3a68 Fix an obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 23:08:27 +00:00
Chris Lattner
f28bbda2c6 Bugfixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 20:19:23 +00:00
Chris Lattner
ee773ba72b Print the MBB ID # along with the bb tag in the -print-machine-instrs output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30708 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 20:17:24 +00:00
Chris Lattner
e70cab0ca4 Provide a function that ensures MBB numbering is dense and inorder. This
can be used by MachineFunctionPasses who need this property.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30706 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 19:18:57 +00:00
Nick Lewycky
f938099aa1 Simplify logic further.
Ensure that we copy KnownProperties before calling visitBasicBlock, else
we may leak properties into blocks where they don't belong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30705 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 17:36:01 +00:00
Rafael Espindola
cd71da5cf0 Implement floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 17:27:58 +00:00
Chris Lattner
13bf6c1350 Fix PR933 and CodeGen/X86/2006-10-02-BoolRetCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 17:18:42 +00:00
Nick Lewycky
a73a654bb4 Simplify, now that predsimplify depends on break-crit-edges.
Fix SwitchInst where dest-block is the same as one of the cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 15:19:11 +00:00
Nick Lewycky
5c8c5d9ace Move break-crit-edges before the predicate simplifier. Allows us to
optimize in more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30699 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 14:52:23 +00:00
Evan Cheng
99435d32b3 Revert previous patch. Still breaking things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30698 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 07:26:07 +00:00
Bill Wendling
f7da4e939f Fix for PR929. The PHI nodes were being gone through for each instruction
in a successor block for every block...resulting in some O(N^k) algorithm
which wasn't very good for performance. Calculating this information up
front and keeping it in a map made it much faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 07:20:20 +00:00
Chris Lattner
86f7b2100c Fix PR932 and Analysis/Dominators/2006-10-02-BreakCritEdges.ll:
The critical edge block dominates the dest block if the destblock dominates
all edges other than the one incoming from the critical edge.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 07:02:02 +00:00
Evan Cheng
485130fbf4 These don't have immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 06:55:11 +00:00
Rafael Espindola
9e071f0ae3 fix the names of the 64bit fp register
initial support for returning 64bit floating point numbers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-02 19:30:56 +00:00
Jim Laskey
01078fb7ec Debugging kruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-02 13:01:17 +00:00
Jim Laskey
ec20402c90 Add ability to annotate (color) nodes in a viewGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-02 12:26:53 +00:00
Chris Lattner
39d78d623a Fixme is already done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-01 22:46:33 +00:00
Chris Lattner
ab38358fa0 Teach globalsmodref-aa to track scalar pointer global variables which point
to unaliased allocations.  Use this information to disambiguate pointers loaded
from them.  This is a very common case, so it's worthwhile to handle efficiently.

This implements Analysis/GlobalsModRef/indirect-global.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-01 22:36:45 +00:00
Chris Lattner
e831b9a48b Fix a bug from r1.391 of this file, where we checked the size instead of
the alignment when promoting allocations.  This implements
InstCombine/cast.ll:test32


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-01 19:40:58 +00:00
Chris Lattner
596721f0d7 Fix debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 23:32:50 +00:00
Chris Lattner
8639503abe Implement SRA of heap allocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30679 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 23:32:09 +00:00
Chris Lattner
adc95467e4 Add a version of the globalvariable ctor that inserts at a specific location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 21:31:26 +00:00
Chris Lattner
cff1673182 Add some ifdef'd out debug info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 19:40:30 +00:00
Evan Cheng
71f84de79b Not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-29 22:05:10 +00:00
Rafael Espindola
27185190e6 add floating point registers
implement SINT_TO_FP


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-29 21:20:16 +00:00
Chris Lattner
151880b020 Define this in the correct n/s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-29 18:43:14 +00:00
Chris Lattner
ab4fa4f377 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30668 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:45:00 +00:00
Chris Lattner
de65fb3a8b Now that ConstantBool::True/False are gone, we can modify Type.cpp to
eliminate its static dtors, without having code that depends on order of
initialization.  Eliminate static ctors/dtors from Type.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:38:07 +00:00
Chris Lattner
003cbf35f4 Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:36:21 +00:00
Chris Lattner
47811b76ca Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:35:22 +00:00
Chris Lattner
850ba99cb6 Eliminate ConstantBool::True and ConstantBool::False. Instead, provideConstantBool::getTrue() and ConstantBool::getFalse().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:34:49 +00:00
Chris Lattner
6458f1807d update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:33:12 +00:00
Chris Lattner
7be164c0ea wrap long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:32:43 +00:00
Chris Lattner
33ce777c4d Simplify some code, reformat break's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:19:29 +00:00
Chris Lattner
f8f791ef1e simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:17:41 +00:00
Chris Lattner
193c2d886f Simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30658 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:14:29 +00:00
Owen Anderson
3295471846 Another attempt at making ArgPromotion smarter. This patch no longer breaks Burg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:02:22 +00:00
Chris Lattner
40d31ecb29 simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 22:58:25 +00:00
Chris Lattner
9fb471df2e simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30655 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 22:50:29 +00:00
Chris Lattner
7c395ad06f Shift amounts are always 32-bits, even in 64-bit mode. This fixes
CodeGen/PowerPC/2006-09-28-shift_64.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 20:48:45 +00:00
Reid Spencer
5b7e753d95 Fix PR902:
Errors are generated with the YYERROR macro which can only be called from
a production (inside yyparse) because of the goto statement in the macro.
This lead to several situations where GEN_ERROR was not called but
GenerateError was used instead (because it doesn't use YYERROR). However,
in such situations, catching the error much later (e.g. at the end of
the production) is not sufficient because LLVM can assert on invalid data
before the end of the production is reached. The solution is to ensure that
the CHECK_FOR_ERROR macro (which invokes YYERROR if there's an error) is
used as soon as possible after a call to GenerateError has been made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 19:28:24 +00:00
Evan Cheng
5feaa9a707 TargetRegisterClass specifies the desired spill alignment. However, it cannot be honored if stack alignment is smaller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30648 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 18:52:32 +00:00
Bill Wendling
ca756d2cf9 "Once more into the breach, dear friends, once more, or fill the wall up
with our English dead."

No! Really! Serious this time...It was how the vreg uses were being
adjusted that was causing hte Olden tests to fail. I corrected this and
the Olden and Regression tests all passed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30644 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 07:10:24 +00:00
Chris Lattner
57f9a43c64 refactor critical edge breaking out into the SplitCritEdgesForPHIConstants method.
This is a baby step towards fixing PR925.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 06:17:10 +00:00
Chris Lattner
f308ea01d5 add a note about a general improvement to the code generator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 06:01:17 +00:00
Chris Lattner
f6e70fa0d3 remove reference to dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:38:19 +00:00
Chris Lattner
8a94bf142a Use the new ManagedStatic class to explicitly manage static variables, eliminating static ctors/dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30639 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:35:06 +00:00
Chris Lattner
771cbf30bc new helper class to provide more explicit management of static ctor/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:31:55 +00:00
Chris Lattner
8af24b86a8 re-re-revert this, back to the right revision. It currently breaks bisort/mst
in olden among others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30637 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:11:54 +00:00
Evan Cheng
c2b4ec37de PEI now place callee save spills closest to the address pointed to by the
incoming stack. This allows X86 backend to use push / pop in epilogue /
prologue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:10:27 +00:00
Chris Lattner
31cefb9943 re-revert this patch, bisort and mst are still broken in Olden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:04:21 +00:00
Bill Wendling
4da1abb311 Reapplying this patch. With the newest commits, the error in Olden/bisort
has disappeared.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 22:37:35 +00:00
Chris Lattner
f38f543e01 silence warnings in release build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30631 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 18:29:38 +00:00
Devang Patel
79db5b7370 Fix DFS walk.
Fix http://llvm.org/bugs/show_bug.cgi?id=923


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 17:18:05 +00:00
Chris Lattner
6c88e9b458 Temporarily revert this. This breaks Olden/bisort on PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30628 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 16:59:16 +00:00
Bill Wendling
c36f2a4cea PR878: Instead of calculating the vreg to PHI use count everytime we get
a function, do it up front in linear time (going through all of the
instructions once). We create a map out of them. Then it's no problem to
use the information in it during elimination...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 09:04:15 +00:00
Chris Lattner
7514437133 set DEBUG_TYPE right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 04:58:23 +00:00
Chris Lattner
5468966614 Use abstract private/comment directives, to increase portability to ppc/linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 02:55:21 +00:00
Chris Lattner
bae02cfd46 Add support for ${:private} which prints "L" on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 00:06:07 +00:00
Chris Lattner
3ce9b67e0c Add support for ${:comment}, which expands to the current target's comment
character, and ${:uid} which expands to a unique ID for the MachineInstr.
More can be added if/when they are needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 23:59:50 +00:00
Evan Cheng
692d4e0823 Rename function. It's determining which callee-save registers to save.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 22:29:31 +00:00
Andrew Lenharth
16113431e8 Comments on JumpTableness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30615 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 20:02:30 +00:00
Jim Laskey
bb1518585b Load chain check is not needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 17:44:58 +00:00
Jim Laskey
79597d2af6 Chain can be any operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 09:32:41 +00:00
Jim Laskey
3dd1170616 Wrong size for load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 08:14:06 +00:00
Jim Laskey
172585b3aa Can't move a load node if it's chain is not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30609 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 07:37:42 +00:00
Chris Lattner
e87e1154a1 Various random and minor code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:57:53 +00:00
Chris Lattner
681764b20c print the preds of each MBB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:41:59 +00:00
Chris Lattner
a53115b4c2 Compile:
int x __attribute__((used));

to:

        .data
.comm _x,4              ; 'x'
        .no_dead_strip  _x

on both x86 and ppc darwin targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30605 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:39:53 +00:00
Chris Lattner
cb05af852f Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30604 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:38:18 +00:00
Jim Laskey
14fbcbfa2b Accidental enable of bad code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30601 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-25 21:11:32 +00:00
Jim Laskey
288af5e740 Fix chain dropping in load and drop unused stores in ret blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30600 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-25 19:32:58 +00:00
Chris Lattner
fb981f3fee more notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-25 17:12:14 +00:00
Jim Laskey
279f053eae Core antialiasing for load and store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-25 16:29:54 +00:00
Andrew Lenharth
0607a2f554 Fix jump tables to match gcc (and the ABI and whatnot)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30594 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 19:46:56 +00:00
Andrew Lenharth
beec30eaf3 Add support for other relocation bases to jump tables, as well as custom asm directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 19:45:58 +00:00
Andrew Lenharth
d044d6ee2c jump table note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30591 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 13:13:10 +00:00
Evan Cheng
2ae5b87996 PIC jump table entries are always 32-bit. This fixes PIC jump table support on X86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30590 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 05:22:38 +00:00
Nick Lewycky
8f389d8cd4 Style changes only. Remove dead code, fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-23 15:13:08 +00:00