1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

251 Commits

Author SHA1 Message Date
Mikhail Glushenkov
eaf0f7f20b Const-correctness.
llvm-svn: 81249
2009-09-08 19:51:39 +00:00
Mikhail Glushenkov
b02519c95d Since Program is basically a PID, it should be copyable.
llvm-svn: 81248
2009-09-08 19:51:12 +00:00
Mikhail Glushenkov
d5ee80a911 Get rid of the Pid_ member in the Program class.
llvm-svn: 81247
2009-09-08 19:50:55 +00:00
Mikhail Glushenkov
bd38dc207a Add a Kill() function to the Program class.
llvm-svn: 81246
2009-09-08 19:50:27 +00:00
Duncan Sands
4b92376ba8 Tweak code into an equivalent form for which icc
doesn't warn about unreachable instructions.  Patch
by Erick Tryzelaar (#111).

llvm-svn: 81110
2009-09-06 10:53:22 +00:00
Chris Lattner
3203639c35 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Dan Gohman
bc6b14ba00 This void is implicit in C++.
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
Benjamin Kramer
81ce360762 Revert 78662 to fix broken windows build. Add a comment which explains the problem.
llvm-svn: 78679
2009-08-11 16:41:22 +00:00
Dan Gohman
618fc2fc8e Remove an unnecessary mutable.
llvm-svn: 78662
2009-08-11 15:03:52 +00:00
Daniel Dunbar
c5047d9d96 Fix a race condition in getting the process exit code on Win32.
llvm-svn: 77953
2009-08-03 05:02:46 +00:00
Mikhail Glushenkov
89b10452e1 Add a warning.
llvm-svn: 77746
2009-07-31 22:24:20 +00:00
Reid Kleckner
3f197c850d Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.

llvm-svn: 76902
2009-07-23 21:46:56 +00:00
Reid Kleckner
6f9bf7f028 Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
llvm-svn: 76838
2009-07-23 01:40:54 +00:00
Reid Kleckner
b500f07edf Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

Also, switch function stubs and global data over to using the BumpPtrAllocator.

This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs.  I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.

llvm-svn: 76828
2009-07-23 00:49:59 +00:00
Mikhail Glushenkov
1c0854b913 Add a Program::GetPid() method.
llvm-svn: 76341
2009-07-18 21:43:40 +00:00
Mikhail Glushenkov
583e23d726 Remove duplication in Program::Execute{And,No}Wait.
Implemented by moving the code out of static functions into methods of Program
class.

llvm-svn: 76340
2009-07-18 21:43:12 +00:00
Mikhail Glushenkov
d44eba5166 Trailing whitespace.
llvm-svn: 76229
2009-07-17 20:38:17 +00:00
Dan Gohman
69766f9ade Add a raw_ostream operator<< to sys::Path.
llvm-svn: 75790
2009-07-15 16:33:33 +00:00
David Greene
87dbe0a3b5 Add an ExecuteNoWait interface to support asynchronous process spawning.
llvm-svn: 75055
2009-07-08 21:46:40 +00:00
Owen Anderson
75f0f1cc6c Have scoped mutexes take referenes instead of pointers.
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Chris Lattner
ccaba64332 Eliminate the static constructors and locks from DynamicLibrary.cpp.
This fixes PR4512 and eliminating static ctors is always good.  Losing
thread safety is unfortunate, but the code is just incredibly poorly
designed.

If someone is interested, the "right" solution is to split
DynamicLibrary.cpp into two separate pieces: a stateless piece in
libsystem, and a simple support file in libsupport that has the
"state" (e.g.  AddSymbol) in managed static objects.

Doing this would both fix memory leaks we already have, as well as make
the code thread safe again.  it would also make sense to move all the
unix specific code in System/DynamicLibrary.cpp into 
System/Unix/DynamicLibrary.inc.

llvm-svn: 74927
2009-07-07 18:17:07 +00:00
Chris Lattner
b11fca33f8 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
llvm-svn: 74926
2009-07-07 18:01:58 +00:00
Jeffrey Yasskin
29ea777c1e Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
Windows variant, strerror_s, but I couldn't test that.

I'll update configure and config.h.in in a subsequent patch.

llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Owen Anderson
3a892a63b7 Add support for const thread locals.
llvm-svn: 74226
2009-06-25 23:31:18 +00:00
Owen Anderson
e716e57779 Add a class for supporting platform independent thread-local storage.
Windows people, please double-check/patch this.

llvm-svn: 74209
2009-06-25 21:58:01 +00:00
Owen Anderson
5bda03a404 Add atomic multiply and divide operations, built on top of CompareAndSwap.
llvm-svn: 74004
2009-06-23 21:19:04 +00:00
Owen Anderson
c11dfb46c1 Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.

llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Owen Anderson
c2d02066d0 Atomic ops that do arithmetic use signed arithmetic.
llvm-svn: 73980
2009-06-23 18:30:27 +00:00
Owen Anderson
1bea9b9158 Label the existing atomic functions as 32-bit specific, and add a 64-bit one that will be useful in
the near future.

llvm-svn: 73971
2009-06-23 18:01:04 +00:00
Owen Anderson
e0ff9fb130 Add an atomic add operation.
llvm-svn: 73964
2009-06-23 17:39:31 +00:00
Owen Anderson
b66d0add26 Add debugging code to test for various locking faux-pas's, when running in single threaded mode. This should help improve testing coverage for
threading support, without having extensive actually concurrent clients yet.

llvm-svn: 73803
2009-06-20 00:27:21 +00:00
Owen Anderson
c0ba371831 Fix a major typo.
Nicolas, this is probably the cause of the failures you were seeing.

llvm-svn: 73770
2009-06-19 17:08:20 +00:00
Owen Anderson
5fa89d2f8d Fix weird class-size-being-different problems. At some level this is being caused by config.h not being
included everywhere.

llvm-svn: 73745
2009-06-19 00:48:22 +00:00
Owen Anderson
b7742c5035 Add a SmartScopedLock, and use it to simplify code.
llvm-svn: 73722
2009-06-18 20:51:00 +00:00
Owen Anderson
a1d2310ac7 Simplify the SmartMutex implementation a bit.
llvm-svn: 73711
2009-06-18 18:29:03 +00:00
Owen Anderson
4760da0a7a Give RWMutex the SmartRWMutex treatment too.
llvm-svn: 73710
2009-06-18 18:26:15 +00:00
Owen Anderson
9aaa6b8958 Insert a SmartMutex templated class into the class hierarchy, which takes a template parameter specifying whether this mutex
should become a no-op when not running in multithreaded mode.  Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility.

llvm-svn: 73709
2009-06-18 17:53:17 +00:00
Owen Anderson
a59f91c08d Move Threading.[h|cpp] from Support to System.
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Owen Anderson
00e7ebbc38 Reapply r73647 in a non-broken form.
llvm-svn: 73662
2009-06-17 23:49:06 +00:00
Owen Anderson
0e2a78e820 Protect the GC table in Function.cpp
llvm-svn: 73647
2009-06-17 22:23:31 +00:00
Owen Anderson
f8776799ec Add an RAII ScopedWriter, which allows one to acquire a writer lock for the duration of a scope. Simplify a lot of uses of
writer locks in Constants.cpp by using it.

llvm-svn: 73630
2009-06-17 20:34:43 +00:00
Owen Anderson
3637fc65bd Use atomic increment/decrement for reference counting of Type's.
llvm-svn: 73588
2009-06-17 00:28:49 +00:00
Owen Anderson
430f18d2db Add an atomic increment and decrement implementation, which will be used for
thread-safe reference counting.

llvm-svn: 73587
2009-06-17 00:13:00 +00:00
Owen Anderson
c52c99f111 Fix #include guards.
llvm-svn: 73548
2009-06-16 20:26:04 +00:00
Owen Anderson
48d53f2c53 Add a portable wrapper for reader-writer locks.
llvm-svn: 73545
2009-06-16 20:19:28 +00:00
Chris Lattner
dfaaf63aff add a new static method to portably determine whether a patch is
absolute or not, based on a patch by Gregory Curfman!

llvm-svn: 73368
2009-06-15 04:17:07 +00:00
Torok Edwin
a10c3b9bc6 Fix comments.
llvm-svn: 72858
2009-06-04 08:18:25 +00:00
Torok Edwin
5da9f51d1e Add support for outputting ANSI colors to raw_fd_ostream.
llvm-svn: 72854
2009-06-04 07:09:50 +00:00
Bill Wendling
d50f27458f Untabify.
llvm-svn: 72603
2009-05-30 00:58:37 +00:00
Owen Anderson
81e8ddcfda Use DataTypes.h instead of stdint.h.
llvm-svn: 72201
2009-05-21 00:48:13 +00:00