1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

42814 Commits

Author SHA1 Message Date
Nick Lewycky
882443585d Add a couple of missed optimizations on integer vectors. Multiply and divide
by 1, as well as multiply by -1.

llvm-svn: 60182
2008-11-27 20:21:08 +00:00
Chris Lattner
8c052366b3 defensive patch: if CGP is merging a block with the entry block, make sure
it ends up being the entry block.

llvm-svn: 60180
2008-11-27 19:29:14 +00:00
Chris Lattner
73b251b3bf Fix PR3138: if we merge the entry block into another block, make sure to
move the other block back up into the entry position!

llvm-svn: 60179
2008-11-27 19:25:19 +00:00
Nick Lewycky
847a671436 Silence a warning.
Despite changing the order of evaluation, this doesn't actually change the
meaning of the statement.

llvm-svn: 60177
2008-11-27 17:29:52 +00:00
Nuno Lopes
1e97b6c181 fix build on some machines. thanks buildbot
llvm-svn: 60175
2008-11-27 16:42:44 +00:00
Nuno Lopes
e3f6758e3c fix my previous commit r60064: compare strings instead of pointers
llvm-svn: 60174
2008-11-27 16:37:02 +00:00
Chris Lattner
2959f6224e switch InstCombine::visitLoadInst to use
FindAvailableLoadedValue

llvm-svn: 60169
2008-11-27 08:56:30 +00:00
Chris Lattner
dd755c74d6 improve const correctness.
llvm-svn: 60168
2008-11-27 08:39:18 +00:00
Chris Lattner
0bd942ecb5 enhance FindAvailableLoadedValue to make use of AliasAnalysis
if it has it.

llvm-svn: 60167
2008-11-27 08:18:12 +00:00
Chris Lattner
577096bcaa move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.
llvm-svn: 60166
2008-11-27 08:10:05 +00:00
Bill Wendling
cbebccf936 Get rid of bogus "control may reach end of non-void function ‘...’ being
inlined" message.

llvm-svn: 60165
2008-11-27 08:00:12 +00:00
Chris Lattner
cab07ddaeb simplify this code a bit.
llvm-svn: 60164
2008-11-27 07:54:38 +00:00
Chris Lattner
e1ed3a2962 Use the new MergeBasicBlockIntoOnlyPred function.
llvm-svn: 60163
2008-11-27 07:54:12 +00:00
Chris Lattner
bb86dff3fe move MergeBasicBlockIntoOnlyPred to Transforms/Utils.
llvm-svn: 60162
2008-11-27 07:43:12 +00:00
Bill Wendling
7742719284 XFAil test due to reverting of patch.
llvm-svn: 60161
2008-11-27 07:34:10 +00:00
Chris Lattner
98f62336b7 rename ThreadBlock to ProcessBlock, since it does other things than
just simple threading.

llvm-svn: 60157
2008-11-27 07:20:04 +00:00
Bill Wendling
4a6eedb51d Comment out code that isn't entirely correct.
llvm-svn: 60156
2008-11-27 07:18:35 +00:00
Misha Brukman
54dad5f940 Fixed HTML closing tag, cleaned up some spacing.
llvm-svn: 60153
2008-11-27 06:41:20 +00:00
Sanjiv Gupta
0638ca3697 Removing redundant semicolons. No functionality change.
llvm-svn: 60149
2008-11-27 05:58:04 +00:00
Chris Lattner
532458b89f Make jump threading substantially more powerful, in the following ways:
1. Make it fold blocks separated by an unconditional branch.  This enables
   jump threading to see a broader scope.
2. Make jump threading able to eliminate locally redundant loads when they
   feed the branch condition of a block.  This frequently occurs due to
   reg2mem running.
3. Make jump threading able to eliminate *partially redundant* loads when
   they feed the branch condition of a block.  This is common in code with
   lots of loads and stores like C++ code and 255.vortex.

This implements thread-loads.ll and rdar://6402033.

Per the fixme's, several pieces of this should be moved into Transforms/Utils.

llvm-svn: 60148
2008-11-27 05:07:53 +00:00
Evan Cheng
7db1955286 Eliminate a compile time warning.
llvm-svn: 60145
2008-11-27 02:29:25 +00:00
Evan Cheng
ee5e950c25 Avoid inserting noop's in the middle of a loop.
llvm-svn: 60141
2008-11-27 01:16:00 +00:00
Evan Cheng
f18016728c On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax

is 2 bytes shorter than

movl $4, %eax
addl 4(%esp), %eax

