History log of /llvm-project/llvm/lib/Support/APInt.cpp (Results 301 – 325 of 434)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 10f1733d 30-Jun-2009 Dan Gohman <gohman@apple.com>

Reapply 74494, this time removing the conflicting definition of operator<<
in APIntTest.cpp.

llvm-svn: 74550


# 778a5177 30-Jun-2009 Bill Wendling <isanbard@gmail.com>

Temporarily revert r74494. It was causing failures in the unit tests.

llvm-svn: 74515


# e95d409b 30-Jun-2009 Dan Gohman <gohman@apple.com>

Define an operator<< for APInt to be used with std::ostream.
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.

llvm-svn: 74494


# db338f3f 21-May-2009 Evan Cheng <evan.cheng@apple.com>

80 column violation.

llvm-svn: 72235


# 889285d4 13-May-2009 Mike Stump <mrs@apple.com>

Fix whitespacing (space after switch).

llvm-svn: 71738


# fe0c648f 30-Apr-2009 Jay Foad <jay.foad@gmail.com>

Move helper functions for optimizing division by constant into the APInt
class.

llvm-svn: 70488


# b869a0ad 25-Apr-2009 Chris Lattner <sabre@nondot.org>

Fix PR4040: APInt's string constructor is too strict
patch by Jeff Yasskin!

llvm-svn: 70058


# cff6953c 01-Apr-2009 Dan Gohman <gohman@apple.com>

Use CHAR_BIT instead of hard-coding 8 in several places where it
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.

llvm-svn: 68227


# 82084650 19-Mar-2009 Duncan Sands <baldrick@free.fr>

Fix comment typo.

llvm-svn: 67302


# 7440952c 13-Mar-2009 Stuart Hastings <stuart@apple.com>

Fix a hashing bug in APInt. A certain pathological testcase (too
large for the testsuite) took over six minutes to compile on my Mac.
The patched LLVM-GCC compiles that testcase in three seconds (GC

Fix a hashing bug in APInt. A certain pathological testcase (too
large for the testsuite) took over six minutes to compile on my Mac.
The patched LLVM-GCC compiles that testcase in three seconds (GCC
takes less than one second). This hash function is more complex
(about 35 instructions on x86) than what Chris wanted, but I expect it
will be well-behaved with arbitrary inputs.

Thank you to everyone who responded to my previous request for advice.

llvm-svn: 66962

show more ...


Revision tags: llvmorg-2.5.0
# ec39eb85 27-Jan-2009 Torok Edwin <edwintorok@gmail.com>

APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit

APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.

llvm-svn: 63107

show more ...


# 77527f58 21-Jan-2009 Chris Lattner <sabre@nondot.org>

Remove uses of uint32_t in favor of 'unsigned' for better
compatibility with cygwin. Patch by Jay Foad!

llvm-svn: 62695


# 030c450f 19-Jan-2009 Nick Lewycky <nicholas@mxc.ca>

Fix typo, sentence fragment.

llvm-svn: 62512


Revision tags: llvmorg-2.4.0
# d57b7603 11-Oct-2008 Chris Lattner <sabre@nondot.org>

rearrange some code.

llvm-svn: 57384


# 0c19df48 23-Aug-2008 Chris Lattner <sabre@nondot.org>

Switch the asmprinter (.ll) and all the stuff it requires over to
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.

Switch the asmprinter (.ll) and all the stuff it requires over to
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

show more ...


# 1ac3e254 20-Aug-2008 Chris Lattner <sabre@nondot.org>

Move the fast-path (<=i64) cases of various APInt methods inline
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


# 0f23237b 20-Aug-2008 Dan Gohman <gohman@apple.com>

It's not necessary to check if a value is null before delete[].

llvm-svn: 55053


# 17f7165f 17-Aug-2008 Chris Lattner <sabre@nondot.org>

Rework the routines that convert AP[S]Int into a string. Now, instead of
returning an std::string by value, it fills in a SmallString/SmallVector
passed in. This significantly reduces string thrash

Rework the routines that convert AP[S]Int into a string. Now, instead of
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

show more ...


# 8fcea67a 17-Aug-2008 Chris Lattner <sabre@nondot.org>

remove a dead APInt ctor.

llvm-svn: 54869


# f0d21cdd 20-Jul-2008 Wojciech Matyjewicz <wmatyjewicz@fastmail.fm>

Fix PR2088. Use modulo linear equation solver to compute loop iteration
count.

llvm-svn: 53810


# 41b744dc 23-Jun-2008 Wojciech Matyjewicz <wmatyjewicz@fastmail.fm>

First step to fix PR2088. Implement routine to compute the
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the wo

First step to fix PR2088. Implement routine to compute the
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

show more ...


# 33204b7c 21-Jun-2008 Dan Gohman <gohman@apple.com>

Avoid creating a redundant zero APInt.

llvm-svn: 52602


Revision tags: llvmorg-2.3.0
# 1247c077 05-Jun-2008 Zhou Sheng <zhousheng00@gmail.com>

As comments said, for negative value, the arithmetic
over-shift-right should return -1. So here it should be signed-extended,
when bitwidth larger than 64.

test case: llvm/test/ExecutionEngine/2008

As comments said, for negative value, the arithmetic
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

show more ...


# 82b9e962 02-May-2008 Evan Cheng <evan.cheng@apple.com>

Suppress -Wshorten-64-to-32 warnings for 64-bit hosts.

llvm-svn: 50590


# f4bc7824 10-Apr-2008 Dan Gohman <gohman@apple.com>

Make several symbols static.

llvm-svn: 49496


1...<<1112131415161718