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

47202 Commits

Author SHA1 Message Date
Chris Lattner
47e29d1422 Don't use int8_t, that requires DataTypes.h
llvm-svn: 73682
2009-06-18 04:56:53 +00:00
Owen Anderson
f71490c586 Fix build when disable thread support.
Patch by Howard Su.

llvm-svn: 73680
2009-06-18 04:44:46 +00:00
Zhongxing Xu
8b992b2a97 include header for uint8_t.
llvm-svn: 73675
2009-06-18 04:11:43 +00:00
Nick Lewycky
bd1de19b3f Add braces to clarify if/else structure and remove warning.
llvm-svn: 73673
2009-06-18 03:01:42 +00:00
Evan Cheng
82a8ab8a8e - Update register allocation hint after coalescing. This is done by the target since the hint is target dependent. This is important for ARM register pair hints.
- Register allocator should resolve the second part of the hint (register number) before passing it to the target since it knows virtual register to physical register mapping.
- More fixes to get ARM load / store double word working.

llvm-svn: 73671
2009-06-18 02:04:01 +00:00
Dale Johannesen
6bffdac70a It looks like nobody is working on PR 4158, so I'm
adding a check to catch this case at compile time
instead of quietly generating incorrect code.
That will at least let us identify CBE failures
that are not due to this problem.

llvm-svn: 73668
2009-06-18 01:07:23 +00:00
Dan Gohman
9b236593c3 Fix trailing whitespace from ScalarEvolution::print.
llvm-svn: 73666
2009-06-18 00:37:45 +00:00
Bob Wilson
1866500851 ARM unified syntax is not specific to ELF; use it for Darwin, too.
llvm-svn: 73665
2009-06-18 00:36:17 +00:00
Dan Gohman
e72fd546a2 Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.
If C is a single bit and the and gets analyzed as a truncate and
zero-extend, the xor can be represnted as an add.

llvm-svn: 73664
2009-06-18 00:00:20 +00:00
Dan Gohman
eb8d3f5fd5 Delete unnecessary braces.
llvm-svn: 73663
2009-06-17 23:54:37 +00:00
Owen Anderson
00e7ebbc38 Reapply r73647 in a non-broken form.
llvm-svn: 73662
2009-06-17 23:49:06 +00:00
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