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

29997 Commits

Author SHA1 Message Date
Reid Spencer
79d2fad9f5 1. "unsigned" -> "uint32_t" to gaurantee its bit width on all platforms.
Size matters in this case.
2. Remove the unused whichByte private function, which was also broken.
3. Remove the non-const overload of the getWord function, getWord() is
   never used as an lvalue.
4. Rename some local variables for clarity (e.g. API -> Result).

llvm-svn: 34390
2007-02-18 18:42:35 +00:00
Reid Spencer
035cf2fca2 1. Remove dead code (lshift function).
2. Consolidate memory allocation into just two inline functions.
3. Convert "unsigned" to uint32_t to gaurantee its size.
4. Eliminate magic constants and replace with symbolic equivalent.
5. Improve code documentation slightly.
6. Simplify the logical operator code because bitwidths must be the same.
7. Fix indentation per coding standards.
8. Use exit-early style to reduce indentation in several functions.

llvm-svn: 34389
2007-02-18 18:38:44 +00:00
Reid Spencer
19f4e9457e Make add_1 exit early if carry is 0.
Fix line breaks and 80 cols violation.
Simplify operator^= since bitwidths must be the same.

llvm-svn: 34388
2007-02-18 06:39:42 +00:00
Chris Lattner
0459e976aa avoid collision with /usr/bin/sample if this ever gets installed.
llvm-svn: 34387
2007-02-18 03:03:41 +00:00
Reid Spencer
62b55a934b Implement signed output for toString.
Fix bugs in countLeadingZeros and countTrailingZeros.

llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Chris Lattner
dee1492159 temporarily revert Devang's most recent patch, which caused a large
compile-time regression in LLC.

llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Reid Spencer
3390126870 Fix some bugs in division logic.
llvm-svn: 34384
2007-02-17 22:38:07 +00:00
Evan Cheng
8ac045a4b2 - Changes how function livein's are handled, they now have a start index of 0.
- When coalescing a copy MI, if its destination is "dead", propagate the
  property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.

llvm-svn: 34383
2007-02-17 11:15:40 +00:00
Evan Cheng
259a05c582 Do not add livein's to entry MBB twice.
llvm-svn: 34382
2007-02-17 11:11:27 +00:00
Evan Cheng
d45a3628a2 Added removeLiveIn.
llvm-svn: 34381
2007-02-17 11:10:48 +00:00
Evan Cheng
35f59a6dd2 Added findRegisterDefOperand().
llvm-svn: 34380
2007-02-17 11:10:18 +00:00
Evan Cheng
897d82c747 - Use MRegister::regsOverlap().
- Allow LiveVariables to track liveness of more registers.

llvm-svn: 34379
2007-02-17 11:09:47 +00:00
Evan Cheng
2db4db48ed Added removeLiveIn and more livein iterators.
llvm-svn: 34378
2007-02-17 11:07:41 +00:00
Evan Cheng
ad05c398b1 Allow LiveVariables to track liveness of more registers.
llvm-svn: 34377
2007-02-17 11:07:08 +00:00
Evan Cheng
8c2508f1ac Added getReservedRegs().
llvm-svn: 34376
2007-02-17 11:06:00 +00:00
Evan Cheng
8f7896bacc - Added regsOverlap() to test if two registers overlap. Or in case they are
virtual registers, test if they the same.
- Added a virtual method to return target specific reserved registers, e.g. SP.

llvm-svn: 34375
2007-02-17 11:04:35 +00:00
Chris Lattner
e3eae5e265 Fix ixaddrs as well, allowing ppc64 to compile to:
_test2:
        li r2, 0
        lis r3, 1
        std r2, 9024(r3)
        blr

instead of:

_test2:
        lis r2, 1
        li r3, 0
        ori r2, r2, 9024
        std r3, 0(r2)
        blr

This implements CodeGen/PowerPC/LargeAbsoluteAddr.ll:test2

llvm-svn: 34373
2007-02-17 06:57:26 +00:00
Chris Lattner
382462d0b6 new test
llvm-svn: 34372
2007-02-17 06:57:11 +00:00
Chris Lattner
50411d5be7 Compile test/CodeGen/PowerPC/LargeAbsoluteAddr.ll to:
_test:
        lis r2, 743
        li r3, 0
        stw r3, 32751(r2)
        blr

instead of:

_test:
        li r2, 0
        stw r2, 32751(48693248)
        blr

Implement support for ppc64 as well, allowing it to produce better code.

llvm-svn: 34371
2007-02-17 06:44:03 +00:00
Chris Lattner
95f531844a Test that large absolute addresses are properly folded into addr modes on
both ppc32 and ppc64.

