1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

20903 Commits

Author SHA1 Message Date
Gordon Henriksen
8430f1ff9a Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day

llvm-svn: 44760
2007-12-10 02:14:30 +00:00
Chris Lattner
11bc69b3c8 fix some warnings.
llvm-svn: 44756
2007-12-10 01:51:22 +00:00
Chris Lattner
3d939a50a5 Fix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-InlineAsm.ll
llvm-svn: 44755
2007-12-10 01:48:29 +00:00
Gordon Henriksen
a18a78e6e5 Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
llvm-svn: 44747
2007-12-09 22:46:10 +00:00
Chris Lattner
ac2bfb78d9 Duncan points out that the subtraction is unneeded since hte code
knows the vector is not pow2

llvm-svn: 44740
2007-12-09 17:56:34 +00:00
Chris Lattner
95f9743c43 Fix PR1782, patch by Wojtek Matyjewicz!
llvm-svn: 44733
2007-12-09 07:35:13 +00:00
Chris Lattner
84241dd771 Add support for splitting the operand of a return instruction.
llvm-svn: 44728
2007-12-09 00:06:19 +00:00
Bill Wendling
8d8d9a2f5e Reverting 44702. It wasn't correct to rename them.
llvm-svn: 44727
2007-12-08 23:58:46 +00:00
Chris Lattner
164d423f91 add many new cases to SplitResult. SplitResult now handles all the cases that LegalizeDAG does.
llvm-svn: 44726
2007-12-08 23:58:27 +00:00
Chris Lattner
6db5e91e16 Implement splitting support for store, allowing us to compile:
%f8 = type <8 x float>

