1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

16779 Commits

Author SHA1 Message Date
Chris Lattner
fcab5f75c0 Codegen (Reg|imm)+&GV as an LEA, because we cannot put it into the immediate field
of an ADDri (due to current restrictions on MachineOperand :( ).  This allows
us to generate:

        leal Data+16000, %edx

instead of:

        movl $Data, %edx
        addl $16000, %edx

llvm-svn: 19420
2005-01-09 20:20:29 +00:00
Chris Lattner
82caa0dc2e Add a simple transformation. This allows us to compile one of the inner
loops in stepanov to this:

.LBB_Z5test0PdS__2:     # no_exit.1
        fldl data(,%eax,8)
        fldl 24(%esp)
        faddp %st(1)
        fstl 24(%esp)
        incl %eax
        cmpl $2000, %eax
        fstpl 16(%esp)
        #FP_REG_KILL
        jl .LBB_Z5test0PdS__2

instead of this:

.LBB_Z5test0PdS__2:     # no_exit.1
        fldl data(,%eax,8)
        fldl 24(%esp)
        faddp %st(1)
        fstl 24(%esp)
        incl %eax
        movl $data, %ecx
        movl %ecx, %edx
        addl $16000, %edx
        subl %ecx, %edx
        movl %edx, %ecx
        sarl $2, %ecx
        shrl $29, %ecx
        addl %ecx, %edx
        sarl $3, %edx
        cmpl %edx, %eax
        fstpl 16(%esp)
        #FP_REG_KILL
        jl .LBB_Z5test0PdS__2

The old instruction selector produced:

.LBB_Z5test0PdS__2:     # no_exit.1
        fldl 24(%esp)
        faddl data(,%eax,8)
        fstl 24(%esp)
        movl %eax, %ecx
        incl %ecx
        incl %eax
        leal data+16000, %edx
        movl $data, %edi
        subl %edi, %edx
        movl %edx, %edi
        sarl $2, %edi
        shrl $29, %edi
        addl %edi, %edx
        sarl $3, %edx
        cmpl %edx, %ecx
        fstpl 16(%esp)
        #FP_REG_KILL
        jl .LBB_Z5test0PdS__2   # no_exit.1

Which is even worse!

llvm-svn: 19419
2005-01-09 20:09:57 +00:00
Chris Lattner
35375c11bf Fix copy and pasto's for FP -> Int. This fixes fldry
llvm-svn: 19418
2005-01-09 19:49:59 +00:00
Chris Lattner
d674d08230 Fix a bug legalizing call instructions (make sure to remember all result
values), and eliminate some switch statements.

llvm-svn: 19417
2005-01-09 19:43:23 +00:00
Chris Lattner
ac23355362 Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile
std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool)

from libstdc++

llvm-svn: 19416
2005-01-09 19:07:54 +00:00
Chris Lattner
b3e31c6def Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)
llvm-svn: 19415
2005-01-09 19:03:49 +00:00
Chris Lattner
45155a3dee Initial implementation of FP->INT and INT->FP casts
Also, fix zero_extend from bool to i8, which fixes Shootout/objinst.

llvm-svn: 19414
2005-01-09 18:52:44 +00:00
Jeff Cohen
6827f061cc Get lib/Analysis/DataStructure to compile with VC++
llvm-svn: 19412
2005-01-09 04:18:28 +00:00
Jeff Cohen
cbd3387b66 Workaround a VC++ bug. Microsoft puts the hash_map class in namespace stdext, but
this classes uses a utility function in namespace std.  But Microsoft apparently
assumes everyone will "using namespace std;".  As LLVM doesn't....  Add a
"use std::_Distance;" to get it working.

llvm-svn: 19411
2005-01-09 04:13:09 +00:00
Chris Lattner
9ca9b20447 Fix a subtle bug involving constant expr casts from int to fp
llvm-svn: 19410
2005-01-09 01:49:29 +00:00
Chris Lattner
cc18c057cf Handle static alloca arguments to PHI nodes.
llvm-svn: 19409
2005-01-09 01:16:24 +00:00
Chris Lattner
c5e53c07fd Implement varargs and returnaddress/frameaddress intrinsics. With this
patch, all of SingleSource/UnitTests passes.

llvm-svn: 19408
2005-01-09 00:01:27 +00:00
Chris Lattner
3454e31bba Use new interfaces to correctly lower varargs and return/frame address intrinsics.
llvm-svn: 19407
2005-01-09 00:00:49 +00:00
Chris Lattner
42dd85fc56 Add interfaces to lower varargs and return/frame address intrinsics.
llvm-svn: 19406
2005-01-09 00:00:31 +00:00
Jeff Cohen
2de841855e Test fails on all platforms, not just linux
llvm-svn: 19405
2005-01-08 23:44:03 +00:00
Chris Lattner
aad3ca491d Add support for llvm.setjmp and longjmp. Only 3 SingleSource/UnitTests fail now.
llvm-svn: 19404
2005-01-08 22:48:57 +00:00
Jeff Cohen
3cd512f524 Fix VC++ compilation error
llvm-svn: 19403
2005-01-08 22:44:06 +00:00
Jeff Cohen
6c0db8d863 Add even more missing createXxxPass functions.
llvm-svn: 19402
2005-01-08 22:01:16 +00:00
Chris Lattner
e4b0ac5acf rename linscan -> LLCBETA as it should be
llvm-svn: 19401
2005-01-08 21:03:58 +00:00
Chris Lattner
ca81756527 Okay 15th time is the charm. Looking at the vector size is useless as it
gets clobbered by a previous statement.  This fixes all calls finally.

