1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

29 Commits

Author SHA1 Message Date
Chris Lattner
8ee06ab2ab Fix problems where DenseMap used operator!= instead of correctly
calling the traits implementation of isEqual.

llvm-svn: 42782
2007-10-09 05:42:12 +00:00
Chris Lattner
ddd980044f Finish off PR1723, by working around some strange compiler bug.
llvm-svn: 42737
2007-10-07 17:57:10 +00:00
Daniel Berlin
f900d1295f Implement offline variable substitution in order to reduce memory
and time usage.
Fixup operator == to make this work, and add a resize method to DenseMap
so we can resize our hashtable once we know how big it should be.

llvm-svn: 42269
2007-09-24 19:45:49 +00:00
Owen Anderson
40196b7929 Fix CopyFrom for non-POD data types.
llvm-svn: 42208
2007-09-21 20:55:54 +00:00
Chris Lattner
cc315726f7 Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.

llvm-svn: 42042
2007-09-17 18:34:04 +00:00
Owen Anderson
0c2fdab32a Add a ValueInfoT template parameter to DenseMap so that it can properly make decisions
based on whether the key AND the value require ctors/dtors.

llvm-svn: 41837
2007-09-11 05:08:05 +00:00
Owen Anderson
a96cf4c60a Don't bother to initialize values corresponding to empty or tombstone
keys.

llvm-svn: 41834
2007-09-11 04:43:51 +00:00
Owen Anderson
8014c7f1f3 Fix non-deterministic behavior in the DenseMap copy constructor.
llvm-svn: 41831
2007-09-11 03:48:08 +00:00
Owen Anderson
06cbd29787 Forgot a line.
llvm-svn: 41115
2007-08-16 00:25:42 +00:00
Owen Anderson
868a1a5ed6 Add a copy constructor and an assignment operator to DenseMap.
llvm-svn: 41114
2007-08-16 00:18:32 +00:00
Reid Spencer
8c5c7c8453 Change casts from old style to new style. This helps document the details
better, gives the compiler a chance to validate the cast and reduces warnings
if the user turns on -Wold-style-cast option.

llvm-svn: 41033
2007-08-12 08:12:35 +00:00
Chris Lattner
ab61b6f01e Fix a bug in DenseMap::clear, where we never reset a tombstone
to EmptyKey.

llvm-svn: 40839
2007-08-05 08:43:36 +00:00
Chris Lattner
10db9656ba When clearing a SmallPtrSet, if the set had a huge capacity, but the
contents of the set were small, deallocate and shrink the set.  This
avoids having us to memset as much data, significantly speeding up
some pathological cases.  For example, this speeds up the verifier
from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a 
release build.

llvm-svn: 40837
2007-08-05 07:32:14 +00:00
Owen Anderson
2ceefaf94d Make the heuristic for shrinking DenseMap smarter.
llvm-svn: 40114
2007-07-20 18:56:46 +00:00
Owen Anderson
07f3b97796 Have DenseMap auto-shrink itself on clear(). This improves the time to optimize
403.gcc from 15.2s to 14.3s.

llvm-svn: 40100
2007-07-20 16:15:24 +00:00
Chris Lattner
f686454486 Make find return the appropriate iterator/const_iterator
llvm-svn: 34137
2007-02-10 06:58:17 +00:00
Chris Lattner
025607b8b0 Allow DenseMAp to take an explicit DenseMapKeyInfo
llvm-svn: 34134
2007-02-10 06:34:58 +00:00
Chris Lattner
672550f0b1 Fix a really subtle bug where the entire hash table could fill with
tombstones, causing subsequent insertions to infinitely loop.

llvm-svn: 33972
2007-02-07 00:55:59 +00:00
Chris Lattner
41ec7b272f add a version of insert that takes the key and value.
llvm-svn: 33856
2007-02-04 00:42:41 +00:00
Chris Lattner
71f7b41b05 8 buckets is way too small to start out with. This was only for testing.
llvm-svn: 33835
2007-02-03 19:30:48 +00:00
Chris Lattner
c5f2684ba7 silence annoying warning in release-asserts build
llvm-svn: 33797
2007-02-02 21:19:18 +00:00
Chris Lattner
10292e5997 add find/erase, add const iterators, fix bugs in iterators.
llvm-svn: 33791
2007-02-02 20:34:32 +00:00
Chris Lattner
d0c5814b38 add iterators
llvm-svn: 33790
2007-02-02 19:27:13 +00:00
Chris Lattner
fe31060a23 Add a new dense hash table implementation
llvm-svn: 33751
2007-02-01 07:49:59 +00:00
Chris Lattner
a24a3aaa94 rename DenseMap to IndexedMap.
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Alkis Evlogimenos
dbf62db0d0 Remove whitespace from the end of the line.
llvm-svn: 16624
2004-09-30 21:39:47 +00:00
Chris Lattner
4c2703cbea Add missing #include
llvm-svn: 16256
2004-09-09 02:37:56 +00:00
Alkis Evlogimenos
2fd7ccfb9c Pull in definition of std::unary_function.
llvm-svn: 16140
2004-09-02 03:24:45 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00