llvm-svn: 60139
2008-11-27 00:49:46 +00:00
Dale Johannesen
0d6dd4bdb9 Add a missing case in visitADD.
llvm-svn: 60137
2008-11-27 00:43:21 +00:00
Evan Cheng
4da44412cf Add -march=x86.
llvm-svn: 60135
2008-11-27 00:37:06 +00:00
Ted Kremenek
d0f8118dc1 Add typedef to StringMapEntry.
llvm-svn: 60134
2008-11-27 00:17:25 +00:00
Mikhail Glushenkov
869ded12c8 Disallow multiple edges.
llvm-svn: 60127
2008-11-26 22:59:45 +00:00
Bill Wendling
3376836463 Add x86-specific test for add-with-overflow intrinsics.
llvm-svn: 60125
2008-11-26 22:42:19 +00:00
Bill Wendling
c60a07dbf2 Generate something sensible for an [SU]ADDO op when the overflow/carry flag is
the conditional for the BRCOND statement. For instance, it will generate:

    addl %eax, %ecx
    jo LOF

instead of

    addl %eax, %ecx
    ; About 10 instructions to compare the signs of LHS, RHS, and sum.
    jl LOF

llvm-svn: 60123
2008-11-26 22:37:40 +00:00
Chris Lattner
d01522d33a Turn on my codegen prepare heuristic by default. It doesn't affect
performance in most cases on the Grawp tester, but does speed some 
things up (like shootout/hash by 15%).  This also doesn't impact 
compile time in a noticable way on the Grawp tester.

It also, of course, gets the testcase it was designed for right :)

llvm-svn: 60120
2008-11-26 22:16:44 +00:00
Bill Wendling
d8a4b1ec05 Small formatting change.
llvm-svn: 60113
2008-11-26 19:19:05 +00:00
Bill Wendling
cdc91a5f09 Update to explain how ssp and sspreq attributes override each other.
llvm-svn: 60112
2008-11-26 19:07:40 +00:00
Devang Patel
02a25292de Fix typo.
llvm-svn: 60111
2008-11-26 18:13:11 +00:00
Evan Cheng
c18e38d19f Cosmetic.
llvm-svn: 60110
2008-11-26 18:00:00 +00:00
Duncan Sands
f64dd4b09c Check that running the DAG combiner between type
and operation legalization does something useful.

llvm-svn: 60108
2008-11-26 16:44:30 +00:00
Mikhail Glushenkov
1381c387d4 Describe some more options in the man page.
llvm-svn: 60105
2008-11-26 13:40:08 +00:00
Sanjiv Gupta
91da4472f4 Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.
llvm-svn: 60102
2008-11-26 11:19:00 +00:00
Mikhail Glushenkov
01a62b9117 Fix the -I option (llvmc -I dir1 -I dir2 didn't work).
llvm-svn: 60101
2008-11-26 10:57:31 +00:00
Mikhail Glushenkov
3dd6b7e4e9 Refactor Tools.td to remove repetition.
llvm-svn: 60100
2008-11-26 10:56:56 +00:00
Mikhail Glushenkov
7534e81f38 Small fix: the error message was incorrect in some cases.
llvm-svn: 60099
2008-11-26 10:55:45 +00:00
Sanjiv Gupta
1fa97cc7dd Emit declaration for globals and externs.
Custom lower AND, OR, XOR bitwise operations.

llvm-svn: 60098
2008-11-26 10:53:50 +00:00
Dan Gohman
6a589b31f7 Fish kill flag annotations in PUSH instructions.
llvm-svn: 60095
2008-11-26 06:39:12 +00:00
Dan Gohman
7b56f8686f LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.

llvm-svn: 60092
2008-11-26 05:50:31 +00:00
Chris Lattner
1bfd6e8709 teach the new heuristic how to handle inline asm.
llvm-svn: 60088
2008-11-26 04:59:11 +00:00
Devang Patel
c17a1f06f3 Disable -loop-index-split for now.
llvm-svn: 60087
2008-11-26 04:58:14 +00:00
Ted Kremenek
b31e49cd47 Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Chris Lattner
ff89aeda21 Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
heuristic: the value is already live at the new memory operation if
it is used by some other instruction in the memop's block.  This is
cheap and simple to compute (moreso than full liveness).

This improves the new heuristic even more.  For example, it cuts two
out of three new instructions out of 255.vortex:DbmFileInGrpHdr, 
which is one of the functions that the heuristic regressed.  This
overall eliminates another 40 instructions from 403.gcc and visibly
reduces register pressure in 255.vortex (though this only actually
ends up saving the 2 instructions from the whole program).

llvm-svn: 60084
2008-11-26 03:20:37 +00:00
Nick Lewycky
65d37a5d9d __fastcall and __stdcall are mingw extensions to gcc for windows. Use the
__attribute__ notation which is supported on more platforms.

llvm-svn: 60083
2008-11-26 03:17:27 +00:00
Chris Lattner
603d9e1cf7 Start rewroking a subpiece of the profitability heuristic to be
phrased in terms of liveness instead of as a horrible hack.  :)

In pratice, this doesn't change the generated code for either 
255.vortex or 403.gcc, but it could cause minor code changes in 
theory.  This is framework for coming changes.

llvm-svn: 60082
2008-11-26 03:02:41 +00:00
Zhongxing Xu
985967aa25 Adjust indent.
llvm-svn: 60081
2008-11-26 02:57:24 +00:00