Daniel Dunbar
d247ca6f40
Define npos in a way that should make MSVC happier.
...
llvm-svn: 76785
2009-07-22 21:08:31 +00:00
Daniel Dunbar
338e478c65
Add missing include
...
llvm-svn: 76655
2009-07-21 21:33:58 +00:00
Torok Edwin
4d8202474c
Add freed memory poisoning in !NDEBUG mode for DenseMap.
...
llvm-svn: 76597
2009-07-21 18:01:37 +00:00
Daniel Dunbar
7532049775
Move StringRef comparison operators out of class.
...
Also, tweak the return type of size().
llvm-svn: 76588
2009-07-21 17:25:46 +00:00
Daniel Dunbar
30c92a0aee
Add StringRef::{substr, startswith}.
...
llvm-svn: 76559
2009-07-21 09:18:49 +00:00
Daniel Dunbar
8ab30670cc
Add StringRef class, with fixes.
...
llvm-svn: 76543
2009-07-21 07:28:51 +00:00
Daniel Dunbar
0686bcbe91
Remove redundant qualifiers.
...
llvm-svn: 76357
2009-07-19 01:42:34 +00:00
Chris Lattner
32757b2838
Fix a fixme, patch by Ryan Flynn!
...
llvm-svn: 75716
2009-07-15 00:36:04 +00:00
Chris Lattner
adc834d034
Add NetBSD to the Triple class, patch by Krister Walfridsson!
...
llvm-svn: 75489
2009-07-13 20:22:23 +00:00
Dan Gohman
9a19e608d4
Add an optional optimization to FoldingSet to allow ID values to be
...
stored rather than recomputed on each bucket traversal.
llvm-svn: 75480
2009-07-13 18:25:44 +00:00
Ted Kremenek
ec0e24ae25
ImmutableMap/ImmutableSet: Allow caching of ImutAVLTree digests while the tree
...
is still mutable. My experiments show this reduces the amount of times we
compute a full tree digest by over 50% on very small cases, and potentially much
larger on others.
llvm-svn: 75207
2009-07-10 00:33:43 +00:00
Ted Kremenek
c089dcb368
ImmutableSet/ImmutableMap: Allow caching of null digests by properly using a flag to record if the digest of an ImutAVLTree has been cached.
...
llvm-svn: 75157
2009-07-09 18:34:41 +00:00
Douglas Gregor
71dae1f1ba
Make SmallPtrSet iterators real iterators
...
llvm-svn: 75073
2009-07-08 23:53:54 +00:00
Chris Lattner
f480b139c8
fix a bug in post-order iterators with external storage, patch by
...
Olaf Krzikalla!
llvm-svn: 74933
2009-07-07 18:43:48 +00:00
Dan Gohman
148d3bb9b4
Reapply 74494, this time removing the conflicting definition of operator<<
...
in APIntTest.cpp.
llvm-svn: 74550
2009-06-30 20:10:56 +00:00
Bill Wendling
1121a4ce5e
Temporarily revert r74494. It was causing failures in the unit tests.
...
llvm-svn: 74515
2009-06-30 07:05:27 +00:00
Owen Anderson
4b4ba9f06c
Fix the build on Cygwin. Patch by Aaron Gray.
...
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Dan Gohman
f207911974
Define an operator<< for APInt to be used with std::ostream.
...
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.
llvm-svn: 74494
2009-06-30 01:28:08 +00:00
Sebastian Redl
51473d2434
Fix three MSVC 2008 warnings that completely clutter the build output.
...
llvm-svn: 74430
2009-06-29 17:12:06 +00:00
Duncan Sands
efb6d3b78e
Add triple for OpenBSD.
...
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Dan Gohman
33d2e7a491
Add a 'const' in a comment.
...
llvm-svn: 74389
2009-06-27 20:53:16 +00:00
Owen Anderson
736e41b957
Update for DOTGraphTraits changes.
...
llvm-svn: 74113
2009-06-24 20:41:17 +00:00
Owen Anderson
2d65e89f30
Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
...
llvm-svn: 74005
2009-06-23 21:19:38 +00:00
Duncan Sands
30dcb8401d
Add support for AuroraUX. Patch by evocallaghan.
...
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Owen Anderson
3234d9d040
Owen Anderson 2009-06-15: Use a SmallPtrSet here, for speed and to match df_iterator.
...
Owen Anderson 2009-06-15: Remember to clear out our maps to prevent crashing.
llvm-svn: 73438
2009-06-15 22:54:48 +00:00
Torok Edwin
a2f0fd169e
fix build on VC++2k8.
...
llvm-svn: 72736
2009-06-02 20:32:59 +00:00
Mike Stump
f39ed4d4f9
Dcoument that the opauque value used to construct QNaNs is truncated
...
as necessary.
llvm-svn: 72702
2009-06-01 21:02:35 +00:00
Mike Stump
72e70811c8
Add some documentation.
...
llvm-svn: 72622
2009-05-30 15:19:29 +00:00
Mike Stump
5447116cbb
Add support for letting the client choose different flavors of NaNs. Testcase to be
...
added in clang.
llvm-svn: 72606
2009-05-30 03:49:43 +00:00
Daniel Dunbar
aa01cbb890
Add llvm::triple constructor from arch, vendor, os strings, and recognize
...
DragonFly OS type.
llvm-svn: 72242
2009-05-22 02:24:11 +00:00
Jay Foad
c934b656f9
Tighten up the asserts in SmallVector::operator[]().
...
If this causes any new assertion failures that I didn't catch in
testing, the fix is usually to change "&v[0]" to "v.data()" for some
SmallVector v.
llvm-svn: 72221
2009-05-21 19:48:58 +00:00
Jay Foad
16d48d2595
Use v.data() instead of &v[0] when SmallVector v might be empty.
...
llvm-svn: 72210
2009-05-21 09:52:38 +00:00
Jay Foad
2ca356aa76
Implement new SmallVector::data() methods.
...
llvm-svn: 72209
2009-05-21 09:00:37 +00:00
Bill Wendling
4698f862f3
Use struct instead of class to make MCVS compile.
...
llvm-svn: 71600
2009-05-12 21:50:43 +00:00
Douglas Gregor
26745696ef
Add terminal width detection to llvm::sys::Process. This is needed to
...
fix Clang PRs 4148 and 4183.
llvm-svn: 71448
2009-05-11 18:05:52 +00:00
John Mosby
366006cfd3
Shrink wrapping in PEI:
...
- reduces _static_ callee saved register spills
and restores similar to Chow's original algorithm.
- iterative implementation with simple heuristic
limits to mitigate compile time impact.
- handles placing spills/restores for multi-entry,
multi-exit regions in the Machine CFG without
splitting edges.
- passes test-suite in LLCBETA mode.
Added contains() method to ADT/SparseBitVector.
llvm-svn: 71438
2009-05-11 17:04:19 +00:00
Chris Lattner
5c8113fab4
add a range insertion method to SmallSet.
...
llvm-svn: 70817
2009-05-04 02:19:15 +00:00
Stuart Hastings
b3c08d427a
Prevent looping when DenseSet is abused.
...
llvm-svn: 70572
2009-05-01 20:47:53 +00:00
Jay Foad
9768cabf4a
Move helper functions for optimizing division by constant into the APInt
...
class.
llvm-svn: 70488
2009-04-30 10:15:35 +00:00
Bill Wendling
07f3cdb8ba
I cast, therefore I think I know what I'm doing.
...
llvm-svn: 70151
2009-04-26 20:12:38 +00:00
Bill Wendling
d0a7587da5
Use uint64_t instead of unsigned.
...
llvm-svn: 70148
2009-04-26 19:46:41 +00:00
Chris Lattner
4685a9682f
revert an incorrect patch. This causes crashes all over the place on a
...
64-bit build.
llvm-svn: 70147
2009-04-26 19:44:20 +00:00
Bill Wendling
2233793a0f
Suppress warnings about conversion shortening 64-bit to 32-bit.
...
llvm-svn: 70138
2009-04-26 18:10:20 +00:00
Chris Lattner
aad8bd245f
DenseMap.h needs <new> because it explicitly calls operator new/delete.
...
Patch by John McCall!
llvm-svn: 70068
2009-04-25 19:50:14 +00:00
Owen Anderson
dd6babaa30
Fix for PR3946, in which SmallVector could behave strangely in corner cases.
...
Patch by Peter Johnson.
llvm-svn: 69785
2009-04-22 07:16:54 +00:00
Douglas Gregor
d2b9d57e20
Add a static APInt::getNumWords
...
llvm-svn: 68977
2009-04-13 19:43:10 +00:00
Chris Lattner
8d5d3eaf95
fix a broken assertion in ilist_iterator, which caused it to crash in the
...
bad case instead of actually assert. Bug pointed out by Jakob Stoklund
Olesen!
llvm-svn: 68785
2009-04-10 15:47:17 +00:00
Chris Lattner
09cab2de98
fix overflow checks in SmallVector:
...
"The code was doing "if (End+NumInputs > Capacity) ...". If End is
close to 0xFFFFFFFF and NumInputs is large, it'll overflow, the
condition will come out false, and the vector won't grow to
accommodate the new elements, and the program will crash in memmove."
Patch by Jeffrey Yasskin!
llvm-svn: 68277
2009-04-02 03:06:26 +00:00
Daniel Dunbar
588d3d1fd6
Add llvm::Triple class for abstracting access to target triples.
...
- The code is silly, I'm just amusing myself. Rewrite to be efficient
if you like. :)
Also, if you wish to debate the proper names of the triple components
I'm all ears.
llvm-svn: 68252
2009-04-01 21:53:23 +00:00
Misha Brukman
5f34850ba4
Fixed spelling.
...
llvm-svn: 68248
2009-04-01 21:33:08 +00:00