Chris Lattner
973556b724
Fix typeo. grow() cannot shrink storage. clear() should really nuke storage
...
llvm-svn: 11865
2004-02-26 04:07:12 +00:00
Alkis Evlogimenos
d8bace7f60
Add DenseMap template and actually use it for for mapping virtual regs
...
to objects.
llvm-svn: 11840
2004-02-25 21:55:45 +00:00
Brian Gaeke
04cff21c2f
Cygwin defines log2 as a macro. Undef it here IFF it has already been defined,
...
so that we always get the inline function instead. Remember, kids, like it says
in the GCC manual, "An Inline Function is As Fast As a Macro."
llvm-svn: 11815
2004-02-25 01:53:45 +00:00
Chris Lattner
101e704b0b
Use the new LLVM is_class template instead of the boost one, allowing us to
...
remove our dependency on boost! Thanks to Reid Spencer for making this possible!
llvm-svn: 11785
2004-02-24 03:50:05 +00:00
Chris Lattner
78eed17a29
Check in a new type_traits header which provides the mysterious is_class
...
template. Thanks go out to Reid Spencer for skillfully extracting this
from boost!
llvm-svn: 11784
2004-02-24 03:49:29 +00:00
Chris Lattner
1302e3ac95
Noone cares about similarity to boost
...
llvm-svn: 11783
2004-02-24 03:47:25 +00:00
Brian Gaeke
686efc0b56
DataTypes.h is now output from configure, and shortened
...
llvm-svn: 11778
2004-02-23 22:07:26 +00:00
Brian Gaeke
c685388125
ThreadSupport.h is now output from configure.
...
llvm-svn: 11770
2004-02-23 21:30:29 +00:00
Brian Gaeke
cc7644407c
Renamed to hash_set.in; move to using autoconf substitution tags.
...
llvm-svn: 11765
2004-02-23 18:56:36 +00:00
Brian Gaeke
17d7a29d76
Renamed to hash_map.in; move to using autoconf substitution tags.
...
llvm-svn: 11764
2004-02-23 18:56:35 +00:00
Brian Gaeke
0fa55f7909
Renamed from include/Support/iterator. Doxygenify comments; add autoconf substitution tags.
...
llvm-svn: 11754
2004-02-23 18:16:10 +00:00
Brian Gaeke
bd02d1806f
Replaced by include/Support/iterator.in.
...
llvm-svn: 11753
2004-02-23 18:16:10 +00:00
Chris Lattner
c62ce162ff
Add a new function
...
llvm-svn: 11630
2004-02-19 20:03:08 +00:00
Chris Lattner
cc09204840
Change the order of the arguments to the ctor, allowing us to make the boolean default to true
...
llvm-svn: 11592
2004-02-18 20:20:52 +00:00
Chris Lattner
2bcf9410de
Move a helper class out of bugpoint to here.
...
llvm-svn: 11582
2004-02-18 17:16:17 +00:00
Alkis Evlogimenos
7c6e4d5ae6
Add next() and prior() iterator utility functions. Unlike std::advance
...
they do not modify the passed iterator but return a copy.
next(myIt) returns copy of myIt incremented once
next(myIt, n) returns copy of myIt incremented n times
prior(myIt) returns copy of myIt decremented once
prior(myIt, n) returns copy of myIt decremented n times
While at it remove obsolete implementation of mapped_iterator.
llvm-svn: 11429
2004-02-14 01:17:28 +00:00
Brian Gaeke
5feee4b251
Update the example here in the header file.
...
I don't know about you guys, but I rarely read the .html manuals :-)
llvm-svn: 11366
2004-02-13 04:49:04 +00:00
Chris Lattner
0302beeb09
If a node has more than 64 outgoing edges, make the edges go from the 'truncated' block,
...
instead of dropping them entirely.
llvm-svn: 11334
2004-02-11 20:44:17 +00:00
Alkis Evlogimenos
56258ab1a2
Add global methods that prevent us from using ilist::iterators as
...
random access iterators.
llvm-svn: 11248
2004-02-09 22:40:50 +00:00
Chris Lattner
74a99554d1
One of the 'annoying' things about ilists is that the iterators don't behave
...
quite the same as for non-intrusive lists of pointers to nodes. To support
transitioning code bases, add a new 'compatibility' iterator.
llvm-svn: 11172
2004-02-08 00:51:31 +00:00
Brian Gaeke
92affee3e7
Use autoconf answers from config.h (FIXME, should autoconf this file
...
directly instead).
Fix LockHolder/MutexLocker typo.
llvm-svn: 11156
2004-02-06 22:33:17 +00:00
Chris Lattner
4533ba592b
fix copy-and-pasto
...
llvm-svn: 10907
2004-01-17 22:48:06 +00:00
Chris Lattner
a75f858ac4
Revision of Brian's threading support library to be a bit more generic and
...
platform independent. This code is completely untested (but never used),
and needs autoconf support for detecting pthreads, but it's a start, and
deletes two emails from my inbox. :)
llvm-svn: 10906
2004-01-17 19:54:29 +00:00
Chris Lattner
b3d765f5dd
Remove ENDIAN_* support. LLVM does not need it anymore.
...
llvm-svn: 10872
2004-01-15 06:13:58 +00:00
Chris Lattner
d8087822be
add support for -- for symmetry
...
llvm-svn: 10865
2004-01-14 23:37:22 +00:00
Chris Lattner
78f1f51c66
* Add a new helper progress method
...
* Make sure that the user sees the 100% mark
* Don't bother printing out X.0%, just print out X%
llvm-svn: 10672
2003-12-31 10:20:38 +00:00
Chris Lattner
e87006eb7e
add new function
...
llvm-svn: 10665
2003-12-31 06:16:02 +00:00
Chris Lattner
ef927f0ef2
clarify comments
...
llvm-svn: 10663
2003-12-31 05:45:16 +00:00
Chris Lattner
1c007c0ff0
New class, useful for command-line interactive programs.
...
llvm-svn: 10662
2003-12-31 05:40:02 +00:00
Chris Lattner
5220296f77
doxygenify
...
llvm-svn: 10661
2003-12-31 04:42:00 +00:00
Chris Lattner
419b70539b
Add new function
...
llvm-svn: 10648
2003-12-30 07:35:47 +00:00
Chris Lattner
6b668f228f
Further revisions of the FDHandle idea. In this version we use ownership
...
semantics that are the same as those used by std::auto_ptr. This allows
copying of FDHandle's, but copying transfers ownership.
llvm-svn: 10646
2003-12-30 02:45:16 +00:00
Chris Lattner
0120e92b2b
Add trivial exception specs to produce better code since the methods cannot
...
be inlined.
llvm-svn: 10643
2003-12-29 21:43:58 +00:00
Chris Lattner
a462161f9c
Factor FDHandle out of the bytecode reader into the FileUtilities.h support
...
routines.
llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Chris Lattner
19857d2c05
add new function
...
llvm-svn: 10638
2003-12-29 05:06:38 +00:00
Chris Lattner
83025b214b
This header is dead
...
llvm-svn: 10470
2003-12-15 06:39:18 +00:00
Brian Gaeke
93823ed30c
Lock abstraction, introduced with a view toward making the JIT thread-safe.
...
Eventually.
llvm-svn: 10284
2003-12-01 21:33:31 +00:00
Chris Lattner
594654f17d
Hrm, how could this compile?
...
llvm-svn: 10263
2003-11-29 19:55:02 +00:00
Misha Brukman
f0c7647c11
Expose functionality to query if a file is an ELF shared object.
...
llvm-svn: 10194
2003-11-24 05:28:39 +00:00
Brian Gaeke
edb102c266
A better way to get std::pair into the compiler's little, walnut-sized brain.
...
llvm-svn: 10174
2003-11-23 03:50:31 +00:00
Brian Gaeke
124d7fd7f0
This is a hack to make this file compile under g++-3.0.x;
...
otherwise it can't decide what std::pair is. It seemed relatively
harmless.
llvm-svn: 10173
2003-11-23 00:55:27 +00:00
Chris Lattner
a3bdbd0f82
Fix copy-and-pasteo
...
llvm-svn: 10049
2003-11-17 01:07:58 +00:00
Chris Lattner
82f87e63e8
Fixes for PR114: Thanks to Reid Spencer!
...
llvm-svn: 10029
2003-11-16 20:21:15 +00:00
Chris Lattner
9d7587238b
Remove needless dependence on boost
...
llvm-svn: 9961
2003-11-13 04:11:30 +00:00
Chris Lattner
97cf7cf400
Add namespace qualifier
...
llvm-svn: 9959
2003-11-13 02:30:22 +00:00
Chris Lattner
537bb3cc53
Minor cleanups
...
llvm-svn: 9958
2003-11-13 02:01:41 +00:00
Chris Lattner
9580ce235b
Fix faulty namespacification
...
llvm-svn: 9943
2003-11-12 22:45:14 +00:00
John Criswell
9537a75c23
Regress to not using the llvm namespace.
...
This keeps Pool Allocation stuff from compiling.
We can re-visit it later when we have time to do it right.
llvm-svn: 9932
2003-11-12 21:32:06 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
c30c5db05f
Add prototypes for CheckMagic, IsArchive, and IsBytecode.
...
llvm-svn: 9900
2003-11-11 21:53:29 +00:00
Brian Gaeke
1f41970f9c
VS: ----------------------------------------------------------------------
...
Add prototype for FileOpenable().
llvm-svn: 9891
2003-11-11 18:27:11 +00:00
Brian Gaeke
b621857f01
Patch to fix PR102, contributed by Reid Spencer.
...
llvm-svn: 9849
2003-11-10 03:06:09 +00:00
Chris Lattner
59c3985777
Provide a specialization of _Alloc_traits, which allows the G++ runtime to avoid
...
storing an instance of the allocator in each data structure it uses. Yaay.
llvm-svn: 9795
2003-11-07 23:20:56 +00:00
Chris Lattner
fc42785a60
Add some ctors for this allocator
...
llvm-svn: 9766
2003-11-07 15:20:06 +00:00
Alkis Evlogimenos
43b0bbe12c
Add std::pair tier. This is a much simplified version of boost::tie
...
that works only for std::pair.
llvm-svn: 9723
2003-11-05 05:58:26 +00:00
Chris Lattner
ee0ba89dd1
New file, for use by the pool allocator project
...
llvm-svn: 9702
2003-11-04 22:38:28 +00:00
Chris Lattner
e9cdb46520
Escape "'s, which are frequent visitors to C++ types
...
llvm-svn: 9642
2003-10-31 22:16:41 +00:00
Brian Gaeke
8d09fd1ea6
Apparently my Mac OS X fixes were not entirely compatible with SPARC...hmm.
...
llvm-svn: 9612
2003-10-30 15:03:49 +00:00
Brian Gaeke
7086bbb33c
Add support for utostr(unsigned long)
...
llvm-svn: 9588
2003-10-29 20:06:19 +00:00
Brian Gaeke
0a82d78d8c
Pull in stdint.h here, if we have it. Some systems keep
...
the INT*_MAX macros there.
llvm-svn: 9577
2003-10-29 04:25:48 +00:00
Brian Gaeke
c4fdf65e5a
Remove __STDC_LIMIT_MACROS from here.
...
llvm-svn: 9550
2003-10-28 19:11:29 +00:00
Chris Lattner
80e6f5db8f
This #include is no longer necessary
...
llvm-svn: 9306
2003-10-20 20:29:44 +00:00
John Criswell
dd04329da2
Added LLVM notice.
...
llvm-svn: 9300
2003-10-20 19:46:57 +00:00
Chris Lattner
46c3217be4
This file uses assert and doesn't include anything which already #includes <cassert>
...
llvm-svn: 9142
2003-10-15 21:55:37 +00:00
Chris Lattner
a3244bbefd
Add missing default argument
...
llvm-svn: 9092
2003-10-13 16:44:30 +00:00
Chris Lattner
514e18c061
add support for "external" depth first iterators, which store the 'visited' set
...
outside of the iterator itself.
llvm-svn: 9090
2003-10-13 16:34:26 +00:00
Chris Lattner
97b07c2096
Extricate the "reverse" support from the depth-first iterator. This is really
...
a crappy form of post-order traversal which really does not belong here. While
we are at it, improve documentation and use a vector instead of a stack.
This improves the post dominator analysis pass by ~5%, and probably also helps
other passes as well.
llvm-svn: 9084
2003-10-13 15:45:33 +00:00
Brian Gaeke
e2a8124476
Add my abstracted dynamic linker support files.
...
llvm-svn: 9008
2003-10-10 16:55:42 +00:00
Misha Brukman
f6a3eb6785
Moved to llvm/include/llvm/Support because it is LLVM-specific.
...
llvm-svn: 8897
2003-10-06 18:34:38 +00:00
Chris Lattner
33295466ff
Doxygenize class comments. Add new NamedRegionTimer class
...
llvm-svn: 8888
2003-10-06 15:02:16 +00:00
Chris Lattner
9414782d68
Output a very high-precision number
...
llvm-svn: 8856
2003-10-05 00:41:07 +00:00
Chris Lattner
555eaf5bbb
Standardize header file comments
...
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
a559b209eb
Add a file header
...
llvm-svn: 8781
2003-09-30 18:28:53 +00:00
Chris Lattner
9ce334a52a
Remove unused header
...
llvm-svn: 8780
2003-09-30 18:19:13 +00:00
Misha Brukman
674f1954bf
Abstracted away the process of running our tools + gcc from bugpoint.
...
llvm-svn: 8753
2003-09-29 22:38:57 +00:00
Misha Brukman
3c1d88acac
Tersified and fixed whitespace (tabs -> spaces).
...
llvm-svn: 8752
2003-09-29 22:37:57 +00:00
John Criswell
74c89470d3
In ExecWait(), made the child process exit if it can't execve() the new
...
program.
Added the use of const (which compiles and is hopefully correct).
Added comments.
llvm-svn: 8585
2003-09-17 19:02:49 +00:00
John Criswell
f13ec35fe1
Added the ExecWait() function.
...
llvm-svn: 8578
2003-09-17 15:14:25 +00:00
Chris Lattner
64b3894035
Fix spello
...
llvm-svn: 8432
2003-09-10 05:30:09 +00:00
John Criswell
b83a22bd82
Added the MakeFileReadable() method.
...
llvm-svn: 8327
2003-09-02 21:09:30 +00:00
John Criswell
5357283c7a
Added the MakeFileExecutable() method. This method takes a filename and
...
gives it execute access while respecting the user's umask.
llvm-svn: 8324
2003-09-02 20:14:57 +00:00
Chris Lattner
78a5c1aa3c
Rename TarjanSCCIterator -> scc_iterator
...
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
* It's shorter
* We don't name classes by the implementation, we name it for the interface!
llvm-svn: 8273
2003-08-31 20:01:57 +00:00
Chris Lattner
71e71f294b
ELIMINATE the SCC class completely. One less thing deriving from std::vector
...
llvm-svn: 8272
2003-08-31 19:55:31 +00:00
Chris Lattner
5cac4ddca7
Move the HasLoop method from the SCC class to the iterator class
...
llvm-svn: 8268
2003-08-31 19:51:22 +00:00
Chris Lattner
f020906172
* Cleanups
...
* operator* now returns a reference to the current SCC, instead of a possibly
null pointer
llvm-svn: 8261
2003-08-31 19:34:27 +00:00
Chris Lattner
a74a63c8f9
Remove usage of unsigned long: unsigned should be enough!
...
Remove explicit use of a stack<>, use a vector instead
llvm-svn: 8246
2003-08-31 01:48:21 +00:00
Chris Lattner
b1c0cd02fc
This file uses cerr without including <iostream>. Since it's just for debugging, comment it out
...
llvm-svn: 8245
2003-08-31 01:45:00 +00:00
Chris Lattner
fe048e4404
Fix compilation problems with G++ 3.4
...
llvm-svn: 8212
2003-08-29 14:22:29 +00:00
Misha Brukman
a26dd3ba05
Spell `incompatible' correctly.
...
llvm-svn: 8163
2003-08-27 18:26:28 +00:00
Chris Lattner
23edbf25f4
Changes to work better with GCC3.4/LLVM G++
...
llvm-svn: 8054
2003-08-22 14:26:59 +00:00
Chris Lattner
e08478eb59
Remove unused file
...
llvm-svn: 8021
2003-08-21 20:54:51 +00:00
Chris Lattner
9a4dbf6da0
Make assertion message more helpful in a case that might happen...
...
llvm-svn: 7975
2003-08-19 21:57:00 +00:00
Misha Brukman
7eb05a170a
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Brian Gaeke
497216dc00
lib/Support/CommandLine.cpp:
...
Many changes suggested by Chris. It's okay, I'll recover from the emotional
damage...maybe someday. :-)
Collapse ParseCStringVector into ParseStringVector. Comment it.
Make it take a const input.
Use std::string::npos instead of -1 (what a mouthful!)
Make ParseEnvironmentOptions take const inputs.
Check its args at the very beginning.
Strdup all the contents of newArgv and free them all at the end.
include/Support/CommandLine.h:
Constify progName and envVar arguments to ParseEnvironmentOptions().
llvm-svn: 7905
2003-08-15 21:05:57 +00:00
Misha Brukman
c98ef9aeb7
hash_map and hash_set:
...
* Define HASH_NAMESPACE to `std' in the case of pre-3.0 GCC compilers
* Add comments to clarify the intent of all the #ifdef madness
* Add VIM directive to highlight files as C++
llvm-svn: 7903
2003-08-15 20:01:10 +00:00
Misha Brukman
2d0a292edc
Reordered includes to be consistent with the LLVM style.
...
llvm-svn: 7887
2003-08-15 17:52:02 +00:00
Chris Lattner
e58e442e20
Remove extraneous cl:: namespace qualifiers
...
llvm-svn: 7852
2003-08-14 22:04:41 +00:00
Brian Gaeke
ca782d9fe6
Add support for reading command line arguments from an environment variable.
...
llvm-svn: 7851
2003-08-14 22:00:59 +00:00
Brian Gaeke
e2fe394f6f
If we can't find INT64_MAX, set it to a reasonable default value,
...
instead of printing out an (incorrect) #error message.
llvm-svn: 7744
2003-08-11 20:04:57 +00:00
Misha Brukman
b02e413f65
Remove references to `bugpoint' from the now-generic system utilities.
...
llvm-svn: 7693
2003-08-07 21:33:33 +00:00