Reid Spencer
6eb099875c
Add some new constants.
...
llvm-svn: 34398
2007-02-19 03:18:22 +00:00
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
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
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
35f59a6dd2
Added findRegisterDefOperand().
...
llvm-svn: 34380
2007-02-17 11:10:18 +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
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
Devang Patel
953cadacbc
Use inverted map to speedup collectLastUses().
...
llvm-svn: 34364
2007-02-17 03:53:44 +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
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
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
Chris Lattner
134ae17654
make mayWriteToMemory a non-virtual function
...
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Reid Spencer
c5814f843c
For PR1195:
...
PACKED_ALIGN -> VECTOR_ALIGN
llvm-svn: 34330
2007-02-15 22:07:05 +00:00
Evan Cheng
c17b6ab5f7
Proper fix for the off-by-one bug in clear_unused_bits().
...
llvm-svn: 34328
2007-02-15 21:38:15 +00:00
Reid Spencer
3b68dab779
Fix an off-by-one bug in computing the index of the word to clear.
...
llvm-svn: 34326
2007-02-15 20:49:10 +00:00
Reid Spencer
6fd2d9d381
Make sure Capacity gets initialized too.
...
llvm-svn: 34325
2007-02-15 20:14:06 +00:00
Evan Cheng
ca4cab1cd2
Missing a ;
...
llvm-svn: 34322
2007-02-15 19:29:05 +00:00
Evan Cheng
f73b1abdea
BitVector::reference operator=(const reference& rhs) is unnecessary thanks to autoconvert to bool.
...
llvm-svn: 34320
2007-02-15 19:21:44 +00:00
Evan Cheng
471e882080
Remove unnecessary checks.
...
llvm-svn: 34319
2007-02-15 19:18:12 +00:00
Evan Cheng
25a8dc8e25
operator== returns false when two bitvectors have different sizes.
...
llvm-svn: 34317
2007-02-15 19:16:21 +00:00
Evan Cheng
84142d6607
Merges two resize() variants.
...
llvm-svn: 34316
2007-02-15 19:12:39 +00:00
Evan Cheng
fe4d7486d2
Clear no longer deleting the bits to avoid mallocs.
...
llvm-svn: 34315
2007-02-15 19:10:34 +00:00
Evan Cheng
21177a5395
BitVector::count() bugs.
...
llvm-svn: 34314
2007-02-15 19:09:36 +00:00
Evan Cheng
a916761a3a
Eliminate a redundent ctor; eliminate one more potential new [0].
...
llvm-svn: 34313
2007-02-15 19:05:25 +00:00
Evan Cheng
622cd4bd4d
1 -> 1L since BitWord has type unsigned long.
...
llvm-svn: 34312
2007-02-15 19:03:23 +00:00
Evan Cheng
a8fcf075f1
Eliminate new[0], just set Bits to NULL.
...
llvm-svn: 34311
2007-02-15 18:59:15 +00:00
Chris Lattner
fbd6928545
Add a new Value::getNameStr method, which is preferred over getName.
...
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Evan Cheng
2216148289
Inverted the condition by accident.
...
llvm-svn: 34309
2007-02-15 18:48:41 +00:00
Evan Cheng
7ff021d148
Bug fixes: assignment operator forgot to copy over size; copy ctor forgot to clear unused top bits.
...
llvm-svn: 34305
2007-02-15 08:15:58 +00:00
Zhou Sheng
9868d8d7db
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
28eaad250f
Use BitVector instead of vector<bool> which can be extremely slow.
...
llvm-svn: 34302
2007-02-15 05:59:24 +00:00
Evan Cheng
0cd0f0f232
Add a BitVector class.
...
llvm-svn: 34301
2007-02-15 05:56:11 +00:00
Reid Spencer
e7ff3305d6
For PR1195:
...
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Evan Cheng
990a0946a2
isPhysRegUsed should be const.
...
llvm-svn: 34295
2007-02-15 02:55:51 +00:00
Evan Cheng
033f2496c8
Should pass isKill and isDead to addRegOperand() as well.
...
llvm-svn: 34294
2007-02-15 02:52:40 +00:00
Reid Spencer
55e4e98a2a
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Reid Spencer
ca25d2b273
Fixed packed structure breakage from earlier TargetData patch; applied
...
Chris Lattner's code style suggestions.
Patch by Scott Michel!
llvm-svn: 34292
2007-02-15 02:11:06 +00:00
Chris Lattner
5cece73ec8
Generalize TargetData strings, to support more interesting forms of data.
...
Patch by Scott Michel.
llvm-svn: 34266
2007-02-14 05:52:17 +00:00
Reid Spencer
80ac48cfdf
Make some minor improvements to APInt:
...
1. Make all the operators use uppercase
2. Rename APIntRoundToDouble method just RoundToDouble, the APInt is
redundant.
3. Turn the class on for compilation.
llvm-svn: 34253
2007-02-13 22:41:58 +00:00
Lauro Ramos Venancio
0471446487
Add comment about original function argument alignment.
...
llvm-svn: 34243
2007-02-13 17:57:38 +00:00
Reid Spencer
0ce7199e4e
Fix a compilation error that caused the nightly test to fail.
...
llvm-svn: 34239
2007-02-13 09:26:04 +00:00
Chris Lattner
4534d3fc6e
Switch UnaryOperators to default to passing names up by const char* when possible.
...
This speeds up bcreading by 1.5%.
llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Chris Lattner
cc543b031e
add a setName variant that takes a null-terminated string. This can be
...
used to avoid std::string allocations in common cases.
llvm-svn: 34232
2007-02-13 07:53:34 +00:00
Chris Lattner
3490afcd50
fix a critical bug in smallvector, where it would destroy elements that are
...
not in its range (!).
llvm-svn: 34230
2007-02-13 07:25:36 +00:00
Chris Lattner
326271ee46
eliminate instruction ctors that take vectors.
...
llvm-svn: 34228
2007-02-13 06:22:32 +00:00
Chris Lattner
bc384d8d50
Add invokeinst and callinst ctors that don't take vectors.
...
llvm-svn: 34214
2007-02-13 01:04:01 +00:00
Chris Lattner
94ce3e4550
remove some dead methods.
...
llvm-svn: 34213
2007-02-13 00:58:44 +00:00