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

24653 Commits

Author SHA1 Message Date
Evan Cheng
cb2a0f392c Refactor scheduler code. Move register-reduction list scheduler to a
separate file. Added an initial implementation of top-down register pressure
reduction list scheduler.

llvm-svn: 28226
2006-05-11 23:55:42 +00:00
Chris Lattner
81a3c90080 Significantly revamp allocation of machine code to use free lists, real
allocation policies and much more.  All this complexity, and we have no
functionality change, woo! :)

llvm-svn: 28225
2006-05-11 23:08:08 +00:00
Chris Lattner
3fad520c62 Refactor some code, making it simpler.
When doing the initial pass of constant folding, if we get a constantexpr,
simplify the constant expr like we would do if the constant is folded in the
normal loop.

This fixes the missed-optimization regression in
Transforms/InstCombine/getelementptr.ll last night.

llvm-svn: 28224
2006-05-11 17:11:52 +00:00
Evan Cheng
6a08dd641a Add MOV16_rm / MOV32_rm and MOV16_mr / MOV32_mr to isLoadFromStackSlot and isStoreToStackSlot
llvm-svn: 28223
2006-05-11 07:33:49 +00:00
Evan Cheng
e2cebf972d Also add super- register class info.
llvm-svn: 28222
2006-05-11 07:31:44 +00:00
Evan Cheng
d6549daf76 Also add super- register classes info.
llvm-svn: 28221
2006-05-11 07:30:26 +00:00
Evan Cheng
7028ff2e25 Set weight of zero length intervals to infinite to prevent them from being
spilled.

llvm-svn: 28220
2006-05-11 07:29:24 +00:00
Evan Cheng
da04c3aab4 Backing out previous check-in.
llvm-svn: 28219
2006-05-11 07:28:16 +00:00
Owen Anderson
0fbf479d8e Fix some problems linking stuff in libTarget.
llvm-svn: 28218
2006-05-11 03:10:15 +00:00
Evan Cheng
03fa9eb65e If the live interval legnth is essentially zero, i.e. in every live range
the use follows def immediately, it doesn't make sense to spill it and
hope it will be easier to allocate for this LI.

llvm-svn: 28217
2006-05-10 22:30:41 +00:00
Evan Cheng
12417fb32c Update test case
llvm-svn: 28216
2006-05-10 19:53:05 +00:00
Chris Lattner
e8fe3f2a08 Two changes:
1. Implement InstCombine/deadcode.ll by not adding instructions in unreachable
   blocks (due to constants in conditional branches/switches) to the worklist.
   This causes them to be deleted before instcombine starts up, leading to
   better optimization.

2. In the prepass over instructions, do trivial constprop/dce as we go.  This
   has the effect of improving the effectiveness of #1.  In addition, it
   *significantly* speeds up instcombine on test cases with large amounts of
   constant folding code (for example, that produced by code specialization
   or partial evaluation).  In one example, it speeds up instcombine from
   0.0589s to 0.0224s with a release build (a 2.6x speedup).

llvm-svn: 28215
2006-05-10 19:00:36 +00:00
Chris Lattner
f99a429a12 New testcase, check that dead code doesn't pessimize instcombine
llvm-svn: 28214
2006-05-10 18:56:04 +00:00
Chris Lattner
085cfba0ca Fix the PowerPC JIT-only failure on UnitTests/Vector/sumarray-dbl, which is
really a bad codegen bug that LLC happens to get lucky with. I must chat with
Nate for the proper fix.

llvm-svn: 28213
2006-05-10 06:38:32 +00:00
Evan Cheng
9f269c1bef Templatify RegReductionPriorityQueue
llvm-svn: 28212
2006-05-10 06:16:44 +00:00
Chris Lattner
39290ea978 Add alloca/malloc ctors that don't take array sizes.
llvm-svn: 28211
2006-05-10 04:38:35 +00:00
Chris Lattner
32ddb45079 Add an assertion for a common error
llvm-svn: 28210
2006-05-10 04:32:43 +00:00
Evan Cheng
2af8a9f980 Watch out for the following case:
1. Use expects a chain output.
2. Node is expanded into multiple target ops.
3. One of the inner node produces a chain, the outer most one doesn't.

llvm-svn: 28209
2006-05-10 02:47:57 +00:00
Evan Cheng
0655b538d6 Fix a load folding bug. It is exposed by a multi- resulting instructions
def : Pat<> pattern.

llvm-svn: 28208
2006-05-10 00:05:46 +00:00
Nate Begeman
3af196c9b2 Fix PR773
llvm-svn: 28207
2006-05-09 18:20:51 +00:00
Chris Lattner
adef4bbf27 This method doesn't need to be virtual, thanks to Reid for pointing this out.
llvm-svn: 28206
2006-05-09 17:29:17 +00:00
Chris Lattner
486e0660b7 Fix a regression in my patch from last night that broke the llvmgcc4 build on
ppc

