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

49101 Commits

Author SHA1 Message Date
Evan Cheng
f6b88eae82 Fix up ARM constant island pass for Thumb2.
Also fixed up code to fully use the SoImm field for ADR on ARM mode.

llvm-svn: 76890
2009-07-23 18:27:47 +00:00
Evan Cheng
8997f6bfc1 Since we have moved unified assembly, switch to ADR instruction instead of a the difficult-to-read .set + add syntax to materialize pc-relative address.
Turns out this also fixed a poor code selection on Thumb1. I have no idea why we were using a mov + add to do the same thing as ADR before.

llvm-svn: 76889
2009-07-23 18:26:03 +00:00
Daniel Dunbar
b5adc13728 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.

llvm-svn: 76888
2009-07-23 18:17:34 +00:00
David Goodwin
f3c839e0b9 Fix frame index elimination to correctly handle thumb-2 addressing modes that don't allow negative offsets. During frame elimination convert *i12 opcode to a *i8 when necessary due to a negative offset.
llvm-svn: 76883
2009-07-23 17:06:46 +00:00
Andreas Bolka
fa70ad653b FileCheck'ize and expand LDA testcases.
llvm-svn: 76880
2009-07-23 15:56:53 +00:00
Andrew Lenharth
68bb9003af emit simple node was using different labels for fields than the rest of the graph writter
llvm-svn: 76879
2009-07-23 15:24:38 +00:00
Andreas Bolka
f0462da445 Cache dependence computation using FoldingSet.
This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.

llvm-svn: 76877
2009-07-23 14:32:46 +00:00
Evan Cheng
c21e149091 80 col violation.
llvm-svn: 76872
2009-07-23 07:58:08 +00:00
Chris Lattner
d9b9012f9b enhance DepthFirstIterator to support more robust operations in the face
of code mutating the graph while it is being traversed.  Patch by 
Olaf Krzikalla!

llvm-svn: 76869
2009-07-23 06:30:28 +00:00
Chris Lattner
4c55a88118 testcase for PR4590
llvm-svn: 76868
2009-07-23 06:07:59 +00:00
Chris Lattner
2ed4453d0e refactor a blob of code out to a new 'FoldOrOfFCmps' function and
simplify it.

llvm-svn: 76866
2009-07-23 05:46:22 +00:00
Lang Hames
85f4012739 For real this time: PHI Def & Kill tracking added to PHIElimination.
llvm-svn: 76865
2009-07-23 05:44:24 +00:00
Chris Lattner
0426853d67 merge vector-casts-0.ll into vector-casts.ll
llvm-svn: 76864
2009-07-23 05:33:39 +00:00
Chris Lattner
c687344f0c Make some existing optimizations that would only trigger on scalars
also apply to vectors.  This allows us to compile this:

#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }

to:

_a:
	cmpordps	%xmm1, %xmm0
	ret
_b:
	cmpunordps	%xmm1, %xmm0
	ret

with clang instead of to a ton of horrible code.

llvm-svn: 76863
2009-07-23 05:32:17 +00:00
Chris Lattner
f4474da353 convert a test to filecheck format. This fixes an endemic problem
with negative tests: this test wasn't checking what it thought it was
because it was grepping .bc, not .ll.

llvm-svn: 76861
2009-07-23 05:27:48 +00:00
Chris Lattner
7061a4300d rename test
llvm-svn: 76860
2009-07-23 05:25:12 +00:00
Chris Lattner
af6fdef894 refactor a bunch of code out into a helper function,
no functionality change.

llvm-svn: 76859
2009-07-23 05:14:02 +00:00
Chris Lattner
4fb5fa5156 remove a really old and dead header
llvm-svn: 76855
2009-07-23 04:59:02 +00:00
Chris Lattner
7fd20e69f1 merge one more sse41 test into sse41.ll
llvm-svn: 76853
2009-07-23 04:49:39 +00:00
Chris Lattner
efe5b9aaf8 merge another sse41 test into sse41.ll
llvm-svn: 76852
2009-07-23 04:43:48 +00:00
Chris Lattner
c59ca858c8 merge sse41-pmovx.ll into sse41.ll
llvm-svn: 76850
2009-07-23 04:39:09 +00:00
Lang Hames
1716e28365 Added PHI Def & Kill tracking to PHIElimination pass.
llvm-svn: 76849
2009-07-23 04:34:03 +00:00
Chris Lattner
313c95ea84 change a test to run in filecheck style. Rename it to be a general
dumping ground of various SSE4.1 tests, since filecheck can reasonably
handle them all in one file.  Generalize it to check x86-64 stuff as
well since it has a different ABI (a convenient way to test both the 
reg and mem forms of these instructions).

