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
Chris Lattner
d052c5bb9b
Add range insert method for DenseSet and define DenseMapInfo for chars.
...
Patch by Kevin Fan!
llvm-svn: 68239
2009-04-01 19:50:49 +00:00
Dan Gohman
770f4158e5
Use CHAR_BIT instead of hard-coding 8 in several places where it
...
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.
llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Douglas Gregor
aaa9263fc6
Allow the use of pointers to const within PointerUnion.
...
llvm-svn: 68159
2009-03-31 23:19:54 +00:00
Chris Lattner
dd41c286e5
add some accessors so I can play games with DenseMaps.
...
llvm-svn: 68145
2009-03-31 20:57:23 +00:00
Douglas Gregor
50b29cfe51
Stop guessing, start thinking, and make PointerUnion3::is actually be correct.
...
llvm-svn: 68126
2009-03-31 18:31:03 +00:00
Douglas Gregor
41ab75e9ef
Really, really fix PointerUnion3::is
...
llvm-svn: 68079
2009-03-31 00:34:31 +00:00
Douglas Gregor
0beaefea25
Make PointerUnion3::get work properly
...
llvm-svn: 68067
2009-03-30 21:44:13 +00:00
Chris Lattner
ccc73c9327
update comment.
...
llvm-svn: 68060
2009-03-30 20:44:04 +00:00
Chris Lattner
a172ae1d4f
add a PointerUnion3 class and generalize PointerUnion to work with
...
anything pointer-like, which may or may not actually be a pointer.
llvm-svn: 68056
2009-03-30 20:29:27 +00:00
Chris Lattner
2d00a451cb
fix the PointerLikeTypeTraits specialization for PointerIntPair to
...
allow the traits to be specified as well.
llvm-svn: 68055
2009-03-30 20:28:50 +00:00
Chris Lattner
8e83bd3891
add missing space.
...
llvm-svn: 67995
2009-03-29 13:26:05 +00:00
Chris Lattner
be9cd842ae
add some comments, add a dyn_cast method.
...
llvm-svn: 67992
2009-03-29 07:03:30 +00:00
Chris Lattner
f3d562df05
When forming sentinels for empty/tombstone, make sure to respect the
...
pointer's expected number of zero low-bits.
This should fix the breakage I introduced recently.
llvm-svn: 67990
2009-03-29 06:33:22 +00:00
Chris Lattner
696742399a
add helper method.
...
llvm-svn: 67989
2009-03-29 06:32:46 +00:00