llvm-svn: 28205
2006-05-09 16:41:59 +00:00
Chris Lattner
56680711dc Indent .data/.text in the .s file
llvm-svn: 28204
2006-05-09 16:15:00 +00:00
Evan Cheng
0f8516a3e0 Another instruction scheduling test case
llvm-svn: 28203
2006-05-09 07:20:24 +00:00
Evan Cheng
1a8feb189e Add pseudo dependency to force a def&use operand to be scheduled last (unless
the distance between the def and another use is much longer). This is under
option control for now "-sched-lower-defnuse".

llvm-svn: 28201
2006-05-09 07:13:34 +00:00
Evan Cheng
3f72d2121b Debugging info
llvm-svn: 28200
2006-05-09 06:55:15 +00:00
Evan Cheng
1f5c530d04 Remove a completed entry.
llvm-svn: 28199
2006-05-09 06:54:05 +00:00
Evan Cheng
02e8d5f2d6 Test case for PR770
llvm-svn: 28198
2006-05-09 06:48:12 +00:00
Evan Cheng
aad3fe008e PR 770 - permit coallescing of registers in subset register classes.
llvm-svn: 28197
2006-05-09 06:37:48 +00:00
Evan Cheng
e989b1534a Added sub- register classes information.
llvm-svn: 28196
2006-05-09 06:35:30 +00:00
Evan Cheng
87b66b9aec Add sub-register class information.
llvm-svn: 28195
2006-05-09 06:34:26 +00:00
Chris Lattner
b7152b0b42 Implement MASM sections correctly, without a "has masm sections flag" and a bunch of special case code.
llvm-svn: 28194
2006-05-09 05:33:48 +00:00
Chris Lattner
9669e5ece6 Implement MASM sections correctly, without a "has masm sections flag" and a
bunch of special case code.

llvm-svn: 28193
2006-05-09 05:33:28 +00:00
Chris Lattner
28fe830b3b Oh yeah, there are two of these now, unify both.
llvm-svn: 28192
2006-05-09 05:24:50 +00:00
Chris Lattner
d2aea9851e Setting SwitchToSectionDirective properly in the MASM backend permits a bunch
of code to be unified.

llvm-svn: 28191
2006-05-09 05:23:12 +00:00
Chris Lattner
85032c8c5c MASM doesn't have one of these.
llvm-svn: 28190
2006-05-09 05:21:47 +00:00
Chris Lattner
830bed591e Don't prefix section directives with a tab. Doing so causes blank lines to
be emitted to the .s file.

llvm-svn: 28189
2006-05-09 05:19:59 +00:00
Chris Lattner
baefeb1e09 Make the masm codepath work like the normal code path.
llvm-svn: 28188
2006-05-09 05:15:58 +00:00
Chris Lattner
8301da3ffe Preserve prior behavior
llvm-svn: 28187
2006-05-09 05:15:24 +00:00
Chris Lattner
6ede576b55 The MASM asmprinter has been fixed, these hacks are no longer needed.
llvm-svn: 28186
2006-05-09 05:13:34 +00:00
Chris Lattner
0c4a1e56f4 Fix the MASM asmprinter's lies. It does not want to emit code to .text/.data
it wants it emitted to _text/_data.

llvm-svn: 28185
2006-05-09 05:12:53 +00:00
Chris Lattner
f45b6d5c08 Split SwitchSection into SwitchTo{Text|Data}Section methods.
llvm-svn: 28184
2006-05-09 04:59:56 +00:00
Chris Lattner
a5f13d3120 Split SwitchSection into the SwitchTo{Text|Data}Section functions, to better
support assemblers that distinguish the two.

llvm-svn: 28183
2006-05-09 04:59:30 +00:00
Chris Lattner
71c68064f9 Some notes and thoughts to myself
llvm-svn: 28182
2006-05-09 04:58:46 +00:00
Chris Lattner
f49a22d601 Patch to make some xforms preserve each other. Patch contributed by
Domagoj Babic!

llvm-svn: 28181
2006-05-09 04:13:41 +00:00
Reid Spencer
9e06c1b17f Use the -dumpversion option to llvm-gcc which gives us just the version #
and is unlikely to change in future releases. This also simplifies the
parsing of the full and major llvm-gcc version numbers in the script.

llvm-svn: 28180
2006-05-09 00:31:01 +00:00
Chris Lattner
6e58d3a317 Move some methods out of line so that MutexGuard.h isn't needed in a public header.
llvm-svn: 28179
2006-05-08 22:00:52 +00:00
Chris Lattner
2a1973c8c2 Move methods out of line so that MutexGuard.h isn't required in the header.
llvm-svn: 28178
2006-05-08 22:00:26 +00:00
Chris Lattner
5609ba71a5 Another bad case I noticed
llvm-svn: 28177
2006-05-08 21:39:45 +00:00
Chris Lattner
4f3345f1f1 add a note
llvm-svn: 28176
2006-05-08 21:24:21 +00:00