Reid Spencer
a32372d110
Fix bugs introduced by constructor parameter order change.
...
llvm-svn: 34357
2007-02-17 00:18:01 +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
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
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
Reid Spencer
0c5db23119
Use brute-force algorithm for to_string. It doesn't have to be efficient
...
at this point, it just needs to work so we can test things reliably.
llvm-svn: 34262
2007-02-14 02:52:25 +00:00
Reid Spencer
5153525402
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
Zhou Sheng
d707d63317
1. Make APInt::shl work correctly and more efficiently.
...
2. Add functions to support the numberical conversion between APInt and
double/float.
llvm-svn: 34201
2007-02-12 20:02:55 +00:00
Chris Lattner
77baa56a70
Add support for removing elements out of StringMap.
...
llvm-svn: 34185
2007-02-11 20:58:00 +00:00
Chris Lattner
db08c1bc83
Replace the ugly FindValue method with STL-like find methods.
...
llvm-svn: 34183
2007-02-11 19:49:41 +00:00
Chris Lattner
9521fec8cf
remove support for stringmap visitors now that iterators exist.
...
llvm-svn: 34180
2007-02-11 08:22:15 +00:00
Chris Lattner
e15605ccbf
add support for iterators.
...
llvm-svn: 34179
2007-02-11 08:20:35 +00:00
Zhou Sheng
e93db8fba2
Eliminates friend function declaration inside APInt, instead, adds public
...
methods as those global function's internal implementation.
llvm-svn: 34083
2007-02-09 07:48:24 +00:00
Chris Lattner
751a42010b
Rename CStringMap -> StringMap, since it now supports nul characters in the
...
strings.
llvm-svn: 34064
2007-02-08 19:20:57 +00:00
Chris Lattner
259ba20bd8
Allow cstringmap to contain strings with nul characters in them.
...
llvm-svn: 34062
2007-02-08 19:08:37 +00:00
Zhou Sheng
11eea86410
Switched this file on accidently.
...
llvm-svn: 34054
2007-02-08 16:45:48 +00:00
Zhou Sheng
fbf61eaba7
As Chris and Reid suggested, remove "isSigned" field from APInt, instead,
...
add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.
llvm-svn: 34053
2007-02-08 14:35:19 +00:00
Zhou Sheng
3e8022d61d
As Chris suggested, fixed some problems. (This is the first part)
...
llvm-svn: 33989
2007-02-07 06:14:53 +00:00
Chris Lattner
e346767f06
do not let the table fill up with tombstones.
...
llvm-svn: 33973
2007-02-07 01:11:25 +00:00
Zhou Sheng
94b623aad4
As Reid suggested, fixed some problems.
...
llvm-svn: 33955
2007-02-06 06:04:53 +00:00
Chris Lattner
28cbd1d624
Disable this for now.
...
llvm-svn: 33953
2007-02-06 05:38:37 +00:00
Zhou Sheng
dac63788ab
Add a class APInt to represent arbitrary precision constant integral values.
...
It is a functional replacement for common case integer type like "unsigned",
"uint64_t", but also allows non-byte-width integer type and large integer
value types such as 3-bits, 15-bits, or more than 64-bits of precision. For
more details, see pr1043.
llvm-svn: 33951
2007-02-06 03:00:16 +00:00
Chris Lattner
92c5d1185f
Fix a bug in smallptrset::erase: in the small case, return true if the
...
element was in the set.
llvm-svn: 33931
2007-02-05 23:10:31 +00:00
Chris Lattner
010ee96261
Encode small integers more densely in foldingset, avoiding overflowing the SmallVector as often.
...
llvm-svn: 33864
2007-02-04 01:48:10 +00:00
Chris Lattner
4f5cdecde3
improve comments, add an assertion
...
llvm-svn: 33750
2007-02-01 05:33:21 +00:00
Devang Patel
9eb2caaeb6
Add PrintVersionMessage() that tools can use to print version number
...
without exiting program.
llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Reid Spencer
e7422f6b8d
Add some debug output.
...
llvm-svn: 33718
2007-01-31 21:27:38 +00:00
Chris Lattner
0dbb13735e
minor cleanups. Fix off-by-one in accounting the number of nodes when the
...
table grows.
llvm-svn: 33698
2007-01-31 06:04:41 +00:00
Chris Lattner
a94523df7b
reformat comment
...
llvm-svn: 33675
2007-01-30 23:16:22 +00:00
Chris Lattner
39ab70cf80
implement SmallPtrSet::erase
...
llvm-svn: 33581
2007-01-27 07:59:10 +00:00
Chris Lattner
ab5d0ba168
add a note
...
llvm-svn: 33578
2007-01-27 07:18:32 +00:00
Chris Lattner
74102df857
Add a new SmallSet ADT specialized for pointers.
...
llvm-svn: 33577
2007-01-27 07:10:46 +00:00
Anton Korobeynikov
a41d9eca96
Moved disassembler to libSystem
...
llvm-svn: 33461
2007-01-23 10:26:08 +00:00
Anton Korobeynikov
3e956974b3
Adding disassembler interface and external hook to udis86 library.
...
llvm-svn: 33358
2007-01-19 17:25:17 +00:00
Chris Lattner
dff39e53f1
wow, the link was already broken :)
...
llvm-svn: 32963
2007-01-06 23:20:51 +00:00
Chris Lattner
8a7183b5b8
add a note
...
llvm-svn: 32962
2007-01-06 23:19:38 +00:00
Bill Wendling
4ec17c3951
The previous implementation of LLVM Streams wasn't removing symbols. This
...
one should.
llvm-svn: 32845
2007-01-03 22:37:27 +00:00
Chris Lattner
00bb216977
eliminate constructor from Statistic class. It is now impossible to get a
...
static constructor for them :). Transition complete.
llvm-svn: 32710
2006-12-19 23:17:40 +00:00
Chris Lattner
13bfd32f5d
Refactor statistic a big and introduce a horrible-but-necessary macro
...
(STATISTIC), which allows us to define statistics that don't introduce
static ctors into the .o files. I'm migrating code over to use this
incrementally.
llvm-svn: 32687
2006-12-19 21:27:47 +00:00
Bill Wendling
a77f14265b
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
...
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Chris Lattner
8c9969ac03
Change the implementation of statistic to not need destructors at all.
...
Instead, the stat info is printed when llvm_shutdown() is called.
These also don't need static ctors, but getting rid of them is uglier:
still investigating. This reduces the number of static dtors in llvm from
~1400 to ~750.
llvm-svn: 32372
2006-12-08 20:00:42 +00:00
Bill Wendling
30c0f3367c
Don't use <sstream> in Streams.h but <iosfwd> instead.
...
llvm-svn: 32340
2006-12-07 23:41:45 +00:00
Bill Wendling
355fc5ad50
Removed more <iostream> includes
...
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
f3baad3ee1
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
...
now cerr, cout, and NullStream resp.
llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
5bbf770764
merge the Statistic and StatisticBase classes, eliminating virtual methods
...
and eliminating #includes from the Statistic.h file.
llvm-svn: 32282
2006-12-06 18:20:44 +00:00
Chris Lattner
700b873130
Detemplatize the Statistic class. The only type it is instantiated with
...
is 'unsigned'.
llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Chris Lattner
228bcd3802
Add a helper function
...
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Bill Wendling
3750ae25a0
Removed #include <iostream> and replace with llvm_* streams.
...
llvm-svn: 31927
2006-11-26 10:52:51 +00:00
Reid Spencer
aa5c220665
Make the absolute/relative tolerance information easier to read/understand.
...
llvm-svn: 31908
2006-11-25 08:38:44 +00:00
Bill Wendling
9594f3a196
Moved definition of llvm_ostream wrappers to the Streams.cpp file.
...
llvm-svn: 31819
2006-11-17 09:54:47 +00:00
Bill Wendling
3315869498
Added wrappers for the std::cerr/std::cout objects. The wrappers will
...
soon replace all uses of those objects.
llvm-svn: 31817
2006-11-17 09:51:22 +00:00