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

47241 Commits

Author SHA1 Message Date
Anton Korobeynikov
dbb79a8409 Fix asm string from MOVi16
llvm-svn: 73661
2009-06-17 23:43:36 +00:00
Anton Korobeynikov
4e0c3634cc Thumb2 instructions are enabled only in unified assembler mode.
Emit switch directive for it. I have no idea whether this is
requirement for Darwin or not.

llvm-svn: 73660
2009-06-17 23:43:18 +00:00
Dan Gohman
1530824138 Instcombine zext(trunc(x) & mask) to x&mask, even if the trunc has
multiple users.

llvm-svn: 73656
2009-06-17 23:17:05 +00:00
Owen Anderson
66eb50a125 Use double-checked locking for this lazy initialization.
llvm-svn: 73653
2009-06-17 22:53:57 +00:00
Owen Anderson
0e2a78e820 Protect the GC table in Function.cpp
llvm-svn: 73647
2009-06-17 22:23:31 +00:00
Anton Korobeynikov
77a0bd41fc Honour calling convention and attributes of Callee by default.
llvm-svn: 73646
2009-06-17 22:20:46 +00:00
Owen Anderson
2db8ec3635 Use atomic increment here.
llvm-svn: 73643
2009-06-17 22:01:09 +00:00
Owen Anderson
327464c4d3 Thread-safe (and ManagedStatic-ized) LeakDetector!
llvm-svn: 73642
2009-06-17 21:56:05 +00:00
Owen Anderson
4874790cb9 Guard mutation of the timing info global.
llvm-svn: 73639
2009-06-17 21:28:54 +00:00
Owen Anderson
a4471607bc We need to use double-checked locking for lazy initialization in this case when running multithreaded.
llvm-svn: 73636
2009-06-17 21:16:20 +00:00
Stefanus Du Toit
bbf53428f9 Fix link to BasicBlock doxygen documentation in Programmer's Manual
llvm-svn: 73635
2009-06-17 21:12:26 +00:00
Lang Hames
5c64015a56 VNInfo cleanup.
llvm-svn: 73634
2009-06-17 21:01:20 +00:00
Dan Gohman
50b7d0d843 Add -disable-output to a bunch of tests that don't care about the output.
llvm-svn: 73633
2009-06-17 20:56:26 +00:00
Dale Johannesen
26f0dd9021 This fixes a bug introduced in 72661, which can
move loads back past a check that the load address
is valid, see new testcase.  The test that went
in with 72661 has exactly this case, except that
the conditional it's moving past is checking
something else; I've settled for changing that
test to reference a global, not a pointer.  It
may be possible to scan all the tests you pass and
make sure none of them are checking any component
of the address, but it's not trivial and I'm not
trying to do that here.

llvm-svn: 73632
2009-06-17 20:48:23 +00:00
Owen Anderson
b43a8ba8e5 Factor out some common code.
llvm-svn: 73631
2009-06-17 20:43:39 +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
3bf7bd1297 Simplify the locking on the Constants tables, and make it more efficient, by pushing it into the ValueMap from the callers.
Document those ValueMap functions that are _not_ locked, so that callers are aware that they need to do the locking themselves.

llvm-svn: 73628
2009-06-17 20:10:08 +00:00
Torok Edwin
09a9b85420 Add debug message about non-local loads being clobbered.
llvm-svn: 73625
2009-06-17 18:48:18 +00:00
Owen Anderson
fedb566872 Type safety for Constants.cpp! Some of this is temporary, as I'm planning to push some of the R/W locking into FoldingSet.
llvm-svn: 73624
2009-06-17 18:40:29 +00:00
Anton Korobeynikov
7fd29c57a8 Initial support for some Thumb2 instructions.
Patch by Viktor Kutuzov and Anton Korzh from Access Softek, Inc.

llvm-svn: 73622
2009-06-17 18:13:58 +00:00
Dan Gohman
c7dfa0d7c0 Update comments to use doxygen syntax.
llvm-svn: 73621
2009-06-17 17:51:33 +00:00
Owen Anderson
d7312aff32 Protect the ValueHandle table.
llvm-svn: 73620
2009-06-17 17:36:57 +00:00
Owen Anderson
5b8615fcbd We need to guard reads of the AbstractTypeUsers list, as well as writes to it. While it would be nice to use a R/W lock here,
we can't, because it HAS to be recursive.

llvm-svn: 73617
2009-06-17 17:13:54 +00:00
Douglas Gregor
f3f924bfb6 Define LLVM_NATIVE_ARCH in CMake, so that lli can actually JIT
llvm-svn: 73616
2009-06-17 17:01:56 +00:00
Douglas Gregor
b1764a0bef Add RWMutex.cpp to the CMake makefiles
llvm-svn: 73615
2009-06-17 17:01:30 +00:00
Owen Anderson
179a1f49dc Type safety for TypeSymbolTable!
llvm-svn: 73614
2009-06-17 16:56:27 +00:00
Chris Lattner
a8c5b43391 make sure that JIT examples link in their appropriate target.
llvm-svn: 73613
2009-06-17 16:48:44 +00:00
Chris Lattner
213e8cbce7 remove two headers subsumed by TargetSelect.h
llvm-svn: 73612
2009-06-17 16:45:02 +00:00
Chris Lattner
be0596427d switch to using llvm/Target/TargetSelect.h
llvm-svn: 73611
2009-06-17 16:42:19 +00:00
Chris Lattner
21f6855b00 Add a utility header that makes it easy to link in the right set
of targets for various purposes.

