Ted Kremenek
d0f4955b73
Added two bounds checks to the BitVector class to detect
...
out-of-bounds bit accesses. The checks are only performed
in a Debug build.
llvm-svn: 44815
2007-12-10 22:28:35 +00:00
Chris Lattner
8b88401fbe
remove dead #include.
...
llvm-svn: 44711
2007-12-08 19:06:21 +00:00
Chris Lattner
d62e99bd4a
eliminate dependency on Bitcode headers.
...
llvm-svn: 44709
2007-12-08 19:01:44 +00:00
Chris Lattner
44b8c0e9e1
remove dead #include, APInt.h already has the needed forward decls.
...
llvm-svn: 44708
2007-12-08 19:00:38 +00:00
Chris Lattner
2190758012
Pass the whole StringMapEntry into StringMapEntryInitializer::Initialize.
...
llvm-svn: 44432
2007-11-29 06:14:41 +00:00
Chris Lattner
5d29c4130c
provide an optional API to allow datatypes in a stringmap to be *gasp*
...
initialized with a value if they want, by specializing the
StringMapEntryInitializer class.
llvm-svn: 44430
2007-11-29 06:04:41 +00:00
Chris Lattner
36854c740d
Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros.
...
llvm-svn: 44296
2007-11-23 22:42:31 +00:00
Dan Gohman
760d574313
Add explicit keywords.
...
llvm-svn: 44234
2007-11-19 15:30:20 +00:00
Daniel Berlin
13a0e04717
Fix bugs in iterator invalidation
...
llvm-svn: 44174
2007-11-15 18:06:49 +00:00
Chris Lattner
9673aa6fd1
Import the boost scoped_ptr class to LLVM. This patch was prepared by
...
Cédric Venet.
llvm-svn: 44161
2007-11-15 05:57:06 +00:00
Hartmut Kaiser
1ba24a4989
Fixed a strange construct. Please review.
...
llvm-svn: 44082
2007-11-13 23:04:06 +00:00
Ted Kremenek
846a3448a1
Implemented generic serialization of APFloat.
...
llvm-svn: 43829
2007-11-07 18:39:22 +00:00
Ted Kremenek
7c8260f21b
Fixed default ctor for APInt to properly initialize BitWidth to a
...
non-random value.
llvm-svn: 43795
2007-11-07 00:27:59 +00:00
Chris Lattner
edf6668dda
make smallptrset more const and type correct, which caught a few
...
minor bugs.
llvm-svn: 43782
2007-11-06 22:12:43 +00:00
Neil Booth
d04447b7ae
When converting to integer, do bit manipulations in the destination
...
memory rather than in a copy of the APFloat. This avoids problems
when the destination is wider than our significand and is cleaner.
Also provide deterministic values in all cases where conversion
fails, namely zero for NaNs and the minimal or maximal value
respectively for underflow or overflow.
llvm-svn: 43626
2007-11-01 22:43:37 +00:00
Ted Kremenek
5517254faa
Added typedef "value_type" to DenseMap (similar typedef appears in std::map).
...
Added method FindAndConstruct() to DenseMap, which does the same thing as
operator[], except that it refers value_type& (a reference to both the
key and mapped data pair). This method is useful for clients that wish
to access the stored key value, as opposed to the key used to do the
actual lookup (these need not always be the same).
Redefined operator[] to use FindAndConstruct() (same logic).
llvm-svn: 43594
2007-11-01 00:54:57 +00:00
Ted Kremenek
4284b7c63c
Changed access control within FoldingSet for some ivars from "private"
...
to "protected". This allows iterators to work.
llvm-svn: 43559
2007-10-31 17:12:47 +00:00
Ted Kremenek
d3e5310f68
Added member function "size()" to FoldingSet to return the number of
...
nodes in the FoldingSet.
llvm-svn: 43531
2007-10-30 23:35:55 +00:00
Ted Kremenek
3f3b4818ef
Added serialization support for APInt.
...
llvm-svn: 43405
2007-10-26 21:50:10 +00:00
Ted Kremenek
5b2ac3504a
Fixed incorrect "path name" in preamble (comment) of header file.
...
llvm-svn: 43402
2007-10-26 20:44:02 +00:00
Ted Kremenek
0347caa918
Fixed incorrect "path name" in preamble (comment) of header file.
...
llvm-svn: 43401
2007-10-26 20:42:45 +00:00
Chris Lattner
ef90913394
add a nice predicate to check to see if nan
...
llvm-svn: 43304
2007-10-24 18:54:28 +00:00
Christopher Lamb
b9c6101dd5
Add an uppercase conversion utility function.
...
llvm-svn: 43146
2007-10-18 19:31:38 +00:00
Ted Kremenek
c00b2095fa
Changed the return type of type-specific Allocate() methods to return
...
void*. This is hint that we are returning uninitialized memory rather
than a constructed object.
Patched ImutAVLTree to conform to this new interface.
llvm-svn: 43106
2007-10-18 00:30:14 +00:00
Ted Kremenek
7d21c85cca
ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using
...
the new type-aligned Allocate() method.
llvm-svn: 43100
2007-10-17 22:17:01 +00:00
Ted Kremenek
24219dc48a
Minor cosmetic cleanups in the calculation of alignments for
...
StringMapEntry objects. No functionality change.
llvm-svn: 43097
2007-10-17 22:09:45 +00:00
Ted Kremenek
307fa3bed5
Updated StringMap to use llvm::AlignOf to compute the alignment of map
...
entries.
llvm-svn: 43089
2007-10-17 21:13:50 +00:00
Hartmut Kaiser
ed12f66488
Updated VC++ build system.
...
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Ted Kremenek
89ca477326
Fixed incorrect renaming of method name (forgot two characters).
...
llvm-svn: 42999
2007-10-15 19:15:48 +00:00
Ted Kremenek
432c112649
Added more doxygen comments.
...
Renamed internal method of ImutAVLTree::RemoveMutableFlag to MarkImmutable.
Added enum for bit manipulation (more self-documentating).
llvm-svn: 42998
2007-10-15 18:52:34 +00:00
Neil Booth
1463947f03
Consolidate logic for creating NaNs. Silence compiler warning.
...
llvm-svn: 42966
2007-10-14 10:39:51 +00:00
Chris Lattner
18867ab274
don't use intptr_t without including it.
...
llvm-svn: 42921
2007-10-12 18:16:23 +00:00
Chris Lattner
e80faf3036
Make this compute the correct offset, handling alignment of the element
...
pointer correctly.
llvm-svn: 42918
2007-10-12 17:49:52 +00:00
Neil Booth
078f455d15
Implement correctly-rounded decimal->binary conversion, i.e. conversion
...
from user input strings.
Such conversions are more intricate and subtle than they may appear;
it is unlikely I have got it completely right first time. I would
appreciate being informed of any bugs and incorrect roundings you
might discover.
llvm-svn: 42912
2007-10-12 16:02:31 +00:00
Chris Lattner
e47ae5fe94
make operator== work with non-equal sized bitvectors, as long as
...
the extra bits are all zeros. This allows "010" and "010000" to be
treated as equal.
llvm-svn: 42889
2007-10-12 03:48:59 +00:00
Ted Kremenek
ee654dc6ef
Provided accessors to internal allocator for ImutAVLTree and ImmutableSet.
...
Added postfix ++,-- support for ImmutableSet::iterator.
llvm-svn: 42877
2007-10-11 21:51:04 +00:00
Dale Johannesen
0ee2a2fb59
Next PPC long double bits. First cut at constants.
...
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.
llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Chris Lattner
0330d81fcf
make bitvector &= do the right thing if vectors have mismatched length.
...
llvm-svn: 42860
2007-10-11 06:12:33 +00:00
Ted Kremenek
6781a1791a
Added iterators to ImmutableSet.
...
llvm-svn: 42851
2007-10-11 00:14:49 +00:00
Ted Kremenek
7ebd4a09c9
Added some doxygen comments to ImmutableSet.
...
llvm-svn: 42850
2007-10-10 23:47:03 +00:00
Ted Kremenek
4c37e29cf4
Removed uninformative assertions that catch problems that will
...
fire anyway at runtime due to a NULL dereference.
llvm-svn: 42848
2007-10-10 23:35:04 +00:00
Ted Kremenek
89e6ab12de
Removed "height" of an AVL tree node from its Profile. This is
...
implicitly captured by using the addresses of its children in the
profile.
llvm-svn: 42847
2007-10-10 23:32:01 +00:00
Ted Kremenek
d0843e54f5
Removed spurious forward declaration to a structure that will no longer be used.
...
llvm-svn: 42839
2007-10-10 20:45:34 +00:00
Ted Kremenek
e5e9880bfc
Added some doxygen comments to a few methods of ImutAVLTree.
...
llvm-svn: 42837
2007-10-10 20:44:21 +00:00
Ted Kremenek
9b6872e3d5
Added preliminary support for iterators in ImutAVLTree.
...
Implemented ImutAVLTree::isEqual.
llvm-svn: 42833
2007-10-10 18:11:16 +00:00
Ted Kremenek
7a878948f9
Renamed internal method "Create" of ImutAVLTree to "CreateNode".
...
llvm-svn: 42825
2007-10-10 16:27:33 +00:00
Ted Kremenek
a8e090bd1c
Added implementation of immutable (functional) maps and sets, as
...
implemented on top of a functional AVL tree. The AVL balancing code
is inspired by the OCaml implementation of Map, which also uses a functional
AVL tree.
Documentation is currently limited and cleanups are planned, but this code
compiles and has been tested.
llvm-svn: 42813
2007-10-09 21:38:09 +00:00
Chris Lattner
8ee06ab2ab
Fix problems where DenseMap used operator!= instead of correctly
...
calling the traits implementation of isEqual.
llvm-svn: 42782
2007-10-09 05:42:12 +00:00
Chris Lattner
19cb9fa4cc
Change a #include into a forward declaration
...
llvm-svn: 42781
2007-10-09 03:40:30 +00:00
Neil Booth
f003f9bf1a
Add a new function tcExtract for extracting a bignum from an
...
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
2007-10-08 13:47:12 +00:00