31724 Commits

Author SHA1 Message Date
Evan Cheng
6973993e9c 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
Evan Cheng
c24ce795a3 Fix test.
llvm-svn: 32015
2006-11-29 08:22:59 +00:00
Bill Wendling
7ec1a5befa Oops! didn't mean to put this in there yet.
llvm-svn: 32014
2006-11-29 07:31:23 +00:00
Chris Lattner
0d67dde00a done
llvm-svn: 32013
2006-11-29 07:21:46 +00:00
Chris Lattner
aeddf5f077 new bswap idiom
llvm-svn: 32012
2006-11-29 07:21:08 +00:00
Chris Lattner
960acb008b 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
19d72c9f4f new testcase
llvm-svn: 32010
2006-11-29 07:17:32 +00:00
Chris Lattner
d747f015ff 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
544dfa013c new testcase
llvm-svn: 32008
2006-11-29 07:03:00 +00:00
Chris Lattner
7b34c1391a This fails on mainline.
llvm-svn: 32007
2006-11-29 05:19:32 +00:00
Chris Lattner
a7942b7bbd 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
Chris Lattner
e7f83dcf4b new testcase, bswaps should be eliminated.
llvm-svn: 32005
2006-11-29 05:00:14 +00:00
Evan Cheng
8facb43593 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
feba507a97 Fix for PR1023 by Dan Gohman.
llvm-svn: 32003
2006-11-29 01:58:12 +00:00
Evan Cheng
79ca238966 Add test cases for PR1022, 1023.
llvm-svn: 32002
2006-11-29 01:57:06 +00:00
Chris Lattner
38084725a2 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
6e12a052ff Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
llvm-svn: 32000
2006-11-29 01:38:07 +00:00
Chris Lattner
0fc6ae0c3d 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
18739dc03f WTF? These weird newlines got in there...
llvm-svn: 31998
2006-11-29 01:14:00 +00:00
Chris Lattner
90f4238c38 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
a736fdf216 Join a split line.
llvm-svn: 31996
2006-11-29 01:11:01 +00:00
Bill Wendling
5c3966aa68 Converted to using llvm streams instead of <iostream>s
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
afd54eb8b6 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
a531ac291c Convert to using llvm streams instead of iostreams.
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Bill Wendling
a38b3e15be Support for llvm_ostreams.
llvm-svn: 31988
2006-11-28 23:31:42 +00:00
Andrew Lenharth
904ca9c688 gcc doesn't like an empty colbber list
llvm-svn: 31987
2006-11-28 23:07:32 +00:00
Bill Wendling
be6ce9d1c7 Use ostream instead of iostream
llvm-svn: 31986
2006-11-28 22:49:32 +00:00
Bill Wendling
787b77320f Use llvm streams instead of <iostream>
llvm-svn: 31985
2006-11-28 22:48:48 +00:00
Bill Wendling
6c1740f31f Removed #include <iostream> and used llvm streams
llvm-svn: 31984
2006-11-28 22:47:12 +00:00
Bill Wendling
597d451fea Removed some of the iostream #includes. Moved towards converting to using
llvm streams

llvm-svn: 31983
2006-11-28 22:46:12 +00:00
Bill Wendling
a60d8edfc9 Support for llvm streams.
llvm-svn: 31982
2006-11-28 22:45:17 +00:00
Chris Lattner
228bcd3802 Add a helper function
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Andrew Lenharth
f52ae7ec72 Identities are default now
llvm-svn: 31980
2006-11-28 22:28:08 +00:00
Andrew Lenharth
8b59fd03c2 Make identity default, and fix PR1020
llvm-svn: 31979
2006-11-28 22:25:32 +00:00
Bill Wendling
f89955be1b Added a temporary hack to get the llvm-streams to work for future checkins.
llvm-svn: 31978
2006-11-28 22:21:29 +00:00
Reid Spencer
116ad83aa0 Undo the last patch until 253.perlbmk passes with these changes.
llvm-svn: 31977
2006-11-28 20:23:51 +00:00
Evan Cheng
69b1825488 New entries.
llvm-svn: 31976
2006-11-28 19:59:25 +00:00
Andrew Lenharth
7f739d5bdd update comments
llvm-svn: 31975
2006-11-28 19:56:02 +00:00
Andrew Lenharth
212f15fa8a 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
2675e23a7e X86 asm -> gcc asm translation table (incomplete)
llvm-svn: 31973
2006-11-28 19:52:49 +00:00
Andrew Lenharth
ff35b449a0 Add per-target support for asm translation in the cbe
llvm-svn: 31972
2006-11-28 19:52:20 +00:00
Jim Laskey
40182179b6 Remove debug code.
llvm-svn: 31970
2006-11-28 18:27:02 +00:00
Jim Laskey
ec05b046c7 Prime text sections to improve branch locality in large object files.
llvm-svn: 31969
2006-11-28 18:21:52 +00:00
Jim Laskey
f4e2e009d9 32-bit int space was not accounted for properly in lowerCall.
llvm-svn: 31966
2006-11-28 14:53:52 +00:00
Reid Spencer
55f1fbee2e Regenerate.
llvm-svn: 31965
2006-11-28 07:29:44 +00:00
Reid Spencer
d47017990b Implement signedness caching for values, value lists, constants and
constant lists. This is just an internal change to the parser in
preparation for some backwards compatibility code that is to follow.
This will allow things like "uint 4000000000" to retain the unsignedness
of the integer constant as the value moves through the parser. In the
future, all integer types will be signless but parsing "uint" and friends
will be retained for backwards compatibility.

llvm-svn: 31964
2006-11-28 07:28:14 +00:00
Reid Spencer
59fe2d89ae Remove 4 FIXME's from the CAST patch now that the back end is correctly
producing code for "trunc to bool". This passes all tests on Linux.

llvm-svn: 31963
2006-11-28 07:23:01 +00:00
Reid Spencer
d077fe70e9 Add an -append-exit-code option to bugpoint. This will cause bugpoint to
append "exit <retcode>" to the end of the output file. This is used by
the nightly tester to make bugpoint match the output generated by the
RunSafely.sh script so it doesn't find false positives.

llvm-svn: 31960
2006-11-28 07:04:10 +00:00
Reid Spencer
21052cd48f Fix a typo.
llvm-svn: 31959
2006-11-28 06:14:06 +00:00
Bill Wendling
bc0d5f8bcb Put the #include for a module first.
llvm-svn: 31958
2006-11-28 03:31:29 +00:00