| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 62512
|
|
|
|
| |
llvm-svn: 57384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use raw_ostream instead of std::ostream. Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).
Other interesting changes:
1) This makes Value::print be non-virtual.
2) AP[S]Int and ConstantRange can no longer print to ostream directly,
use raw_ostream instead.
3) This fixes a bug in raw_os_ostream where it didn't flush itself
when destroyed.
4) This adds a new SDNode::print method, instead of only allowing "dump".
A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream
versions.
This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.
llvm-svn: 55263
|
|
|
|
|
|
|
| |
and the slow-path cases out of line. This speeds up instcombine
a bit in real world cases. Patch contributed by m-s.
llvm-svn: 55063
|
|
|
|
| |
llvm-svn: 55053
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
returning an std::string by value, it fills in a SmallString/SmallVector
passed in. This significantly reduces string thrashing in some cases.
More specifically, this:
- Adds an operator<< and a print method for APInt that allows you to
directly send them to an ostream.
- Reimplements APInt::toString to be much simpler and more efficient
algorithmically in addition to not thrashing strings quite as much.
This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter. This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.
llvm-svn: 54873
|
|
|
|
| |
llvm-svn: 54869
|
|
|
|
|
|
| |
count.
llvm-svn: 53810
|
|
|
|
|
|
|
|
| |
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.
llvm-svn: 52638
|
|
|
|
| |
llvm-svn: 52602
|
|
|
|
|
|
|
|
|
| |
over-shift-right should return -1. So here it should be signed-extended,
when bitwidth larger than 64.
test case: llvm/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll
llvm-svn: 51999
|
|
|
|
| |
llvm-svn: 50590
|
|
|
|
| |
llvm-svn: 49496
|
|
|
|
|
|
|
| |
marked read-write. Use const so that they can be allocated in a
read-only segment.
llvm-svn: 48800
|
|
|
|
| |
llvm-svn: 48421
|
|
|
|
| |
llvm-svn: 48035
|
|
|
|
|
|
| |
instead of uint32_t for the shift/rotate count operand type.
llvm-svn: 47741
|
|
|
|
|
|
|
| |
profile of the APSInt object. This caused unexpected Profile collisions where
none should have occurred.
llvm-svn: 47338
|
|
|
|
|
|
| |
being consistent with the rest of the APInt implementation.
llvm-svn: 47138
|
|
|
|
| |
llvm-svn: 47086
|
|
|
|
| |
llvm-svn: 46188
|
|
|
|
| |
llvm-svn: 45418
|
|
|
|
| |
llvm-svn: 45342
|
|
|
|
|
|
| |
Support libraries separately into their own module.
llvm-svn: 44852
|
|
|
|
| |
llvm-svn: 44296
|
|
|
|
|
|
| |
instead of returning some random large number.
llvm-svn: 44294
|
|
|
|
| |
llvm-svn: 42909
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arbitrary range of bits embedded in the middle of another bignum.
This kind of operation is desirable in many cases of software
floating point, e.g. converting bignum integers to floating point
numbers of fixed precision (you want to extract the precision most
significant bits).
Elsewhere, add an assertion, and exit the shift functions early if
the shift count is zero.
llvm-svn: 42745
|
|
|
|
| |
llvm-svn: 42670
|
|
|
|
|
|
|
|
| |
part widths. Also, return the number of parts actually required to
hold the result's value.
Remove an over-cautious condition from rounding of float->hex conversion.
llvm-svn: 42669
|
|
|
|
|
|
|
|
|
|
| |
bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers. Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.
llvm-svn: 42210
|
|
|
|
| |
llvm-svn: 42068
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).
llvm-svn: 41967
|
|
|
|
|
|
| |
Add an APSInt::toString() method.
llvm-svn: 41309
|
|
|
|
| |
llvm-svn: 41203
|
|
|
|
|
|
|
|
|
|
|
| |
two's complement bignum arithmetic. They could be used to
implement much of APInt, but the idea is they are enough to
implement APFloat as well, which the current APInt interface
is not suited for.
Patch by Neil Booth!
llvm-svn: 41124
|
|
|
|
|
|
|
| |
can't use getZExtValue() to extract the low order bits for each digit.
Instead, we need to access the low order word directly.
llvm-svn: 37242
|
|
|
|
| |
llvm-svn: 37175
|
|
|
|
|
|
| |
undefined behavior when the width > 64 bits.
llvm-svn: 37153
|
|
|
|
|
|
|
|
| |
not being generated correctly because the shl operator does not mutate its
object but returns a new value. Also, make the distinction between radix
16 and the others more clear.
llvm-svn: 37111
|
|
|
|
| |
llvm-svn: 37026
|
|
|
|
|
|
|
|
|
|
|
| |
types:
1. Functions to compute div/rem at the same time.
2. Further assurance that an APInt with 0 bitwidth cannot be constructed.
3. Left and right rotate operations.
4. An exactLogBase2 function which requires an exact power of two or it
returns -1.
llvm-svn: 37025
|
|
|
|
|
|
|
| |
shift amount is 0. Previously this code would do a lshr by the bit width
which can lead to incorrect results.
llvm-svn: 37010
|
|
|
|
| |
llvm-svn: 36680
|
|
|
|
| |
llvm-svn: 35977
|
|
|
|
|
|
| |
represent a string in binary form by an APInt.
llvm-svn: 35968
|
|
|
|
| |
llvm-svn: 35901
|
|
|
|
|
|
| |
some test cases for bitwidth > 64.
llvm-svn: 35232
|
|
|
|
|
|
| |
Get pos/neg infinity the correct way.
llvm-svn: 35223
|
|
|
|
| |
llvm-svn: 35189
|