Commit Graph

17321 Commits

Author SHA1 Message Date
Reid Spencer da81bf4d3e For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.

llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Reid Spencer 861c1cb67a 1. Fix some indentation and variable names in the get{Min,Max}Value methods.
2. Implement toString for power-of-2 radix without using divide and always
   printing full words. This allows hex/binary to look at the bit
   respresentation of the APInt as well as avoid bugs in divide.

llvm-svn: 34396
2007-02-18 22:29:05 +00:00
Chris Lattner 9f4707eb04 fix comment
llvm-svn: 34395
2007-02-18 22:10:58 +00:00
Chris Lattner a6f54c0e2c simplify pass, delete dead gvar protos as well.
llvm-svn: 34394
2007-02-18 22:10:34 +00:00
Reid Spencer be4ddf6856 1. Use APINT_WORD_SIZE instead of sizeof(uint64_t)
2. Teach slt about signedness.
3. Teach roundToDouble to properly sign extend.

llvm-svn: 34391
2007-02-18 20:09:41 +00:00
Reid Spencer a856b6e985 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 ee0a685ea1 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
Reid Spencer fbd48a566a Implement signed output for toString.
Fix bugs in countLeadingZeros and countTrailingZeros.

llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Chris Lattner 9df8be40fe 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 26c6616e4b Fix some bugs in division logic.
llvm-svn: 34384
2007-02-17 22:38:07 +00:00
Evan Cheng 2605082f0e - 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 a3d3599210 Do not add livein's to entry MBB twice.
llvm-svn: 34382
2007-02-17 11:11:27 +00:00
Evan Cheng 41d2a1d8bf Added removeLiveIn.
llvm-svn: 34381
2007-02-17 11:10:48 +00:00
Evan Cheng 6accd480a2 Added findRegisterDefOperand().
llvm-svn: 34380
2007-02-17 11:10:18 +00:00
Evan Cheng ef932b067d - Use MRegister::regsOverlap().
- Allow LiveVariables to track liveness of more registers.

llvm-svn: 34379
2007-02-17 11:09:47 +00:00
Evan Cheng 9865be6d40 Added getReservedRegs().
llvm-svn: 34376
2007-02-17 11:06:00 +00:00
Chris Lattner 1f7d60262e 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 4a9c0bb147 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 56e5fea163 print target nodes nicely
llvm-svn: 34369
2007-02-17 06:38:37 +00:00
Chris Lattner a9f917af59 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
Devang Patel 98354dabc1 Use inverted map to speedup collectLastUses().
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Reid Spencer 100502d256 Move static functions closer to their usage.
llvm-svn: 34363
2007-02-17 03:16:00 +00:00
Reid Spencer 3986776fbd 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
Dale Johannesen 12920dda9e Fixes PR 1200
llvm-svn: 34359
2007-02-17 00:44:34 +00:00
Chris Lattner 04eb16b415 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 a32372d110 Fix bugs introduced by constructor parameter order change.
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Chris Lattner dc64b9d379 Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
llvm-svn: 34356
2007-02-16 23:11:51 +00:00
Reid Spencer e4ff249d26 Remove an unnecessary predicate.
Patch by Scott Michel.

llvm-svn: 34354
2007-02-16 22:42:40 +00:00
Reid Spencer 1d0721209d 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 f9122c4512 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 8091f28d1a fix incorrect encoding of vminsw.
llvm-svn: 34351
2007-02-16 21:20:09 +00:00
Anton Korobeynikov d01defedf6 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 66cb162f92 Print <dead> def operands.
llvm-svn: 34343
2007-02-16 09:49:18 +00:00
Evan Cheng 7238410766 Add live-ins to every BB.
llvm-svn: 34342
2007-02-16 09:05:02 +00:00
Andrew Lenharth 9d4819be08 fix build
llvm-svn: 34339
2007-02-16 02:25:55 +00:00
Andrew Lenharth b8d6fa20bb This was done recently
llvm-svn: 34338
2007-02-16 02:11:59 +00:00
Dale Johannesen 915e15481e test commit (blank line)
llvm-svn: 34337
2007-02-16 01:54:53 +00:00
Chris Lattner c992e18f8d make mayWriteToMemory a non-virtual function
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Chris Lattner 99c6cf60f1 convert more vectors to smallvectors, 2.8% speedup
llvm-svn: 34333
2007-02-15 22:52:10 +00:00
Chris Lattner af6094fe3f change some vectors to smallvectors. This speeds up instcombine on 447.dealII
by 5%.

llvm-svn: 34332
2007-02-15 22:48:32 +00:00
Reid Spencer 03d4a8a368 For PR1195:
PACKED_ALIGN -> VECTOR_ALIGN

llvm-svn: 34330
2007-02-15 22:07:05 +00:00
Chris Lattner cf835ff85a rewrite Value::takeName to take advantage of the new symtab stuff. This
causes it to require no allocations and no symtab lookups in the common
case.  This speeds up instcombine 9.2% on 447.dealII.

llvm-svn: 34324
2007-02-15 20:01:43 +00:00
Chris Lattner 7907e5fe07 switch an std::set to a SmallPtr set, this speeds up instcombine by 9.5%
on 447.dealII

llvm-svn: 34323
2007-02-15 19:41:52 +00:00
Chris Lattner 1e92e06779 Implement Function::getIntrinsicID without it needing to call Value::getName,
which allocates a string.  This speeds up instcombine on 447.dealII by 5%.

llvm-svn: 34318
2007-02-15 19:17:16 +00:00
Chris Lattner fd27ed9733 Add a new Value::getNameStr method, which is preferred over getName.
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Reid Spencer 40aa2fdac6 For PR1202:
Make sure we found an existing Alignment before overwriting it.

llvm-svn: 34308
2007-02-15 18:34:36 +00:00
Chris Lattner 68dcec6fea fix indentation
llvm-svn: 34307
2007-02-15 18:19:15 +00:00
Chris Lattner 21ebae3394 Apply B Scott Michel's patch for PR1184, which improves diagnostics in an
abort case.

llvm-svn: 34306
2007-02-15 18:17:56 +00:00
Zhou Sheng cfa2ac0592 Fix some buges:
1. Make getMinValue() returns the right value.
2. Fix the ByteSwap() crash problem.
3. Make Postfix increment work correctly.
4. Fix some bugs in LogBase2, Hi/LoBits and UDiv.

llvm-svn: 34304
2007-02-15 06:36:31 +00:00
Evan Cheng 14edd1989b Use BitVector instead of vector<bool> which can be extremely slow.
llvm-svn: 34302
2007-02-15 05:59:24 +00:00