Chris Lattner
294e633d95
add a traits class for SmallPtrSet that allows us to stick things that are
...
"basically pointers" into it.
llvm-svn: 67930
2009-03-28 07:44:53 +00:00
Dan Gohman
88094aaaf9
Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
...
llvm-svn: 67856
2009-03-27 18:37:13 +00:00
Duncan Sands
71bb115e1c
Reapply r66415, which was reverted in r66426 for
...
causing a bootstrap failure. Bootstraps here on
x86-32-linux and x86-64-linux. Requested by the
author Gabor Greif who says that a bug that might
have been causing the failure has since been fixed.
llvm-svn: 67844
2009-03-27 15:29:38 +00:00
Chris Lattner
9c7b21d369
Fix PR3860 by correcting a predicate.
...
llvm-svn: 67473
2009-03-22 19:22:53 +00:00
Chris Lattner
047b30aba8
add some inline methods for infix operators on sparse vectors,
...
tidy some df iteration stuff, patch by John Mosby!
llvm-svn: 67428
2009-03-21 05:40:09 +00:00
Daniel Dunbar
a3c65dba44
Add StringMap::lookup.
...
llvm-svn: 66750
2009-03-12 01:16:06 +00:00
Bill Wendling
3146293bda
Revert r66415. It's causing failures during bootstrap builds:
...
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__muldi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:567: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__lshrdi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:421: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
make[5]: *** [libgcc/./_lshrdi3.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [libgcc/./_muldi3.o] Error 1
make[5]: *** [libgcc/./_negdi2.o] Error 1
--- Reverse-merging (from foreign repository) r66415 into '.':
U include/llvm/BasicBlock.h
U include/llvm/ADT/ilist_node.h
U include/llvm/CodeGen/SelectionDAG.h
U include/llvm/CodeGen/MachineFunction.h
U include/llvm/CodeGen/MachineBasicBlock.h
U include/llvm/Function.h
llvm-svn: 66426
2009-03-09 18:01:33 +00:00
Gabor Greif
f8122e3283
in builds without asserts we do not need to allocate the Next pointer in "ghostly" sentinels
...
llvm-svn: 66415
2009-03-09 07:09:01 +00:00
Nick Lewycky
1a4b5fd173
Remove configurey-fu to autodetect hash_map and hash_set now that they are
...
no longer used in LLVM.
llvm-svn: 66406
2009-03-09 06:16:26 +00:00
Gabor Greif
9a8e64c76f
Give sentinel traits the right to determine the policy where the sentinel is kept.
...
This should result in less indirect memory accesses, less dead writes and tighter code.
llvm-svn: 66061
2009-03-04 20:36:44 +00:00
Gabor Greif
63c1d08d66
drop support for GCC 2.x as it is hopelessly broken anyway
...
llvm-svn: 65864
2009-03-02 19:49:29 +00:00
Gabor Greif
5d9be2cffd
make traits more flexible by splitting out node-related fragment
...
llvm-svn: 65690
2009-02-28 10:17:32 +00:00
Gabor Greif
078dabaf4a
group friendship
...
llvm-svn: 65633
2009-02-27 15:46:23 +00:00
Gabor Greif
9b51fe4ab1
Introduce a new technique for merging BasicBlock with Instruction sentinel by superposition.
...
This looks dangerous, but isn't because the sentinel is accessed in special way only,
namely the Next and Prev fields of it, and these are guaranteed to exist.
llvm-svn: 65626
2009-02-27 08:41:37 +00:00
Ted Kremenek
d5ea51e615
Correctly implement ImmutableMap::getMaxElement() by getting the actual <key, value> pair.
...
llvm-svn: 65327
2009-02-23 17:28:16 +00:00
Ted Kremenek
d8c425b68d
Add ImmutableMap::getMaxElement(), a method that returns the <key,value> pair in a ImmutableMap that has the highest ranked key.
...
llvm-svn: 65326
2009-02-23 17:27:18 +00:00
Ted Kremenek
17e17c7b44
Add version of StringsEqualNoCase that takes two null-terminated C-strings and compares up to 'len' characters. I tend to screw up string comparison functions, so anyone who is interested please review this\!
...
llvm-svn: 65236
2009-02-21 18:25:30 +00:00
Misha Brukman
4637ef9b4b
Removed trailing whitespace.
...
llvm-svn: 65197
2009-02-20 22:54:36 +00:00
Misha Brukman
380e3db1b4
Fixed lint errors:
...
* Alphabetized #includes
* Removed trailing whitespace
* Wrapped or shortened lines over 80 chars
llvm-svn: 65181
2009-02-20 22:20:18 +00:00
Dan Gohman
30770ee7b3
Add explicit keywords.
...
llvm-svn: 64915
2009-02-18 16:37:45 +00:00
Ted Kremenek
53921b8722
Fix bug where APSInt::operator-- incremented instead of decremented.
...
llvm-svn: 64687
2009-02-16 22:39:08 +00:00
Chris Lattner
c21f591628
Add operator->, patch by Ben Laurie!
...
llvm-svn: 64378
2009-02-12 17:14:49 +00:00
Ted Kremenek
5a94b8568b
Add method 'isSingleton()' to ImmutableSet. This returns true if the set contains exactly one element.
...
llvm-svn: 64359
2009-02-12 05:17:02 +00:00
Ted Kremenek
0a2860176f
Add FoldingSet profile method for bools. Patch by Ben Laurie!
...
llvm-svn: 64324
2009-02-11 20:53:17 +00:00
Bill Wendling
a03453cace
These function return 'void'. Don't have 'return' return anything.
...
llvm-svn: 64136
2009-02-09 12:31:26 +00:00
Dan Gohman
154fb54e7f
Change several SmallPtrSetImpl members from public to protected,
...
to make the encapsulation more clear.
llvm-svn: 64017
2009-02-07 16:12:23 +00:00
Nick Lewycky
f273659759
Add an API for strings with possible NULLs in the middle. Refactor the other
...
two AddString methods to use it.
llvm-svn: 64005
2009-02-07 04:57:08 +00:00
Chris Lattner
49498bdff4
fix a pretty serious bug in StringMap where GetOrCreate(strstart,strend, z)
...
would not set new values to Z.
llvm-svn: 63707
2009-02-04 01:54:10 +00:00
Chris Lattner
526d29d06a
Fix a bug in getMaxValue/getMinValue to pass the right signedness the
...
the constructed APSInt, patch suggested by Ben Laurie!
llvm-svn: 63362
2009-01-30 01:58:19 +00:00
Roman Levenstein
504ba4c98b
Fix a bug in BitVector.h. All assignment operations (except the usual
...
assignment operator) were returning a copy of the bit vector, instead of a
reference! This old semantics probably did not meet the expectations.
With this patch, chained assignments happen to the right object.
llvm-svn: 63012
2009-01-26 11:07:20 +00:00
Bill Wendling
b7de7afd32
Get rid of warning about implicit 64-to-32 bit conversions.
...
llvm-svn: 62741
2009-01-22 02:10:33 +00:00
Steve Naroff
375325e8c1
Add explicit this-> (to make the VS compiler happy).
...
llvm-svn: 62731
2009-01-21 23:49:23 +00:00
Douglas Gregor
0a0af6b767
Fix ilist two-phase name lookup
...
llvm-svn: 62724
2009-01-21 22:38:44 +00:00
Dale Johannesen
a5699a1e8b
Do not use host floating point types when emitting
...
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts. Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.
llvm-svn: 62712
2009-01-21 20:32:55 +00:00
Dale Johannesen
6854f86296
Make special cases (0 inf nan) work for frem.
...
Besides APFloat, this involved removing code
from two places that thought they knew the
result of frem(0., x) but were wrong.
llvm-svn: 62645
2009-01-21 00:35:19 +00:00
Dale Johannesen
c9e6e85a38
Add an IEEE remainder function, which is not
...
fully implemented yet and not used. This is
mainly to clarify that APFloat::mod implements
C fmod, not remainder.
llvm-svn: 62593
2009-01-20 18:35:05 +00:00
Chris Lattner
816e00f6a0
eliminate use of uint32_t to improve compatibility with cygwin
...
llvm-svn: 62591
2009-01-20 18:23:14 +00:00
Chris Lattner
45a7b5ce57
improve compatibility with cygwin, patch by Jay Foad!
...
llvm-svn: 62535
2009-01-19 22:00:18 +00:00
Duncan Sands
ecfbe4521c
Get this building with gcc-4.4.
...
llvm-svn: 62322
2009-01-16 15:54:57 +00:00
Chris Lattner
70d79bbe85
add a new insertAfter method, patch by Tom Jablin!
...
llvm-svn: 62158
2009-01-13 07:43:51 +00:00
Misha Brukman
da77da48f3
Removed trailing whitespace.
...
llvm-svn: 62000
2009-01-09 19:25:42 +00:00
Bill Wendling
71f808dfa2
* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
...
StringMapEntryInitializer classes. Leave it for the compiler to figure out what
the type is and what "0" should be transformed into.
* Un-disable the unit tests which test the StringMapEntryInitializer class.
llvm-svn: 61922
2009-01-08 08:26:46 +00:00
Misha Brukman
83a92e0e1e
Remove extra blank line and space.
...
llvm-svn: 61916
2009-01-08 06:11:51 +00:00
Misha Brukman
4044287626
* Added unittests for StringMap
...
* Fixed but in StringMap::clear()
* Removed trailing whitespace
Original patch by Talin.
llvm-svn: 61914
2009-01-08 04:48:20 +00:00
Misha Brukman
c6d4c08346
* Fixed spelling of "sentinel"
...
* Removed trailing whitespace
llvm-svn: 61907
2009-01-08 02:21:23 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Dan Gohman
97be71789f
Add several more unimplemented operator overloads to ilist_iterator
...
to help catch errors.
llvm-svn: 61622
2009-01-04 03:22:42 +00:00
Nick Lewycky
35e441f7f1
Fix typo.
...
llvm-svn: 61554
2009-01-02 05:01:22 +00:00
Cedric Venet
b260c282bc
Add explicit this-> for some member function in templated base class.
...
These call are probably dependent but VS with /Za don't seems to think so. We need to help him.
llvm-svn: 60978
2008-12-13 10:55:13 +00:00
Dan Gohman
c0280e8867
Move the conversion to intptr_t to a separate statement. This
...
avoids GCC's warning even on 64-bit hosts.
llvm-svn: 60706
2008-12-08 17:41:24 +00:00