Commit Graph

20956 Commits

Author SHA1 Message Date
Evan Cheng
779ccea5b6 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44686 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07 21:30:01 +00:00
Evan Cheng
8a86c3f3ae Much improved v8i16 shuffles. (Step 1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44676 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07 08:07:39 +00:00
Evan Cheng
dfb1561434 Add an option to control this heuristic tweak so I can test it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44671 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07 00:28:32 +00:00
Evan Cheng
1076210ee3 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44669 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 22:14:22 +00:00
Dale Johannesen
e0e6fac5e9 Redo previous patch so optimization only done for i1.
Simpler and safer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 17:53:31 +00:00
Evan Cheng
33faddc35d Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 08:54:31 +00:00
Chris Lattner
d3fd6d2b25 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. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 07:47:55 +00:00
Chris Lattner
e00cbad78d Actually, disable this code for now. More analysis and improvements to
the X86 backend are needed before this should be enabled by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44657 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 07:44:31 +00:00
Chris Lattner
e70da20f9a 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 07:33:36 +00:00
Chris Lattner
c95ba44b30 simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 06:25:04 +00:00
Chris Lattner
72b2df1f77 implement the rest of the functionality from SelectionDAGLegalize::ScalarizeVectorOp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44654 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 05:53:43 +00:00
Chuck Rose III
3012ac63d3 Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44651 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 02:03:01 +00:00
Chris Lattner
348f665ee2 move some ashr-specific code out of commonShiftTransforms into visitAShr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 01:59:46 +00:00
Dale Johannesen
59f1e97ef3 Fix PR1842.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 01:43:46 +00:00
Chris Lattner
34c9433004 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44647 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 01:34:04 +00:00
Chris Lattner
9f2f142d25 simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44646 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 01:08:09 +00:00
Evan Cheng
5ef3a04b54 Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 00:01:56 +00:00
Evan Cheng
bdcb726fca If both result of the {s|z}xt and its source are live out, rewrite all uses of the source with result of extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 23:58:20 +00:00
Chris Lattner
8907b4ba47 split the JIT memory management code out from the main JIT logic into its
own JITMemoryManager interface.  There is no functionality change with 
this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44640 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 23:39:57 +00:00
Chris Lattner
81f2d71d52 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 23:05:06 +00:00
Chris Lattner
7d13015e32 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44637 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 22:58:19 +00:00
Scott Michel
42aa501491 Minor updates:
- Fix typo in SPUCallingConv.td
- Credit myself for CellSPU work
- Add CellSPU to 'all' host target list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44627 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 21:23:16 +00:00
Duncan Sands
5d84afdc83 Commit 44487 broke bootstrap of llvm-gcc-4.2. It is
not yet clear why, but in the meantime work around the
problem by making less use of readnone/readonly info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44626 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 21:03:28 +00:00
Evan Cheng
8c24e74b02 Added canFoldMemoryOperand for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44623 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 18:41:29 +00:00
Evan Cheng
7db2811f6e Update foldMemoryOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44621 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 18:36:37 +00:00
Chris Lattner
4d321c55c4 fix warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44620 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 18:32:18 +00:00
Chris Lattner
58dd8568ee allow this to build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44619 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 18:30:11 +00:00
Neil Booth
cc2335968f Prior commit updated wrong if, apologies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44614 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 13:06:04 +00:00
Neil Booth
a89e45f754 Handle zero correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44613 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 13:01:24 +00:00
Evan Cheng
d120ffd26f MachineInstr can change. Store indexes instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44612 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 10:24:35 +00:00
Evan Cheng
adf8590690 If a split live interval is spilled again, remove the kill marker on its last use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44611 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 09:51:10 +00:00
Evan Cheng
f38d14f03e Clobber more bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44610 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 09:05:34 +00:00
Evan Cheng
b50bb8cf19 Fix kill info for split intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44609 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 08:16:32 +00:00
Chris Lattner
60fb5ecccc more scalarization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44608 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 07:45:02 +00:00
Chris Lattner
d36db029c8 scalarize vector binops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44607 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 07:36:58 +00:00
Evan Cheng
018f9b020b - Mark last use of a split interval as kill instead of letting spiller track it.
This allows an important optimization to be re-enabled.
- If all uses / defs of a split interval can be folded, give the interval a
  low spill weight so it would not be picked in case spilling is needed (avoid
  pushing other intervals in the same BB to be spilled).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44601 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 03:22:34 +00:00
Evan Cheng
d64b5c82b9 Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether
the stored register is killed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44600 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 03:14:33 +00:00
Scott Michel
b216a1b0b9 More stuff for CellSPU -- this should be enough to get an error-free
compilation (no files missing). Test cases remain to be checked in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44598 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 02:01:41 +00:00
Scott Michel
2466c3766d Updated source file headers to llvm coding standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 01:40:25 +00:00
Scott Michel
67d5755d69 Two missing files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44596 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 01:31:18 +00:00
Scott Michel
564427eabd Main CellSPU backend files checked in. Intrinsics and autoconf files
remain.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44595 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 01:24:05 +00:00
Dale Johannesen
db1e30272c Handle 0 correctly in string->APFloat conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44594 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05 01:10:19 +00:00
Evan Cheng
dd86ce3d57 Remove a unsafe optimization. This fixes 401.bzip2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44587 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 23:57:55 +00:00
Scott Michel
6637752998 More files in the CellSPU drop...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44584 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 22:35:58 +00:00
Scott Michel
266bc8f777 More of the Cell SPU code drop from "Team Aerospace".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44582 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 22:23:35 +00:00
Evan Cheng
35a3e4abb9 Spiller unfold optimization bug: do not clobber a reusable stack slot value unless it can be modified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44575 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 19:19:45 +00:00
Chris Lattner
eb1819d1e5 Implement framework for scalarizing node results. This is sufficient
to codegen this:

define float @test_extract_elt(<1 x float> * %P) {
	%p = load <1 x float>* %P
	%R = extractelement <1 x float> %p, i32 0
	ret float %R
}




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44570 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 07:48:46 +00:00
Chris Lattner
13c207b5c8 start providing framework for scalarizing vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44569 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 07:29:51 +00:00
Evan Cheng
597d10d84f Discard split intervals made empty due to folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44565 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04 00:32:23 +00:00
Scott Michel
a589a08c91 More CellSPU files... more to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44559 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03 23:14:43 +00:00