Jeffrey Yasskin
bc5f122491
Fix stylistic and documentation problems in ValueMap found by Nick Lewycky and
...
Evan Cheng.
llvm-svn: 84967
2009-10-23 20:54:00 +00:00
Jeffrey Yasskin
e90afea0ba
Try r84890 again (adding ValueMap<>), now that I've tested the compile on
...
gcc-4.4.
llvm-svn: 84902
2009-10-22 22:11:22 +00:00
Eric Christopher
05ee62db65
size_t, not unsigned here to silence a warning.
...
llvm-svn: 84900
2009-10-22 22:06:50 +00:00
Benjamin Kramer
13aa437a5e
Random include cleanup.
...
llvm-svn: 84898
2009-10-22 21:49:41 +00:00
Jeffrey Yasskin
7555ed8cdc
Revert r84890, which broke the linux build.
...
llvm-svn: 84892
2009-10-22 20:23:43 +00:00
Jeffrey Yasskin
ad8692124f
Add a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to use
...
even when keys get RAUWed and deleted during its lifetime. By default the keys
act like WeakVHs, but users can pass a third template parameter to configure
how updates work and whether to do anything beyond updating the map on each
action.
It's also possible to automatically acquire a lock around ValueMap updates
triggered by RAUWs and deletes, to support the ExecutionEngine.
llvm-svn: 84890
2009-10-22 20:10:20 +00:00
Eric Christopher
41d8dc960b
More warnings patrol: Another unused argument and more implicit
...
conversions.
llvm-svn: 84382
2009-10-17 23:56:18 +00:00
Daniel Dunbar
b67b5bb0b1
Move UnescapeString to a static function for its sole client; its inefficient and broken.
...
llvm-svn: 84358
2009-10-17 20:43:42 +00:00
Daniel Dunbar
d537c7d394
Remove llvm::EscapeString, raw_ostream::write_escaped is much faster.
...
llvm-svn: 84357
2009-10-17 20:43:29 +00:00
Daniel Dunbar
0107265e33
Move StringMap's string has function into StringExtras.h
...
llvm-svn: 84344
2009-10-17 18:21:06 +00:00
Chris Lattner
5d2b384837
Add half precision floating point support (float16) to APFloat,
...
patch by Peter Johnson! (PR5195)
llvm-svn: 84239
2009-10-16 02:13:51 +00:00
Chris Lattner
87bcf3b242
add haiku support, patch by Paul Davey!
...
llvm-svn: 84238
2009-10-16 02:06:30 +00:00
Dan Gohman
ae76dc48d6
Delete bogus semicolons.
...
llvm-svn: 84132
2009-10-14 20:39:01 +00:00
Eric Christopher
a7407c0921
Remove a bunch of unused arguments from functions, silencing a
...
warning.
llvm-svn: 84130
2009-10-14 20:28:33 +00:00
Ted Kremenek
abbc32c042
Provide a mode for ImmutableMap/ImmutableSet to not automatically canonicalize the internal functional AVL trees. This should speedup clients that use ImmutableMap/ImmutableSet but don't require fast comparisons of maps.
...
llvm-svn: 84010
2009-10-13 19:08:10 +00:00
Chris Lattner
8fbbd25816
remove dead header.
...
llvm-svn: 83943
2009-10-13 05:33:26 +00:00
Dan Gohman
f9067da535
Add a ceilLogBase2 function to APInt.
...
llvm-svn: 83932
2009-10-13 01:49:02 +00:00
Torok Edwin
8203691f27
Add a comment explaining how DenseMap::insert works, because it is not
...
intuitive.
It does NOT update the value if the key is already in the map,
it also returns false if the key is already in the map, regardless
if the value matched.
llvm-svn: 83458
2009-10-07 09:23:56 +00:00
Dan Gohman
7cdf41cf01
Don't use identifiers that start with an underscore followed
...
by a capital letter, which invokes undefined behavior.
llvm-svn: 83206
2009-10-01 17:39:52 +00:00
Devang Patel
5cad2b8f0f
Create empty StringRef is incoming cstring is NULL.
...
llvm-svn: 83082
2009-09-29 18:39:56 +00:00
Daniel Dunbar
ac9a646035
Switch FoldingSet::AddString to StringRef based API.
...
- This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail.
llvm-svn: 82517
2009-09-22 03:34:53 +00:00
Chris Lattner
e520a0c8e7
write rfind in terms of npos as daniel requested
...
llvm-svn: 82414
2009-09-20 22:54:26 +00:00
Chris Lattner
72732da2f0
move a couple non-trivial methods out of line, add new
...
find_first_of/find_first_of methods.
llvm-svn: 82347
2009-09-20 01:22:16 +00:00
Chris Lattner
2cdc7b8e76
add size_t and a version of rfind that allows specification of where
...
to scan from.
llvm-svn: 82343
2009-09-20 00:38:28 +00:00
Chris Lattner
d2a0138c62
add some more overloads of StringRef::getAsInteger for
...
common and useful integer types.
llvm-svn: 82338
2009-09-19 23:58:48 +00:00
Chris Lattner
4606ccf232
add a simple c_str() method to SmallString.
...
llvm-svn: 82337
2009-09-19 23:57:31 +00:00
Chris Lattner
e6fa81a475
provide a "strtoull" operation that works on StringRef's.
...
llvm-svn: 82322
2009-09-19 19:47:14 +00:00
John McCall
f2c6ae3996
Fix a few places where PointerIntPair was using PointerLikeTypeTraits<PointerTy>
...
instead of the PtrTraits provided. Allows PointerIntPair to contain a
PointerUnion safely, as long as the bits add up.
llvm-svn: 82163
2009-09-17 20:35:18 +00:00
Chris Lattner
09084c45af
add a version of the APFloat constructor that initializes to 0.0
...
llvm-svn: 82110
2009-09-17 01:08:43 +00:00
Daniel Dunbar
60e1dee7fa
Add StringRef::{rfind, rsplit}
...
llvm-svn: 82087
2009-09-16 22:38:48 +00:00
Dan Gohman
4e86738fa7
Fix apostrophos.
...
llvm-svn: 81856
2009-09-15 15:08:33 +00:00
Chris Lattner
f02eb61c69
switch scciterator to use DenseMap instead of std::map
...
llvm-svn: 81834
2009-09-15 04:37:49 +00:00
Chris Lattner
f0c81c94c9
give densemap iterators real iterator traits.
...
llvm-svn: 81538
2009-09-11 18:15:46 +00:00
Daniel Dunbar
12045a9061
Add Triple::getArchTypeForDarwinArchName, which converts a "Darwin" architecture
...
name (e.g. "ppc") to the appropriate constant.
Also, StringRefize additional Triple constructor.
llvm-svn: 81274
2009-09-08 23:32:51 +00:00
Duncan Sands
8c36c0f009
Mark constants as unsigned, as pointed out by icc
...
warnings (#174 ). Patch by Erick Tryzelaar.
llvm-svn: 81111
2009-09-06 11:45:14 +00:00
Duncan Sands
750b1f5de2
Public and private corrections, warned about by icc ( #304 ).
...
Patch by Erick Tryzelaar.
llvm-svn: 81107
2009-09-06 08:55:57 +00:00
Benjamin Kramer
8e70ffa886
Delete unused #include.
...
llvm-svn: 81076
2009-09-05 08:50:14 +00:00
Benjamin Kramer
f5c5c341d1
Prune #includes.
...
llvm-svn: 81052
2009-09-04 22:45:23 +00:00
Ted Kremenek
e4f2f7f6b2
Make ImmutableMap/ImmutableSet quicker by only canonicalizing the tree after an
...
Add or Remove operation complete, and not while building the intermediate tree.
This trades a little bit more memory usage for less accesses to the FoldingSet. On a benchmark for the clang static analyzer, this shaves off another 13% of execution time when using field/array sensitivity.
llvm-svn: 80955
2009-09-03 22:07:30 +00:00
Ted Kremenek
6d0baa578a
Set the 'cached digest' flag after computing the digest for an
...
ImutAVLTree. This was accidentally left out, and essentially caused
digest caching to be ignored in ImmutableMap and ImmutableSet (this
bug was detected from shark traces that showed ComputeDigest was in
the hot path in the clang static analyzer).
This reduces the running time of the clang static analyzer on an
example benchmark by ~32% for both RegionStore (field-sensitivty) and
BasicStore (without field-sensitivity).
llvm-svn: 80877
2009-09-03 04:21:34 +00:00
Gabor Greif
eed8e1e9e5
restore semantics of operator* (removing a FIXME I had to introduce in r80224)
...
llvm-svn: 80622
2009-08-31 20:54:23 +00:00
Chris Lattner
0ba5632cf6
make DenseMap::clear() early exit if there is nothing to do.
...
llvm-svn: 80480
2009-08-30 05:55:04 +00:00
Gabor Greif
0d4f085232
eliminate all 80-col violations that I have introduced in my recent checkins (and some others more)
...
llvm-svn: 80304
2009-08-27 23:44:33 +00:00
Gabor Greif
6cd12a9f7f
re-apply r80197, now that iterator.h is not mentioned any more
...
llvm-svn: 80254
2009-08-27 17:07:35 +00:00
Gabor Greif
cc8681cea3
Clean up the minor mess I caused with removing iterator.h. I shall take care of 80-col violations and the FIXME later. (Thanks goodness that I live in another continent, so the monkeypox did not strike me :-)
...
llvm-svn: 80224
2009-08-27 06:41:46 +00:00
Bill Wendling
5f74a3e3b9
--- Reverse-merging r80147 into '.':
...
A include/llvm/ADT/iterator.cmake
U autoconf/configure.ac
--- Reverse-merging r80161 into '.':
U cmake/config-ix.cmake
--- Reverse-merging r80171 into '.':
U Makefile
--- Reverse-merging r80173 into '.':
U configure
U include/llvm/Config/config.h.in
--- Reverse-merging r80180 into '.':
A include/llvm/ADT/iterator.h.in
Despite common miscomceptions, iterator.h is alive and well. It broke the build
bots for several hours. And yet no one bothered to look at them.
Gabor and Doug, please review your changes and make sure that they actually
build before resubmitting them.
llvm-svn: 80197
2009-08-27 03:29:26 +00:00
Gabor Greif
4270411be1
now that include/llvm/ADT/iterator.h.in is not attempted to be built, its prerequisite can go away too
...
llvm-svn: 80180
2009-08-26 23:35:33 +00:00
Gabor Greif
796628c1d8
nobody includes llvm/ADT/iterator.h any more,
...
so get rid of this monstrosity. iterator.h.in is scheduled for deletion in my working copy,
but I wait till I see that configure gets regenerated, as it depends on it. I'll commit
then.
There are still some AC_* tests in the configure.ac dealing with iterators, those can
be zapped probably too.
llvm-svn: 80147
2009-08-26 21:36:59 +00:00
Gabor Greif
830005b778
Remove all the LLVM_COMPACTIFY_SENTINELS-related macro magic as discussed with Chris on IRC. Anybody wanting to debug sentinel dereferencing problems must revert this patch and perform the indicated modifications.
...
llvm-svn: 80128
2009-08-26 19:16:32 +00:00
Mike Stump
294213c735
Allow unsigned long long DenseMapInfo.
...
llvm-svn: 80118
2009-08-26 18:02:19 +00:00