llvm-svn: 73610
2009-06-17 16:42:01 +00:00
Owen Anderson
c40f3f2752 Improve the Win32 reader-writer lock implementation by making it just a normal
lock.  This is obviously bad, but at least it's threadsafe!  If you know how
to improve this in a pre-Vista friendly well, patches welcome!

Patch by Max Burke.

llvm-svn: 73607
2009-06-17 09:10:42 +00:00
Nick Lewycky
1704e96a5f Fix libLTO by #include'ing the initializers for all targets and all asm
printers.

While I'm here, alphabetize.

llvm-svn: 73606
2009-06-17 06:52:10 +00:00
Sanjiv Gupta
6d9a123c1d >> What if my global variable was into a different address space than stack?
>>     
>
> It doesn't matter in terms of semantics: because AnalyzeGlobal
> returned false, we're guaranteed the address of the global is never
> taken.  I wouldn't be surprised if we end up generating invalid IR in
> some cases, though, because of the semantics of replaceAllUsesWith.
> Do you have a testcase that breaks?
>
>   
The problem is replaceAllUsesWith asserts for type mismatch here. Try attached .bc with llvm-ld.

assert(New->getType() == getType() &&
        "replaceAllUses of value with new value of different type!");

Since stack is always on address space zero, I don't think that type of GV in a different address space is ever going to match.
The other way is to allow replaceAllUsesWith to ignore address spaces while comparing types. (do we have  a way to do that ?).
But then such an optimization may fail the entire idea of user wanting to place a variable into different memory space. The original idea of user might be to save on the stack space (data memory) and hence he asked the variable to be placed into different memory space (program memory). So the best bet here is to deny this optimization by checking

GV->getType()->getAddressSpace() == 0. 

llvm-svn: 73605
2009-06-17 06:47:15 +00:00
Chris Lattner
ee538a1431 make CreateFMul forward to CreateFMul, not CreateMul.
llvm-svn: 73603
2009-06-17 06:31:02 +00:00
Nick Lewycky
46f767dd67 Fix grammaro, and bad indentation.
llvm-svn: 73602
2009-06-17 04:23:52 +00:00
Mikhail Glushenkov
dd69113516 Fix comment.
llvm-svn: 73601
2009-06-17 03:10:10 +00:00
Mikhail Glushenkov
4afdb113a9 Formatting fix.
llvm-svn: 73600
2009-06-17 03:09:39 +00:00
Eli Friedman
36d7ca738e Correct an accidental duplication of the test (patch doesn't handle
creating new files very well).

llvm-svn: 73599
2009-06-17 03:05:00 +00:00
Eli Friedman
b3947071ff PR3439: Correct a silly mistake in the SimplifyDemandedUseBits code for
SRem.

llvm-svn: 73598
2009-06-17 02:57:36 +00:00
Mikhail Glushenkov
7f2af8872d Regenerate.
llvm-svn: 73597
2009-06-17 02:56:48 +00:00
Mikhail Glushenkov
b9a0c7b6dd Another small documentation update.
llvm-svn: 73596
2009-06-17 02:56:08 +00:00
Chris Lattner
90f1ab8c92 Use Doug's new LLVM_NATIVE_ARCH macro in config.h to link in the native
target so that the JIT works in LLI, not just the interpreter.

llvm-svn: 73595
2009-06-17 02:15:40 +00:00
Dan Gohman
473789f75a Fix ScalarEvolution's Xor handling to not assume that an And
that gets recognized with a SCEVZeroExtendExpr must be an And
with a low-bits mask. With r73540, this is no longer the case.

llvm-svn: 73594
2009-06-17 01:22:39 +00:00
Devang Patel
db78831eaa Do not use first actual instruction's location for prologue. The debug wants to skip prologue while setting a breakpoint for the function.
llvm-svn: 73592
2009-06-17 00:48:26 +00:00
Douglas Gregor
3e9d15410b Update auto-generated configuration files
llvm-svn: 73591
2009-06-17 00:43:20 +00:00
Douglas Gregor
9678705cc5 Define LLVM_NATIVE_ARCH in llvm/Config/config.h to be the LLVM back end that corresponds to the native executable, but only when that LLVM back end is being built
llvm-svn: 73590
2009-06-17 00:42:33 +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
b34766ddc8 Add locking around the accessors for AbstractTypeUsers.
llvm-svn: 73586
2009-06-17 00:12:30 +00:00
Chris Lattner
3c85f09f57 Remove support for building LLVM libraries into "relinked"
object files.  Now we always build LLVM libraries into archives (.a files).

This makes the 'make' build work more like the cmake build, among other
things.  Doing this exposed some latent circular library dependencies, so
I think that llvm-config wasn't quite right for .o files anyway.

llvm-svn: 73579
2009-06-16 23:00:42 +00:00