define void @test_f8(%f8* %P, %f8* %Q, %f8* %S) {
	%p = load %f8* %P		; <%f8> [#uses=1]
	%q = load %f8* %Q		; <%f8> [#uses=1]
	%R = add %f8 %p, %q		; <%f8> [#uses=1]
	store %f8 %R, %f8* %S
	ret void
}

into:

_test_f8:
	movaps	16(%rdi), %xmm0
	addps	16(%rsi), %xmm0
	movaps	(%rdi), %xmm1
	addps	(%rsi), %xmm1
	movaps	%xmm0, 16(%rdx)
	movaps	%xmm1, (%rdx)
	ret

llvm-svn: 44725
2007-12-08 23:24:26 +00:00
Chris Lattner
b073361c3e implement vector splitting of load, undef, and binops.
llvm-svn: 44724
2007-12-08 23:08:49 +00:00
Chris Lattner
8942654140 implement some methods.
llvm-svn: 44723
2007-12-08 22:40:18 +00:00
Chris Lattner
cd7fc69c7c add scaffolding for splitting of vectors.
llvm-svn: 44722
2007-12-08 22:37:41 +00:00
Chris Lattner
92a284d220 Remove dead file and directory.
llvm-svn: 44720
2007-12-08 22:17:33 +00:00
Chris Lattner
558d101dbd reorganize header to separate into functional blocks.
llvm-svn: 44719
2007-12-08 21:59:32 +00:00
Chris Lattner
5e6bf4bc6f split scalarization out to its own file.
llvm-svn: 44718
2007-12-08 20:30:28 +00:00
Chris Lattner
b5925fda97 Split expansion out into its own file.
llvm-svn: 44717
2007-12-08 20:27:32 +00:00
Chris Lattner
633c76f607 Split promotion support out to its own file.
llvm-svn: 44716
2007-12-08 20:24:38 +00:00
Chris Lattner
39571d55bc Rename LegalizeDAGTypes.cpp -> LegalizeTypes.cpp
llvm-svn: 44715
2007-12-08 20:17:13 +00:00
Chris Lattner
424de81c2e Split the class definition of DAGTypeLegalizer out into a header.
Leave it visibility hidden, but not in an anon namespace.

llvm-svn: 44714
2007-12-08 20:16:06 +00:00
Chris Lattner
df7a006f45 add #include
llvm-svn: 44710
2007-12-08 19:03:30 +00:00
Chris Lattner
1fe38f35c1 proper #include order.
llvm-svn: 44707
2007-12-08 19:00:03 +00:00
Gordon Henriksen
e187dc4bfa Adding a StringPool data structure, which GC will use.
llvm-svn: 44705
2007-12-08 17:07:47 +00:00
Chris Lattner
12fca81026 aesthetic changes, no functionality change. Evan, it's not clear
what 'Available' is, please add a comment near it and rename it
if appropriate.

llvm-svn: 44703
2007-12-08 07:22:58 +00:00
Bill Wendling
d10837def7 Renaming:
isTriviallyReMaterializable -> hasNoSideEffects
  isReallyTriviallyReMaterializable -> isTriviallyReMaterializable

llvm-svn: 44702
2007-12-08 07:17:56 +00:00
Chris Lattner
e93a775a4d Fix a significant code quality regression I introduced on PPC64 quite
a while ago.  We now produce:

_foo:
	mflr r0
	std r0, 16(r1)
	ld r2, 16(r1)
	std r2, 0(r3)
	ld r0, 16(r1)
	mtlr r0
	blr 

instead of:

_foo:
	mflr r0
	std r0, 16(r1)
	lis r0, 0
	ori r0, r0, 16
	ldx r2, r1, r0
	std r2, 0(r3)
	ld r0, 16(r1)
	mtlr r0
	blr 

for:

void foo(void **X) {
  *X = __builtin_return_address(0);
}

on ppc64.

llvm-svn: 44701
2007-12-08 07:04:58 +00:00
Chris Lattner
e16166b78d implement __builtin_return_addr(0) on ppc.
llvm-svn: 44700
2007-12-08 06:59:59 +00:00
Chris Lattner
1024cda0bd refactor some code to avoid overloading the name 'usesLR' in
different places to mean different things.  Document what the
one in PPCFunctionInfo means and when it is valid.

llvm-svn: 44699
2007-12-08 06:39:11 +00:00
Bill Wendling
3c6bac9686 Incorporated comments from Evan and Chris:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056043.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056048.html

llvm-svn: 44696
2007-12-08 01:47:01 +00:00
Owen Anderson
e3de18ac1d Fix several cache coherence bugs in MemDep/GVN that were found. Also add some (disabled) debugging code
to make such problems easier to diagnose in the future, written by Duncan Sands.

llvm-svn: 44695
2007-12-08 01:37:09 +00:00
Evan Cheng
fdd03d0589 Doh
llvm-svn: 44694
2007-12-08 01:01:07 +00:00
Evan Cheng
28c2b7e647 Fix a compilation warning.
llvm-svn: 44692
2007-12-08 01:00:31 +00:00
Evan Cheng
6bfc0cadf3 Fix a compilation warning.
llvm-svn: 44691
2007-12-08 01:00:21 +00:00
Bill Wendling
c08dedb060 Initial commit of the machine code LICM pass. It successfully hoists this:
_foo:
        li r2, 0
LBB1_1: ; bb
        li r5, 0
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr 

to:

_foo:
        li r2, 0
        li r5, 0
LBB1_1: ; bb
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr

ZOMG!! :-)

Moar to come...

llvm-svn: 44687
2007-12-07 21:42:31 +00:00
Evan Cheng
c4db072c74 Add comment.
llvm-svn: 44686
2007-12-07 21:30:01 +00:00
Evan Cheng
34c7b35135 Much improved v8i16 shuffles. (Step 1).
llvm-svn: 44676
2007-12-07 08:07:39 +00:00
Evan Cheng
d9a07b1c9d Add an option to control this heuristic tweak so I can test it.
llvm-svn: 44671
2007-12-07 00:28:32 +00:00
Evan Cheng
4dc538449d Remove a bogus optimization. It's not possible to do a move to low element to a <8 x i16> or <16 x i8> vector.
llvm-svn: 44669
2007-12-06 22:14:22 +00:00
Dale Johannesen
80dd0c5141 Redo previous patch so optimization only done for i1.
Simpler and safer.

llvm-svn: 44663
2007-12-06 17:53:31 +00:00
Evan Cheng
d53f72dfb1 Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
llvm-svn: 44660
2007-12-06 08:54:31 +00:00
Chris Lattner
64a1a9f502 third time around: instead of disabling this completely,
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)

llvm-svn: 44658
2007-12-06 07:47:55 +00:00
Chris Lattner
bb5fb18af8 Actually, disable this code for now. More analysis and improvements to
the X86 backend are needed before this should be enabled by default.

llvm-svn: 44657
2007-12-06 07:44:31 +00:00
Chris Lattner
c467b49c96 implement a readme entry, compiling the code into:
_foo:
	movl	$12, %eax
	andl	4(%esp), %eax
	movl	_array(%eax), %eax
	ret

instead of:

_foo:
	movl	4(%esp), %eax
	shrl	$2, %eax
	andl	$3, %eax
	movl	_array(,%eax,4), %eax
	ret

As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:

-       movl    8(%eax), %eax
-       shll    $2, %eax
-       andl    $1020, %eax
-       movl    (%esi,%eax), %eax
+       movzbl  8(%eax), %eax
+       movl    (%esi,%eax,4), %eax


-       shll    $2, %edx
-       andl    $1020, %edx
-       movl    (%edi,%edx), %edx
+       andl    $255, %edx
+       movl    (%edi,%edx,4), %edx

Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:

-       andl    $85, %ebx
-       addl    _bit_count(,%ebx,4), %ebp
+       shll    $2, %ebx
+       andl    $340, %ebx
+       addl    _bit_count(%ebx), %ebp

llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner
861df2f4e9 simplify some code.
llvm-svn: 44655
2007-12-06 06:25:04 +00:00
Chris Lattner
91251d1337 implement the rest of the functionality from SelectionDAGLegalize::ScalarizeVectorOp
llvm-svn: 44654
2007-12-06 05:53:43 +00:00
Chuck Rose III
cdc572968c Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.
llvm-svn: 44651
2007-12-06 02:03:01 +00:00
Chris Lattner
1f2a96f9c1 move some ashr-specific code out of commonShiftTransforms into visitAShr.
llvm-svn: 44650
2007-12-06 01:59:46 +00:00
Dale Johannesen
8bc5d4be6a Fix PR1842.
llvm-svn: 44649
2007-12-06 01:43:46 +00:00
Chris Lattner
a7caf360c9 add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT.  This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.

llvm-svn: 44647
2007-12-06 01:34:04 +00:00
Chris Lattner
e297cb5408 simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup.

llvm-svn: 44646
2007-12-06 01:08:09 +00:00