llvm-svn: 76848
2009-07-23 04:33:02 +00:00
Eric Christopher
c9299d5756 Support insertps via the intrinsic and add a couple of simple
testcases to make sure it's being generated.

llvm-svn: 76843
2009-07-23 02:22:41 +00:00
Sanjiv Gupta
d62bebab22 Do not call getMangledName on Intrinsics.
llvm-svn: 76842
2009-07-23 02:11:04 +00:00
Devang Patel
45ce5c2ac1 MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.

llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Eric Christopher
36eeebc1c4 Add test for pinsrd and pinsrb instructions.
llvm-svn: 76840
2009-07-23 01:58:04 +00:00
Andreas Bolka
b33d956e21 Minor cosmetics: indentation, formatting, naming.
llvm-svn: 76839
2009-07-23 01:57:06 +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
Zhongxing Xu
cd7c9007d1 add header for 'memset'.
llvm-svn: 76837
2009-07-23 01:38:47 +00:00
Devang Patel
63cece4454 Silence "uninitialized use" warning.
llvm-svn: 76836
2009-07-23 01:36:16 +00:00
Devang Patel
a682c04744 Hide constructors.
llvm-svn: 76835
2009-07-23 01:19:53 +00:00
Devang Patel
6b2162686a Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Eric Christopher
973fc2d7ab Fix error message for correct opcode.
llvm-svn: 76829
2009-07-23 01:01:32 +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
Reid Kleckner
4c892c05ec Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
malloc, so there should be no functional changes to other code.

These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.

I also added some tests which helped me pinpoint some bugs.

llvm-svn: 76825
2009-07-23 00:30:41 +00:00
Dan Gohman
0a0d23a081 Revert r75663 (and r76805), as it is causing regressions on powerpc.
llvm-svn: 76823
2009-07-23 00:09:46 +00:00
Chris Lattner
a3b58f4ecd remove SectionFlags::Small: it is only used on Xcore, and we'll find
a better solution for it in the future.

llvm-svn: 76818
2009-07-22 23:27:22 +00:00
Dan Gohman
840e7f252e x86 isel tweak: use lea (%reg,%reg) instead of lea (,%reg,2).
llvm-svn: 76817
2009-07-22 23:26:55 +00:00
Dan Gohman
b54d8949bd Add new keywords to the vim syntax highlighting.
llvm-svn: 76812
2009-07-22 22:45:50 +00:00
Dan Gohman
2332bfc988 Add new optimization keywords to the polygen grammar.
llvm-svn: 76811
2009-07-22 22:45:30 +00:00
Dan Gohman
001d777207 Rename the new unsigned and signed keywords to nuw and nsw,
which stand for no-unsigned-wrap and no-signed-wrap.

llvm-svn: 76810
2009-07-22 22:44:56 +00:00
David Greene
d1f9f45b05 Reorder if-else branches as suggested by Bill.
llvm-svn: 76808
2009-07-22 22:32:19 +00:00
David Goodwin
6fa63db9be Fix typo in addrmode definition.
llvm-svn: 76806
2009-07-22 22:24:31 +00:00
Dan Gohman
f1103cf95b Add -march=ppc32 lines so that this test doesn't ever default to ppc64.
llvm-svn: 76805
2009-07-22 22:08:31 +00:00
Evan Cheng
4a77f28c47 Use getTargetConstant instead of getConstant since it's meant as an constant operand.
llvm-svn: 76803
2009-07-22 22:03:29 +00:00
Dan Gohman
8b7a539e80 Make the grep line in this test more specific, to avoid
unintended matches.

llvm-svn: 76802
2009-07-22 22:02:42 +00:00
David Greene
fede97eac6 Constify the key in Mi2IndexMap.
llvm-svn: 76801
2009-07-22 21:56:14 +00:00
Evan Cheng
88dbc00ca7 Ignore undef uses.
llvm-svn: 76799
2009-07-22 21:51:42 +00:00
Daniel Dunbar
3119e6a609 Switch some clients to Value::getName(), and other getName() user
simplification.
 - NFC

llvm-svn: 76789
2009-07-22 21:33:09 +00:00