Commit Graph

26968 Commits

Author SHA1 Message Date
Chris Lattner 95129a7f22 Expose method and ivars for measuring inline asm length properly.
llvm-svn: 30934
2006-10-13 17:50:07 +00:00
Andrew Lenharth 966645e6b4 Move some warnings to debug mode.
llvm-svn: 30933
2006-10-13 17:38:22 +00:00
Rafael Espindola 5ab3166f74 add FNEGS and FNEGD
llvm-svn: 30932
2006-10-13 17:37:35 +00:00
Chris Lattner 057083f0e7 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.

llvm-svn: 30931
2006-10-13 17:22:21 +00:00
Rafael Espindola d6050c3149 add SBCS and SUBS
llvm-svn: 30930
2006-10-13 17:19:20 +00:00
Rafael Espindola 79d9807c87 implement calls to functions that return long
llvm-svn: 30929
2006-10-13 16:47:22 +00:00
Rafael Espindola 3874a168d0 implement unordered floating point compares
llvm-svn: 30928
2006-10-13 13:14:59 +00:00
Jim Laskey ccee9baebe Workaround for templates
llvm-svn: 30927
2006-10-13 13:02:19 +00:00
Jim Laskey 13d3373e72 Clean up dump.
llvm-svn: 30926
2006-10-13 13:01:34 +00:00
Chris Lattner 5af1cbc5cf avoid a ctor/dtor issue with the ProgramName global.
llvm-svn: 30925
2006-10-13 00:06:24 +00:00
Chris Lattner 78d838186c simplify trivial function
llvm-svn: 30924
2006-10-12 23:50:28 +00:00
Evan Cheng 1d04dd3aac Really remove dead nodes from isel queue.
llvm-svn: 30923
2006-10-12 23:18:52 +00:00
Chris Lattner adb19d6e8f shrink anon-ns and mark stuff static. No functionality changes
llvm-svn: 30922
2006-10-12 22:09:17 +00:00
Chris Lattner 03fda13dbb add a note
llvm-svn: 30921
2006-10-12 22:01:26 +00:00
Chris Lattner d0620d2773 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.

llvm-svn: 30920
2006-10-12 20:58:32 +00:00
Chris Lattner ce34aa8fd7 new testcase
llvm-svn: 30919
2006-10-12 20:56:15 +00:00
Evan Cheng 88bf1625fa Add another cyclic dag test case.
llvm-svn: 30918
2006-10-12 20:38:45 +00:00
Evan Cheng 8e770f5589 Use RemoveDeadNode to kill dead node.
llvm-svn: 30917
2006-10-12 20:35:19 +00:00
Evan Cheng a731cb674a Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.
llvm-svn: 30916
2006-10-12 20:34:05 +00:00
Chris Lattner 2e33fb453b add a minor dag combine noticed when looking at PR945
llvm-svn: 30915
2006-10-12 20:23:19 +00:00
Evan Cheng a7956d2894 Doh. This wasn't causing problems by luck.
llvm-svn: 30914
2006-10-12 19:13:59 +00:00
Evan Cheng 694810c227 Some X86ISD::CMP were created with wrong ValueType's.
llvm-svn: 30913
2006-10-12 19:12:56 +00:00
Chris Lattner f9e946b175 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.

llvm-svn: 30912
2006-10-12 18:32:30 +00:00
Chris Lattner 8c9422c4b8 mark call adjustments as modifying the SP
llvm-svn: 30911
2006-10-12 18:00:26 +00:00
Chris Lattner 0e0ee36f45 adjcallstack up/down clobbers the sp
llvm-svn: 30910
2006-10-12 18:00:14 +00:00
Chris Lattner d376e9f4ac adjcallstackup/down clobbers the stack pointer
llvm-svn: 30909
2006-10-12 17:57:58 +00:00
Chris Lattner 7374bc0577 mark adjcallstack up/down as clobbering and using the SP
llvm-svn: 30908
2006-10-12 17:56:34 +00:00
Chris Lattner adcaf294d7 Move the Imp tblgen class from the X86 backend to common code.
llvm-svn: 30907
2006-10-12 17:49:27 +00:00
Chris Lattner c040e53372 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

llvm-svn: 30906
2006-10-12 17:45:38 +00:00
Chris Lattner b5cda3daa9 Mark ADJCALLSTACKUP/DOWN as clobbering ESP so that virtregmap will notice
that it can't assume ESP is unmodified across the instrs.

llvm-svn: 30905
2006-10-12 17:42:56 +00:00
Jim Laskey df2ccc395e D'oh - need to use the rigth kind of store.
llvm-svn: 30903
2006-10-12 15:22:24 +00:00
Evan Cheng c935741b1d 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)

llvm-svn: 30902
2006-10-12 08:00:47 +00:00
Chris Lattner 40ec2bebf9 fix compilation failure of smg2000
llvm-svn: 30900
2006-10-12 03:55:48 +00:00
Chris Lattner 86a012ab61 If we see a load from a stack slot into a physreg, consider it as providing
the stack slot.  This fixes PR943.

llvm-svn: 30898
2006-10-12 02:34:07 +00:00
Evan Cheng d7125583f7 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.

llvm-svn: 30897
2006-10-12 02:08:53 +00:00
Nick Lewycky 77e030bca9 Replace custom dispatch code with two uses of InstVisitor. Improves
compile-time performance.

llvm-svn: 30896
2006-10-12 02:02:44 +00:00
Evan Cheng e415f196a3 Update tests.
llvm-svn: 30895
2006-10-12 01:42:03 +00:00
Chris Lattner d5fcfaa6da 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

llvm-svn: 30894
2006-10-11 22:09:58 +00:00
Chris Lattner 4b77688d14 new testcase
llvm-svn: 30893
2006-10-11 22:07:38 +00:00
Evan Cheng 4090dc4703 ComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.
llvm-svn: 30892
2006-10-11 21:06:01 +00:00
Evan Cheng 577ef7694e Add properties to ComplexPattern.
llvm-svn: 30891
2006-10-11 21:03:53 +00:00
Evan Cheng 2022c79d7f Added properties such as SDNPHasChain to ComplexPattern.
llvm-svn: 30890
2006-10-11 21:02:01 +00:00
Jim Laskey a13b9c7aa4 Alias analysis of TRUNCSTORE.
llvm-svn: 30889
2006-10-11 18:55:16 +00:00
Chris Lattner c52dab5894 regenerate
llvm-svn: 30888
2006-10-11 18:13:09 +00:00
Chris Lattner 9d9de698b5 Add support for let expressions around an mdef. This implements a new part
of Regression/TableGen/MultiClass.td.

llvm-svn: 30887
2006-10-11 18:12:44 +00:00
Chris Lattner ddf7347283 add test for mdef in a let
llvm-svn: 30886
2006-10-11 18:12:14 +00:00
Bill Wendling f21825f55a Clean-up of formatting and spelling.
llvm-svn: 30885
2006-10-11 18:00:22 +00:00
Jim Laskey 6a4c6d3a7a Typo
llvm-svn: 30884
2006-10-11 17:52:19 +00:00
Jim Laskey 0f7c328ae7 Handle aliasing of loadext.
llvm-svn: 30883
2006-10-11 17:47:52 +00:00
Jim Laskey 5684eda9e8 Explict processor.
llvm-svn: 30882
2006-10-11 17:14:14 +00:00