1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 22:42:52 +01:00
Commit Graph

17895 Commits

Author SHA1 Message Date
Reid Spencer
6890147648 Add support for the noreturn and nounwind function attributes.
llvm-svn: 35258
2007-03-22 02:13:23 +00:00
Nick Lewycky
428523f51a Fix broken optimization disabled by a logic bug.
Analyze GEPs. If the indices are all zero, transfer whether the pointer is
known to be not null through the GEP.

Add a few more cases for xor and shift instructions.

llvm-svn: 35257
2007-03-22 02:02:51 +00:00
Evan Cheng
d7be4893f4 More opportunities to reduce load size.
llvm-svn: 35254
2007-03-22 01:54:19 +00:00
Evan Cheng
da92165bab Fix for PR1257. Bug in live range shortening as a result of copy coalescing
where the destination is dead.

llvm-svn: 35252
2007-03-22 01:26:05 +00:00
Reid Spencer
bdfbda05fb For PR1248:
* Fix some indentation and comments in InsertRangeTest
* Add an "IsSigned" parameter to AddWithOverflow and make it handle signed
  additions. Also, APIntify this function so it works with any bitwidth.
* For the icmp pred ([us]div %X, C1), C2 transforms, exit early if the
  div instruction's RHS is zero.
* Finally, for icmp pred (sdiv %X, C1), -C2, fix an off-by-one error. The
  HiBound needs to be incremented in order to get the range test correct.

llvm-svn: 35247
2007-03-21 23:19:50 +00:00
Dale Johannesen
44c0a5d545 repair x86 performance, dejagnu problems from previous change
llvm-svn: 35245
2007-03-21 21:51:52 +00:00
Anton Korobeynikov
c0842af02d Add TODO list for MSIL backend
llvm-svn: 35244
2007-03-21 21:48:59 +00:00
Anton Korobeynikov
bc43d296b2 Let the new backend begin!
llvm-svn: 35242
2007-03-21 21:38:25 +00:00
Dale Johannesen
fb7b59f5dd add generation of unnecessary push/pop around calls
llvm-svn: 35241
2007-03-21 21:16:39 +00:00
Evan Cheng
9867632e64 fold (truncate (srl (load x), c)) -> (smaller load (x+c/vt bits))
llvm-svn: 35239
2007-03-21 20:14:05 +00:00
Nicolas Geoffray
205541ef78 Protect R31's frame offset from being used by callee-saved registers, when R31
is the frame pointer.

llvm-svn: 35233
2007-03-21 16:44:14 +00:00
Zhou Sheng
427b6bec97 Fix a bug in getAllOnesValue() which broke
some test cases for bitwidth > 64.

llvm-svn: 35232
2007-03-21 04:34:37 +00:00
Evan Cheng
00a5cbf9e7 Mark re-materializable instructions.
llvm-svn: 35230
2007-03-21 00:16:56 +00:00
Evan Cheng
fb9c4c2edc Updated.
llvm-svn: 35229
2007-03-20 22:32:39 +00:00
Evan Cheng
516a83595d Potential spiller improvement.
llvm-svn: 35228
2007-03-20 22:22:38 +00:00
Dale Johannesen
3e422e3b49 do not share old induction variables when this would result in invalid
instructions (that would have to be split later)

llvm-svn: 35227
2007-03-20 21:54:54 +00:00
Dale Johannesen
50a22f6fe6 maintain LiveIn when splitting blocks (register scavenging needs it)
llvm-svn: 35226
2007-03-20 21:35:06 +00:00
Devang Patel
3a426e1c86 DominanceFrontier::calculate().
Avoid recursion, Use iterative algorithm.

llvm-svn: 35225
2007-03-20 21:25:31 +00:00
Jeff Cohen
8dea6ada6f Fix some VC++ warnings.
llvm-svn: 35224
2007-03-20 20:43:18 +00:00
Jeff Cohen
21c7fc9c1f Fix (and simplify) 48-bit byte swap.
Get pos/neg infinity the correct way.

llvm-svn: 35223
2007-03-20 20:42:36 +00:00
Devang Patel
18146cf2a2 LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.

llvm-svn: 35221
2007-03-20 20:18:12 +00:00
Lauro Ramos Venancio
632ac0e289 Code clean up.
llvm-svn: 35220
2007-03-20 20:09:03 +00:00
Evan Cheng
fe301e0f29 Minor bug.
llvm-svn: 35219
2007-03-20 19:32:11 +00:00
Lauro Ramos Venancio
11d7d3fcaf bugfix: When the source register of CALL_NOLINK was LR, the following code was emitted:
mov lr, pc
    bx lr
So, the function was not called.

