1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

824 Commits

Author SHA1 Message Date
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
Anton Korobeynikov
bb4c910976 Implement APInt <-> APFloat conversion for IEEE 128-bit floats.
This fixes PR2555

llvm-svn: 79677
2009-08-21 22:10:30 +00:00
Daniel Dunbar
446d29370f Add a fast path for setName("") on an unnamed value.
llvm-svn: 79492
2009-08-19 23:37:23 +00:00
Eli Friedman
fe70446342 Add triple parsing support for TCE.
llvm-svn: 79461
2009-08-19 20:46:03 +00:00
Daniel Dunbar
2cf5eb67b4 Switch to SmallString::str from SmallString::c_str, and remove
SmallString::c_str.

llvm-svn: 79456
2009-08-19 20:07:03 +00:00
Daniel Dunbar
cb45b94032 Add SmallString::str (which returns a StringRef); this is more efficient than
c_str().

llvm-svn: 79453
2009-08-19 19:57:55 +00:00
Daniel Dunbar
07444dd862 Remove SmallString::append_*int* methods; how many copies of int -> str
conversion code do we really need?
 - S.append_uint(N) can be replaced with 'raw_svector_ostream(S) << N' which is
   somewhat slower due to the extra set up cost, but still plenty fast
   (especially if the svector set up cost can be amortized).

llvm-svn: 79450
2009-08-19 19:28:18 +00:00
Daniel Dunbar
6812c0db35 Add SmallVector::{capacity,set_size}.
- These allow clients to make use of the extra elements in the vector which
   have already been allocated, without requiring them to be value initialized.

llvm-svn: 79433
2009-08-19 17:48:28 +00:00
Daniel Dunbar
d334c67f60 Improve Triple to recognize the OS in i386-mingw32.
llvm-svn: 79359
2009-08-18 19:26:55 +00:00
Daniel Dunbar
09f40a7871 Fix pasto in StringRef::count(char)
llvm-svn: 79356
2009-08-18 18:34:22 +00:00
Daniel Dunbar
4a9a98a5de Add StringRef::count({char,StringRef})
llvm-svn: 79354
2009-08-18 18:26:35 +00:00
Misha Brukman
0961ce48c4 Fixed spelling of MSP430.
llvm-svn: 79333
2009-08-18 13:50:28 +00:00
Daniel Dunbar
763d4d3648 Recognize xscale as an ARM arch.
- Patch by Yonggang Luo.

llvm-svn: 79315
2009-08-18 04:51:26 +00:00