llvm-svn: 19399
2005-01-08 20:51:36 +00:00
Chris Lattner
85816cff9a Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
llvm-svn: 19398
2005-01-08 20:39:31 +00:00
Chris Lattner
3b52b2f6c2 Tighten up assertions.
llvm-svn: 19397
2005-01-08 20:35:13 +00:00
Chris Lattner
2d68cb6cf4 Fix off by one error
llvm-svn: 19396
2005-01-08 20:31:34 +00:00
Chris Lattner
9dc8275f47 Allow arrays to have more than 4G elements.
llvm-svn: 19395
2005-01-08 20:19:51 +00:00
Chris Lattner
1a057a2b37 Allow array types to have 64-bit size.
llvm-svn: 19394
2005-01-08 20:19:27 +00:00
Jeff Cohen
aef3f70921 Use size_t instead of long to represent memory usage. long is 32 bits
on 64-bit Windows.

llvm-svn: 19393
2005-01-08 20:15:57 +00:00
Chris Lattner
7a6914d3fc Silence warnings
llvm-svn: 19392
2005-01-08 20:13:44 +00:00
Chris Lattner
ed92fd75e8 Silence VS warnings.
llvm-svn: 19391
2005-01-08 20:13:19 +00:00
Chris Lattner
f1c684b3a2 Silence VS warnings.
llvm-svn: 19390
2005-01-08 20:07:03 +00:00
Chris Lattner
a4a16f17a3 Silence VS warnings
llvm-svn: 19389
2005-01-08 20:05:34 +00:00
Chris Lattner
c23687789e Silence VS warnings
llvm-svn: 19388
2005-01-08 19:59:10 +00:00
Chris Lattner
911dca53ee Adjust prototype
llvm-svn: 19387
2005-01-08 19:57:49 +00:00
Chris Lattner
2dafaac5d1 Silence warnings from VS
llvm-svn: 19386
2005-01-08 19:55:00 +00:00
Chris Lattner
104064bf2c Silence VS warnings
llvm-svn: 19385
2005-01-08 19:53:50 +00:00
Chris Lattner
a58b3f48ef Silence VS warnings.
llvm-svn: 19384
2005-01-08 19:52:31 +00:00
Chris Lattner
c2821461e9 Fix VS warnings
llvm-svn: 19383
2005-01-08 19:48:40 +00:00
Chris Lattner
2e24bcf264 Fix VS warnings.
llvm-svn: 19382
2005-01-08 19:45:31 +00:00
Chris Lattner
131ada2668 Fix uint64_t -> unsigned VS warnings.
llvm-svn: 19381
2005-01-08 19:42:22 +00:00
Chris Lattner
ee218d4348 Silence VS warnings.
llvm-svn: 19380
2005-01-08 19:37:20 +00:00
Chris Lattner
d1e987d9ae Silence warnings
llvm-svn: 19379
2005-01-08 19:34:41 +00:00
Chris Lattner
77d45e2e60 Do not throw away bits for no reason
llvm-svn: 19378
2005-01-08 19:32:59 +00:00
Chris Lattner
e4d415db9d Silence a VS warning.
llvm-svn: 19377
2005-01-08 19:31:31 +00:00
Chris Lattner
c4d075cfa3 Adjust to changes in LowerCallTo interface
Minor bugfixes

llvm-svn: 19376
2005-01-08 19:28:19 +00:00
Chris Lattner
38545e9952 Implement handling of most long operators through libcalls.
Fix a bug legalizing "ret (Val,Val)"

llvm-svn: 19375
2005-01-08 19:27:05 +00:00
Chris Lattner
60ef22ce82 Adjust to changes in LowerCAllTo interfaces
llvm-svn: 19374
2005-01-08 19:26:18 +00:00
Chris Lattner
2a75da3851 Make LowerCallTo more generic and useful.
llvm-svn: 19373
2005-01-08 19:25:39 +00:00
John Criswell
1044377894 Another year, another copyright update.
llvm-svn: 19372
2005-01-08 19:10:44 +00:00
Jeff Cohen
69ed91d1ca Add a few more passes to LinkAllPasses.h
llvm-svn: 19371
2005-01-08 18:15:23 +00:00
Jeff Cohen
ce541ade79 Add more missing createXxxPass functions.
llvm-svn: 19370
2005-01-08 17:21:40 +00:00
Chris Lattner
fd84495692 Add support for FP->INT conversions and back.
llvm-svn: 19369
2005-01-08 08:08:56 +00:00