llvm-svn: 35218
2007-03-20 17:57:23 +00:00
Reid Spencer
d37f0f007d Regenerate.
llvm-svn: 35215
2007-03-20 17:19:31 +00:00
Reid Spencer
3cc307f4d7 Don't delete things before their last use (avoids bad reads).
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Lauro Ramos Venancio
9659c8befc CopyToReg source operand can be a physical register.
llvm-svn: 35213
2007-03-20 16:46:44 +00:00
Zhou Sheng
0ae1c9e1ad Simplify isHighOnes().
llvm-svn: 35211
2007-03-20 12:49:06 +00:00
Evan Cheng
0176b9859d First cut trivial re-materialization support.
llvm-svn: 35208
2007-03-20 08:13:50 +00:00
Evan Cheng
4fec9d7228 Make two piece constant generation as a single instruction. It's re-materialized as a load from constantpool.
llvm-svn: 35207
2007-03-20 08:11:30 +00:00
Evan Cheng
11976abd1e New entry.
llvm-svn: 35206
2007-03-20 08:10:17 +00:00
Evan Cheng
41f4f032ee Added MRegisterInfo hook to re-materialize an instruction.
llvm-svn: 35205
2007-03-20 08:09:38 +00:00
Chris Lattner
b9cc0ade43 Two changes:
1) codegen a shift of a register as a shift, not an LEA.
2) teach the RA to convert a shift to an LEA instruction if it wants something
   in three-address form.

This gives us asm diffs like:

-       leal (,%eax,4), %eax
+       shll $2, %eax

which is faster on some processors and smaller on all of them.

and, more interestingly:

-       movl 24(%esi), %eax
-       leal (,%eax,4), %edi
+       movl 24(%esi), %edi
+       shll $2, %edi

Without #2, #1 was a significant pessimization in some cases.

This implements CodeGen/X86/shift-codegen.ll

llvm-svn: 35204
2007-03-20 06:08:29 +00:00
Chris Lattner
1ed603c0d9 fix indentation
llvm-svn: 35202
2007-03-20 02:25:53 +00:00
Reid Spencer
81602be7e3 Regenerate.
llvm-svn: 35199
2007-03-20 01:13:36 +00:00
Reid Spencer
4a8b426ab2 Plug some PATypeHolder memory leaks.
llvm-svn: 35198
2007-03-20 01:13:00 +00:00
Dale Johannesen
516d98c710 use types of loads and stores, not address, in CheckForIVReuse
llvm-svn: 35197
2007-03-20 00:47:50 +00:00
Dale Johannesen
c526b970ce fix obvious comment bug
llvm-svn: 35196
2007-03-20 00:30:56 +00:00
Chris Lattner
6dbed4d4ca Fix a nasty memory leak, caused by my revamp of the value symbol table.
llvm-svn: 35195
2007-03-20 00:18:10 +00:00
Reid Spencer
2f1ee85f90 Make isOneBitSet faster by using APInt::isPowerOf2. Thanks Chris.
llvm-svn: 35194
2007-03-20 00:16:52 +00:00
Reid Spencer
a792b71ab3 APIntify the isHighOnes utility function.
llvm-svn: 35190
2007-03-19 21:29:50 +00:00
Reid Spencer
41d254c7f4 Fix coding standards violation.
llvm-svn: 35189
2007-03-19 21:19:02 +00:00
Reid Spencer
4009f1eacb Implement isMaxValueMinusOne in terms of APInt instead of uint64_t.
Patch by Sheng Zhou.

llvm-svn: 35188
2007-03-19 21:10:28 +00:00
Reid Spencer
57a15f4445 Implement isMinValuePlusOne using facilities of APInt instead of uint64_t
Patch by Zhou Sheng.

llvm-svn: 35187
2007-03-19 21:08:07 +00:00
Reid Spencer
1985e3645b Implement isOneBitSet in terms of APInt::countPopulation.
llvm-svn: 35186
2007-03-19 21:04:43 +00:00
Reid Spencer
367a2917c0 1. Use APInt::getSignBit to reduce clutter (patch by Sheng Zhou)
2. Replace uses of the "isPositive" utility function with APInt::isPositive

llvm-svn: 35185
2007-03-19 20:58:18 +00:00
Reid Spencer
49ea42b719 Remove a redundant clause in an if statement.
Patch by Sheng Zhou.

llvm-svn: 35184
2007-03-19 20:47:50 +00:00
Reid Spencer
ea5bcde3c8 Regenerate.
llvm-svn: 35183
2007-03-19 20:40:51 +00:00
Reid Spencer
7f92fc05cd Fix test/Assembler/2007-03-19-NegValue.ll by using the new "isSigned"
parameter on ConstantInt::get to indicate the signedness of the intended
value.

llvm-svn: 35182
2007-03-19 20:40:22 +00:00
Reid Spencer
7d20e42a97 Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll

llvm-svn: 35181
2007-03-19 20:39:08 +00:00