1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

54519 Commits

Author SHA1 Message Date
Chris Lattner
2178a80b90 move DecomposeGEPExpression out into ValueTracking.cpp
llvm-svn: 89956
2009-11-26 17:12:50 +00:00
Chris Lattner
d86a693b70 teach GetLinearExpression to be a bit more aggressive.
llvm-svn: 89955
2009-11-26 17:00:01 +00:00
Chris Lattner
62a36a703c resolve a fixme. I haven't figured out how to write a testcase
to exercise this though.

llvm-svn: 89954
2009-11-26 16:52:32 +00:00
Chris Lattner
993cb8c911 update status of this. basicaa is much improved now,
only missing the one form (in this testcase).  Dan, do you
consider this example to be important?

llvm-svn: 89953
2009-11-26 16:42:00 +00:00
Chris Lattner
9c88c96b3f Teach basicaa that x|c == x+c when the c bits of x are clear. This
allows us to compile the example in readme.txt into:

LBB1_1:                                                     ## %bb
	movl	4(%rdx,%rax), %ecx
	movl	%ecx, %esi
	imull	(%rdx,%rax), %esi
	imull	%esi, %ecx
	movl	%esi, 8(%rdx,%rax)
	imull	%ecx, %esi
	movl	%ecx, 12(%rdx,%rax)
	movl	%esi, 16(%rdx,%rax)
	imull	%ecx, %esi
	movl	%esi, 20(%rdx,%rax)
	addq	$16, %rax
	cmpq	$4000, %rax
	jne	LBB1_1

instead of:

LBB1_1: 
	movl	(%rdx,%rax), %ecx
	imull	4(%rdx,%rax), %ecx
	movl	%ecx, 8(%rdx,%rax)
	imull	4(%rdx,%rax), %ecx
	movl	%ecx, 12(%rdx,%rax)
	imull	8(%rdx,%rax), %ecx
	movl	%ecx, 16(%rdx,%rax)
	imull	12(%rdx,%rax), %ecx
	movl	%ecx, 20(%rdx,%rax)
	addq	$16, %rax
	cmpq	$4000, %rax
	jne	LBB1_1

GCC (4.2) doesn't seem to be able to eliminate the loads in this 
testcase either, it generates:

L2:
	movl	(%rdx), %eax
	imull	4(%rdx), %eax
	movl	%eax, 8(%rdx)
	imull	4(%rdx), %eax
	movl	%eax, 12(%rdx)
	imull	8(%rdx), %eax
	movl	%eax, 16(%rdx)
	imull	12(%rdx), %eax
	movl	%eax, 20(%rdx)
	addl	$4, %ecx
	addq	$16, %rdx
	cmpl	$1002, %ecx
	jne	L2

