1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

836 Commits

Author SHA1 Message Date
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
Chris Lattner
7e0ab348a7 some mips and some sparc compilers apparently
predefine mips and sparc respectively.  Just overrule them :)

llvm-svn: 80072
2009-08-26 05:00:16 +00:00
Gabor Greif
76dcbf3018 re-committing yesterday's r79938.
This time there is no additional include of llvm/Config/config.h
at all. Instead I use a hard-coded preprecessor symbol:
LLVM_COMPACTIFY_SENTINELS

(should this work on the self-hosting buildbot, then
 cleanups come next)

llvm-svn: 80035
2009-08-25 21:25:22 +00:00
Bill Wendling
bc8a0cd205 --- Reverse-merging r79938 into '.':
U    include/llvm/BasicBlock.h
U    include/llvm/ADT/ilist_node.h
U    include/llvm/ADT/ilist.h
U    include/llvm/CodeGen/SelectionDAG.h
U    include/llvm/CodeGen/MachineFunction.h
U    include/llvm/CodeGen/MachineBasicBlock.h
U    include/llvm/Function.h

Revert r79938. It was causing self-hosting build failures.

llvm-svn: 79960
2009-08-25 00:05:04 +00:00
Gabor Greif
fbe4ca0d36 Resubmit an earlier patch of mine:
reduce the size of relevant "ghostly" sentinels
by a pointer.

This attempt now makes the compactification dependent
on the configure variable LLVM_COMPACT_SENTINELS
and should not cause any bootstrap failures for
llvm-gcc any more.

Please note that this is not yet the final version,
and (as settled with Chris) I shall take out the
autofoo/cmake portions in the next days.

This will also lose the assertability on sentinel
dereferencing and operator++, but that seems
an acceptable price to pay for the simplified
build logic.

llvm-svn: 79938
2009-08-24 21:34:17 +00:00
Daniel Dunbar
05174ac36f Add llvm::Triple::getArchTypePrefix for getting the intrinsic prefix for an
identifier architecture.

llvm-svn: 79906
2009-08-24 09:53:06 +00:00
Chris Lattner
c02ffc37e0 remove the dead std::ostream APInt inserter
llvm-svn: 79875
2009-08-23 23:11:28 +00:00
Chris Lattner
89d3d59e83 remove a few DOUTs here and there.
llvm-svn: 79832
2009-08-23 06:35:02 +00:00
Daniel Dunbar
ea514f5421 Change SmallString::operator{=,+=} to take a StringRef.
llvm-svn: 79729
2009-08-22 06:06:46 +00:00