Commit Graph

208 Commits

Author SHA1 Message Date
Bill Wendling
d96662360f Support for llvm_ostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31988 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:31:42 +00:00
Chris Lattner
d5b58c239e Add a helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31981 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:32:35 +00:00
Bill Wendling
b5ebf15b2b Added a temporary hack to get the llvm-streams to work for future checkins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:21:29 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Jim Laskey
1f67a99260 Allow FoldingSet clients to pump up the initial hash size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31377 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 14:21:26 +00:00
Chris Lattner
09b6ac92d8 add a new form of insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 05:07:51 +00:00
Chris Lattner
dd94c8d6b2 Add SmallString a (currently) minimal class that adapts SmallVector to be
more string-like.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 03:39:20 +00:00
Chris Lattner
6c1645ce7d add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 03:14:15 +00:00
Chris Lattner
463c4a1ae9 add newline at end of file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 23:47:01 +00:00
Chris Lattner
23d7b36117 add a highly efficient hash table that is specialized for mapping C strings
to some other type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 23:42:03 +00:00
Jim Laskey
2f6d4c9766 Clean up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 22:52:02 +00:00
Jim Laskey
18529f3515 Apply editorials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31218 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 18:05:12 +00:00
Jim Laskey
0e5af195f6 Breakout folding hash set from SelectionDAGCSEMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31215 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 16:16:16 +00:00
Andrew Lenharth
f2bdcb3187 Fix build error in gcc 3.4 and make more this general
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30839 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 19:05:44 +00:00
Chris Lattner
53b06db6c7 Fix PR897
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-08 22:28:34 +00:00
Chris Lattner
0750bec272 add a simple reserve method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 06:08:16 +00:00
Chris Lattner
52c917190a Instantiate Statistic<> in one place, not in every .o file that uses it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 04:17:00 +00:00
Chris Lattner
181c359c9d Add 2nd form of resize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 21:52:08 +00:00
Chris Lattner
57b79795b3 add resize, move swap out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29823 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 17:28:57 +00:00
Chris Lattner
d6007d6076 add a bunch more operations, including swap, insert, erase, front(), and
bugfixes for operator=.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29811 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 06:27:16 +00:00
Chris Lattner
67b7ff9ede silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:09:24 +00:00
Chris Lattner
2e6baf626d Bugfixes for smallvector when the element size is small and N is small.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 01:23:31 +00:00
Chris Lattner
b5677f933f avoid a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 21:47:50 +00:00
Chris Lattner
1653366010 move code out of line so that GCC doesn't inline it at -O3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:40:23 +00:00
Chris Lattner
80b6582314 Split SmallVector into SmallVector and SmallVectorImpl, which allows us to
eliminate code duplication due to the 'N' parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:19:51 +00:00
Chris Lattner
8e10f5b811 capacity is a pointer, not a value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29564 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 01:54:17 +00:00
Chris Lattner
1c567b5d92 add a new assign method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 01:44:16 +00:00
Chris Lattner
8de353df9d Add ctor that initializes from a range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29560 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 00:37:50 +00:00
Chris Lattner
d0337c1678 Remove assertions from the SmallVector class. They slow down clients of
smallvector too much in a release build.  Removing them speeds up isel 4%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29556 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:41:59 +00:00
Chris Lattner
f5e42bfed1 Add a clear method to SmallVector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 05:45:34 +00:00
Chris Lattner
cfb3ba060a Silence a warning on x86-64, reported by chandlerc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-06 18:12:50 +00:00
Evan Cheng
e6ffe61c84 This causes some random crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29534 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-05 17:31:00 +00:00
Chris Lattner
d91e5f911f The smallvector dtor should destroy the elements.
Implement pop_back.
Chage some code to use 'iterator' instead of T*.  This unbreaks operators=.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 05:03:42 +00:00
Chris Lattner
825405c0c1 Use std::copy instead of custom loops to take advantage of STL optimizations.
Add a new append method for appending a range.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 03:38:08 +00:00
Chris Lattner
f282654021 Add a new llvm::SmallVector template, which is similar to the vector class, but
contains optimizations to avoid heap allocation if the vector size is smaller
than some threshold.  This can significantly improve the performance of code
that allocates many small vectors by eliminating tons of small malloc/free's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 06:22:30 +00:00
Chris Lattner
1e36126f5e Add two helper functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 22:54:06 +00:00
Chris Lattner
70aa33ee37 Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 16:53:47 +00:00
Reid Spencer
79818a40d7 Favor C++ casts over C casts in C++ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28622 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:03:53 +00:00
Chris Lattner
6fb568f77e Fix utostr once and for all, by making there only be one function named
utostr.  To keep the efficiency in the 32-bit case, make it check to see if
the value is 32-bits and if so switch over to the faster 32-bit case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28601 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 21:25:50 +00:00
Andrew Lenharth
37e8bde141 Fix build breakage on alpha, without causing it on x86. as a bonus, all platforms can invent the same number of unique names now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28596 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:18:28 +00:00
Andrew Lenharth
f48ec61fbd revert for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28595 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 19:16:26 +00:00
Andrew Lenharth
cffba3a6e9 make 64-bit safe and fix the build on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 18:56:42 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +00:00
Chris Lattner
410354fe0c Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 16:23:43 +00:00
Chris Lattner
8211e82e40 add some methods for case-insensitive string compares
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:36:29 +00:00
Jim Laskey
3e0be526bf Use find instead of lower_bounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:30:51 +00:00
Jim Laskey
e4a359e43b Add support to find existing entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:09:35 +00:00
Chris Lattner
1dc3fd1110 This only needs <iosfwd> not <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 23:43:45 +00:00
Evan Cheng
7715fba9b1 Suppress "no newline at end of file" warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 19:21:01 +00:00
Jim Laskey
e3150024b4 Reduce memory consumption and force (somewhat) access to entries via ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25393 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 16:29:58 +00:00