llvm-svn: 89952
2009-11-26 16:26:43 +00:00
Chris Lattner
677b93d4c8 teach basicaa that A[i] != A[i+1].
llvm-svn: 89951
2009-11-26 16:18:10 +00:00
Chris Lattner
82257f0385 rename test
llvm-svn: 89950
2009-11-26 16:08:41 +00:00
Chris Lattner
69e59e50f3 Change the other half of aliasGEP (which handles GEP differencing) to use DecomposeGEPExpression. This dramatically simplifies and shrinks the code by eliminating the horrible CheckGEPInstructions method, fixes a miscompilation (@test3) and makes the code more aggressive. In particular, we now handle the @test4 case, which is reduced from the SmallPtrSet constructor. Missing this caused us to emit a variable length memset instead of a fixed size one.
llvm-svn: 89922
2009-11-26 02:17:34 +00:00
Chris Lattner
862a3532d6 add a new random feature test
llvm-svn: 89921
2009-11-26 02:16:28 +00:00
Chris Lattner
bd90980add Generalize DecomposeGEPExpression to exactly handle what Value::getUnderlyingObject does (when TD is around). This allows us to avoid calling DecomposeGEPExpression unless the ultimate alias check we care about passes, speedup up BasicAA a bit.
llvm-svn: 89920
2009-11-26 02:14:59 +00:00
Chris Lattner
57bca7101d Implement a new DecomposeGEPExpression method, which decomposes a GEP into a list of scaled offsets. Use this to eliminate some previous ad-hoc code which was subtly broken (it assumed all Constant*'s were non-zero, but strange constant express could be zero).
llvm-svn: 89915
2009-11-26 02:13:03 +00:00
Chris Lattner
260350330e Use GEPOperator more pervasively to simplify code.
llvm-svn: 89914
2009-11-26 02:11:08 +00:00
Chris Lattner
0b862edca3 update some notes slightly
llvm-svn: 89913
2009-11-26 01:51:18 +00:00
Chris Lattner
9646ffc9a2 remove some redundant braces
llvm-svn: 89912
2009-11-26 01:50:12 +00:00
Evan Cheng
dd352c2a81 Test for 89905.
llvm-svn: 89906
2009-11-26 00:35:01 +00:00
Evan Cheng
82b29e816e When all defs of a vr are implicit_def, delete all of the defs.
llvm-svn: 89905
2009-11-26 00:32:36 +00:00
Bob Wilson
de012efdba Split tail duplication into a separate pass. This is needed to avoid
running tail duplication when doing branch folding for if-conversion, and
we also want to be able to run tail duplication earlier to fix some
reg alloc problems.  Move the CanFallThrough function from BranchFolding
to MachineBasicBlock so that it can be shared by TailDuplication.

llvm-svn: 89904
2009-11-26 00:32:21 +00:00
Dale Johannesen
8f1aaa92b2 Test for llvm-gcc checkin 89898.
llvm-svn: 89899
2009-11-25 23:50:09 +00:00
Devang Patel
e26b5983d2 Update to reflect recent debugging information encoding changes.
llvm-svn: 89896
2009-11-25 23:28:01 +00:00
Viktor Kutuzov
c0799914a1 Rollback changes r89516: Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
llvm-svn: 89893
2009-11-25 22:44:18 +00:00
Evan Cheng
bdedf32e51 ProcessImplicitDefs should watch out for invalidated iterator and extra implicit operands on copies.
llvm-svn: 89880
2009-11-25 21:13:39 +00:00
Bob Wilson
b1cce5329e Tail duplicate indirect branches for PowerPC, too.
With the testcase for pr3120, the "threaded interpreter" runtime decreases
from 1788 to 1413 with this change.

llvm-svn: 89877
2009-11-25 19:57:14 +00:00
Benjamin Kramer
fbac37018a Avoid some possibly unsafe uses of StringRef::data().
llvm-svn: 89873
2009-11-25 18:26:09 +00:00
Devang Patel
d50fc13c19 Use StringRef (again) in DebugInfo interface.
llvm-svn: 89866
2009-11-25 17:36:49 +00:00
Bob Wilson
aee7a9e676 Based on the testcase for pr3120, running on my MacPro with Xeon processors,
it is definitely profitable to tail duplicate indirect branches for x86.
This is likely to be true to various degrees for all modern x86 processors.

llvm-svn: 89865
2009-11-25 17:27:53 +00:00
Bruno Cardoso Lopes
038281c523 Support PIC loading of constant pool entries
llvm-svn: 89863
2009-11-25 12:17:58 +00:00
Edward O'Callaghan
d2ec1dc6a1 Adjust comments to new semantics.
llvm-svn: 89862
2009-11-25 12:00:34 +00:00
Daniel Dunbar
ffe6484b7c Sketch structure for X86 disassembler.
llvm-svn: 89850
2009-11-25 06:53:08 +00:00
Edward O'Callaghan
43864a3136 API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
llvm-svn: 89848
2009-11-25 06:32:19 +00:00
Douglas Gregor
2cb3662a53 Perform explicit instantiations in the proper namespace, since Clang diagnoses this ill-formity.
llvm-svn: 89846
2009-11-25 06:04:18 +00:00
Edward O'Callaghan
4b197b8908 Reverting patch in revision 89758, initial attempt at fixing PR5373 has proven to be bogus.
llvm-svn: 89844
2009-11-25 05:38:41 +00:00
Daniel Dunbar
7f52922e77 Add the rest of the build system logic for optional target disassemblers
llvm-svn: 89841
2009-11-25 04:46:58 +00:00
Daniel Dunbar
01760300f8 Regenerate configure
llvm-svn: 89840
2009-11-25 04:37:28 +00:00
Daniel Dunbar
b3a0b9b025 Add CMake and configure logic to create llvm/Config/Disassemblers.defs.
llvm-svn: 89839
2009-11-25 04:30:13 +00:00
Daniel Dunbar
43465889de Sketch TableGen disassembler emitter, based on patch by Sean Callanan.
llvm-svn: 89833
2009-11-25 02:13:23 +00:00
Bruno Cardoso Lopes
974ab18d0e Use endianess dependent offsets for load/store of doubles when
using two swc/lwc instead of sdc/ldc.

llvm-svn: 89826
2009-11-25 01:05:25 +00:00
Dale Johannesen
916d90c926 Fix compiler warnings.
llvm-svn: 89824
2009-11-25 00:58:21 +00:00
Bruno Cardoso Lopes
6d23fc8097 Only include in the callee saved regs the sub registers to avoid
unnecessary save/restore.

llvm-svn: 89823
2009-11-25 00:47:43 +00:00
Bruno Cardoso Lopes
7316c984a5 Add proper emission of load/store double to stack slots for mips1 targets!
llvm-svn: 89821
2009-11-25 00:36:00 +00:00
Devang Patel
4c7b5eaf23 Revert r89803.
llvm-svn: 89819
2009-11-25 00:31:13 +00:00
Bob Wilson
c5fa56c805 Refactor target hook for tail duplication as requested by Chris.
Make tail duplication of indirect branches much more aggressive (for targets
that indicate that it is profitable), based on further experience with
this transformation.  I compiled 3 large applications with and without
this more aggressive tail duplication and measured minimal changes in code
size.  ("size" on Darwin seems to round the text size up to the nearest
page boundary, so I can only say that any code size increase was less than
one 4k page.) Radar 7421267.

llvm-svn: 89814
2009-11-24 23:35:49 +00:00
Dale Johannesen
5809ff0e58 Do not store R31 into the caller's link area on PPC.
This violates the ABI (that area is "reserved"), and
while it is safe if all code is generated with current
compilers, there is some very old code around that uses
that slot for something else, and breaks if it is stored
into.  Adjust testcases looking for current behavior.
I've verified that the stack frame size is right in all
testcases, whether it changed or not.  7311323.

llvm-svn: 89811
2009-11-24 22:59:02 +00:00
Devang Patel
c68c2293a7 Enable debug info for ppc-darwin.
llvm-svn: 89803
2009-11-24 21:38:54 +00:00
Devang Patel
f01ac414c5 Use StringRef instead of std::string in DIEString.
llvm-svn: 89793
2009-11-24 19:42:17 +00:00
Devang Patel
9cd7c1ab8e Remove DebugLabelFolder pass. It is not used by dwarf writer anymore.
llvm-svn: 89790
2009-11-24 19:37:07 +00:00
Devang Patel
d7b0871621 Swith to pubtypes section before emitting pub types.
llvm-svn: 89787
2009-11-24 19:18:41 +00:00
Daniel Dunbar
740136a956 Remove bogus error handling code.
llvm-svn: 89786
2009-11-24 19:03:33 +00:00
Edward O'Callaghan
fbaf414cc7 Fix comments as pre-post review for rev.89765.
llvm-svn: 89770
2009-11-24 16:29:23 +00:00
Edward O'Callaghan
69ba53657a Provide Path::isSpecialFile interface for PR5568.
llvm-svn: 89765
2009-11-24 15:19:10 +00:00
Edward O'Callaghan
8c1cd4fdbc Fix for PR5373, Credit to Jakub Staszak.
llvm-svn: 89758
2009-11-24 11:51:52 +00:00