1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

16038 Commits

Author SHA1 Message Date
Evan Cheng
456101ebb9 - Use a different wrapper node for RIP-relative GV, etc.
- Proper support for both small static and PIC modes under X86-64
- Some (non-optimal) support for medium modes.

llvm-svn: 32046
2006-11-30 21:55:46 +00:00
Jim Laskey
32137fffa5 better check for version
llvm-svn: 32045
2006-11-30 18:29:23 +00:00
Chris Lattner
f3806f1c16 make it clear that this is always a zext
llvm-svn: 32044
2006-11-30 17:35:08 +00:00
Chris Lattner
affa9441cd One more bugfix, 3 cases of making casts explicit.
llvm-svn: 32043
2006-11-30 17:32:29 +00:00
Chris Lattner
0b4753a96c Fix a bug in globalopt due to the recent cast patch.
llvm-svn: 32042
2006-11-30 17:26:08 +00:00
Jim Laskey
0369cab61e Change global descriptor names to provide name, full name and linkage name.
llvm-svn: 32036
2006-11-30 14:35:45 +00:00
Jim Laskey
831e2376f2 Temp fix to deal gdb issue.
llvm-svn: 32035
2006-11-30 11:09:42 +00:00
Evan Cheng
d8be97599a MachineInstr::setOpcode -> MachineInstr::setInstrDescriptor
llvm-svn: 32034
2006-11-30 07:12:03 +00:00
Evan Cheng
08e6984667 Remove the ugly SPARCV9 TargetInstrDescriptors hack.
llvm-svn: 32033
2006-11-30 07:10:43 +00:00
Evan Cheng
cb65ba1821 - MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
- Remove the ugly TargetInstrDescriptors hack.

llvm-svn: 32032
2006-11-30 07:08:44 +00:00
Evan Cheng
f64e341522 In PIC mode, GV not requiring an extra load can be used as address immediate.
llvm-svn: 32028
2006-11-29 23:48:14 +00:00
Evan Cheng
1e3f41acde Clean up.
llvm-svn: 32027
2006-11-29 23:46:27 +00:00
Evan Cheng
7e20347607 Fix for PR1018 - Better support for X86-64 Linux in small code model.
llvm-svn: 32026
2006-11-29 23:19:46 +00:00
Chris Lattner
3219b522c8 Fix bug codegen'ing FP constant vectors with integer splats. Make sure the
created intrinsics have the right integer types.  This fixes
PowerPC/2006-11-29-AltivecFPSplat.ll

llvm-svn: 32024
2006-11-29 19:58:49 +00:00
Evan Cheng
c9710a3e29 Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
llvm-svn: 32022
2006-11-29 19:13:47 +00:00
Jim Laskey
d7db5b4a9c Eliminate unnecessary scopes.
llvm-svn: 32020
2006-11-29 16:55:57 +00:00
Jim Laskey
00bcb51943 Offset for load of 32-bit arg in 64-bit world was incorrect.
llvm-svn: 32019
2006-11-29 13:37:09 +00:00
Evan Cheng
f968824cdb Custom lower READCYCLECOUNTER for x86-64.
llvm-svn: 32017
2006-11-29 08:28:13 +00:00
Evan Cheng
2acb6345d8 Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
llvm-svn: 32016
2006-11-29 08:26:18 +00:00
Chris Lattner
e72dff706e done
llvm-svn: 32013
2006-11-29 07:21:46 +00:00
Chris Lattner
2fd5719f50 implement cast.ll:test35. With this, we recognize:
unsigned short swp(unsigned short a) {
       return ((a & 0xff00) >> 8 | (a & 0x00ff) << 8);
}

as an idiom for bswap.

llvm-svn: 32011
2006-11-29 07:18:39 +00:00
Chris Lattner
03fdea2e74 Teach instcombine to turn trunc(srl x, c) -> srl (trunc(x), c) when safe.
This implements InstCombine/cast.ll:test34.  It fires hundreds of times on
176.gcc.

llvm-svn: 32009
2006-11-29 07:04:07 +00:00
Chris Lattner
0409f2c48d Implement Regression/Transforms/InstCombine/bswap-fold.ll,
folding   seteq (bswap(x)), c -> seteq(x,bswap(c))