llvm-svn: 34370
2007-02-17 06:41:57 +00:00
Chris Lattner
8f3acb68cb print target nodes nicely
llvm-svn: 34369
2007-02-17 06:38:37 +00:00
Chris Lattner
871a3e6c91 Implement i/n/s constraints correctly. This fixes
test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll

llvm-svn: 34368
2007-02-17 06:00:35 +00:00
Chris Lattner
956bbc1712 new testcase that crashes llc
llvm-svn: 34367
2007-02-17 05:59:01 +00:00
Chris Lattner
ba911e0e15 testcase for PR1170
llvm-svn: 34366
2007-02-17 05:44:57 +00:00
Chris Lattner
16a95f81df new testcase for -fwritable-strings
llvm-svn: 34365
2007-02-17 05:07:40 +00:00
Devang Patel
953cadacbc Use inverted map to speedup collectLastUses().
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Reid Spencer
401a49c4e2 Move static functions closer to their usage.
llvm-svn: 34363
2007-02-17 03:16:00 +00:00
Reid Spencer
31731e9a99 Clean up the divide and remainder logic a bit (exit early). Use more
meaningful variable names. Add comments to document the flow.

llvm-svn: 34362
2007-02-17 02:07:07 +00:00
Chris Lattner
faeaff6b73 new testcase
llvm-svn: 34361
2007-02-17 01:44:21 +00:00
Dale Johannesen
e864bf486f adding PR 1200 comment by request
llvm-svn: 34360
2007-02-17 01:12:15 +00:00
Dale Johannesen
960bd79f88 Fixes PR 1200
llvm-svn: 34359
2007-02-17 00:44:34 +00:00
Chris Lattner
14496ddfd4 Do not dereference invalid ranges. Generalize targetdata alignment model.
This fixes the UnitTests/Vector/sumarray-dbl regressions.

llvm-svn: 34358
2007-02-17 00:41:42 +00:00
Reid Spencer
9c5efbcef2 Fix bugs introduced by constructor parameter order change.
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Chris Lattner
09f6f520bf Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
llvm-svn: 34356
2007-02-16 23:11:51 +00:00
Chris Lattner
fa6985a1d0 testcase for recent targetdata regression
llvm-svn: 34355
2007-02-16 23:11:43 +00:00
Reid Spencer
b175f70613 Remove an unnecessary predicate.
Patch by Scott Michel.

llvm-svn: 34354
2007-02-16 22:42:40 +00:00
Reid Spencer
d22266f456 Review changes:
1. Function style changes.
2. 80-col violations.
3. Better names for things.
4. Arrange constructors so they all take bit width first.
5. Add named signed and unsigned comparison functions and remove the
   corresponding operators.
6. Remove operator&& and operator|| but provide a getBoolValue function which
   converts to bool as comparison against 0. This allows the normal && and
   || operators to be used as if (X.getBoolValue() && Y.getBoolValue())

Note: this still doesn't function 100% yet. I'm working on the bugs now.
llvm-svn: 34353
2007-02-16 22:36:51 +00:00
Chris Lattner
8dd1ed7465 simplify some code, ensure that packed structures get abi alignment of 1.
llvm-svn: 34352
2007-02-16 22:25:34 +00:00
Chris Lattner
3beba5539b fix incorrect encoding of vminsw.
llvm-svn: 34351
2007-02-16 21:20:09 +00:00
Reid Spencer
5c9a15dd28 Regenerate for getrlimit/setrlimit.
llvm-svn: 34350
2007-02-16 19:17:20 +00:00
Anton Korobeynikov
87e945c62d Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Evan Cheng
5b8b96e9de Print <dead> def operands.
llvm-svn: 34343
2007-02-16 09:49:18 +00:00
Evan Cheng
64185104f1 Add live-ins to every BB.
llvm-svn: 34342
2007-02-16 09:05:02 +00:00
Reid Spencer
38c5974a57 Add missing break statements!
llvm-svn: 34341
2007-02-16 06:34:39 +00:00
Chris Lattner
9ef6d38929 update symtab section to reflect recent changes.
llvm-svn: 34340
2007-02-16 04:37:31 +00:00
Andrew Lenharth
d2c65176e6 fix build
llvm-svn: 34339
2007-02-16 02:25:55 +00:00
Andrew Lenharth
ed90594898 This was done recently
llvm-svn: 34338
2007-02-16 02:11:59 +00:00
Dale Johannesen
b1a4813b73 test commit (blank line)
llvm-svn: 34337
2007-02-16 01:54:53 +00:00
Chris Lattner
134ae17654 make mayWriteToMemory a non-virtual function
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Chris Lattner
9572ded44a convert more vectors to smallvectors, 2.8% speedup
llvm-svn: 34333
2007-02-15 22:52:10 +00:00