llvm-svn: 32006
2006-11-29 05:02:16 +00:00
Evan Cheng
52f30d0ff2 16-byte stack alignment for X86-64 ELF. Patch by Dan Gohman.
llvm-svn: 32004
2006-11-29 02:00:40 +00:00
Evan Cheng
0be56fab68 Fix for PR1023 by Dan Gohman.
llvm-svn: 32003
2006-11-29 01:58:12 +00:00
Chris Lattner
4e07e4aa24 Upgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
xchgl %eax, %edx) to llvm.bswap.i64.  This compiles:

long long test2(long long A) {
  return _OSSwapInt64(A);
}

to:

_test2:
        movl 8(%esp), %eax
        movl 4(%esp), %edx
        bswapl %eax
        bswapl %edx
        ret

instead of:

_test2:
        movl 8(%esp), %edx
        movl 4(%esp), %eax
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        ret

GCC manages (with -fomit-frame-pointer) the uglier:

_test2:
        subl    $4, %esp
        movl    8(%esp), %eax
        movl    12(%esp), %edx
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        addl    $4, %esp
        ret

llvm-svn: 32001
2006-11-29 01:48:01 +00:00
Evan Cheng
f38588a1cd Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
llvm-svn: 32000
2006-11-29 01:38:07 +00:00
Chris Lattner
50d2db3b77 Trivially lower 'bswap $0' into llvm.bswap. This fixes hexxagon with the
JIT on darwin/x86, which has htonl implemented as inline asm.

llvm-svn: 31999
2006-11-29 01:14:06 +00:00
Bill Wendling
a5c00d4c4f WTF? These weird newlines got in there...
llvm-svn: 31998
2006-11-29 01:14:00 +00:00
Chris Lattner
d00734a230 add a hook to allow targets to hack on inline asms to lower them to llvm
when they want to.

llvm-svn: 31997
2006-11-29 01:12:32 +00:00
Reid Spencer
a866877d2f Join a split line.
llvm-svn: 31996
2006-11-29 01:11:01 +00:00
Bill Wendling
a29e6c5ec9 Converted to using llvm streams instead of <iostream>s
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
4effa38086 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.

llvm-svn: 31990
2006-11-29 00:19:40 +00:00
Bill Wendling
2477c0ac3d Convert to using llvm streams instead of iostreams.
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Andrew Lenharth
e46a408fb9 gcc doesn't like an empty colbber list
llvm-svn: 31987
2006-11-28 23:07:32 +00:00
Bill Wendling
c942df4921 Use ostream instead of iostream
llvm-svn: 31986
2006-11-28 22:49:32 +00:00
Bill Wendling
d8c0883f20 Use llvm streams instead of <iostream>
llvm-svn: 31985
2006-11-28 22:48:48 +00:00
Bill Wendling
35041c7c45 Removed #include <iostream> and used llvm streams
llvm-svn: 31984
2006-11-28 22:47:12 +00:00
Bill Wendling
040a60d22d Removed some of the iostream #includes. Moved towards converting to using
llvm streams

llvm-svn: 31983
2006-11-28 22:46:12 +00:00
Chris Lattner
339c732e0b Add a helper function
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Andrew Lenharth
aee28a6544 Identities are default now
llvm-svn: 31980
2006-11-28 22:28:08 +00:00
Andrew Lenharth
a32f3e30b3 Make identity default, and fix PR1020
llvm-svn: 31979
2006-11-28 22:25:32 +00:00
Reid Spencer
c48fe0fd4d Undo the last patch until 253.perlbmk passes with these changes.
llvm-svn: 31977
2006-11-28 20:23:51 +00:00
Evan Cheng
27408161df New entries.
llvm-svn: 31976
2006-11-28 19:59:25 +00:00
Andrew Lenharth
7669b3acc5 update comments
llvm-svn: 31975
2006-11-28 19:56:02 +00:00
Andrew Lenharth
d93af28924 Get the asminfo for the target most closely matching the module and use that for inline asm
llvm-svn: 31974
2006-11-28 19:53:36 +00:00
Andrew Lenharth
c0ee1250ad X86 asm -> gcc asm translation table (incomplete)
llvm-svn: 31973
2006-11-28 19:52:49 +00:00
Andrew Lenharth
c51f451af5 Add per-target support for asm translation in the cbe
llvm-svn: 31972
2006-11-28 19:52:20 +00:00
Jim Laskey
7b0a74da3c Remove debug code.
llvm-svn: 31970
2006-11-28 18:27:02 +00:00
Jim Laskey
737f53b6aa Prime text sections to improve branch locality in large object files.
llvm-svn: 31969
2006-11-28 18:21:52 +00:00