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

168 Commits

Author SHA1 Message Date
Duncan Sands
4ef1119d94 Partially address a README by having functionattrs consider calls to
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.

llvm-svn: 92829
2010-01-06 08:45:52 +00:00
Chris Lattner
ce3f5f3448 implement an instcombine xform needed by clang's codegen
on the example in PR4216.  This doesn't trigger in the testsuite,
so I'd really appreciate someone scrutinizing the logic for
correctness.

llvm-svn: 92458
2010-01-04 06:03:59 +00:00
Chris Lattner
44298d184a Teach codegen to lower llvm.powi to an efficient (but not optimal)
multiply sequence when the power is a constant integer.  Before, our
codegen for std::pow(.., int) always turned into a libcall, which was
really inefficient.

This should also make many gfortran programs happier I'd imagine.

llvm-svn: 92388
2010-01-01 03:32:16 +00:00
Chris Lattner
0ea2e3d444 update this. To take the next step, llvm.powi should be generalized to work
on integers as well and codegen should lower them to branch trees.

llvm-svn: 92382
2010-01-01 01:29:26 +00:00
Eli Friedman
392adbdd7d More info on this transformation.
llvm-svn: 91230
2009-12-12 23:23:43 +00:00
Eli Friedman
38a7d3b32e Remove some stuff that's already implemented. Also, remove the note about
merging x >u 5 and x <s 20 because it's impossible to implement.

llvm-svn: 91228
2009-12-12 21:41:48 +00:00
Chris Lattner
b46655e25c expand note.
llvm-svn: 90429
2009-12-03 07:43:46 +00:00
Chris Lattner
6b86618a2b add a note
llvm-svn: 90428
2009-12-03 07:41:54 +00:00
Chris Lattner
40d74cea6b update and consolidate the load pre notes.
llvm-svn: 90050
2009-11-29 02:19:52 +00:00
Chris Lattner
0df78ea645 add a deadargelim note.
llvm-svn: 90009
2009-11-27 17:12:30 +00:00
Chris Lattner
c0b92ff385 This testcase is actually only partially redundant, and requires
the FIXME I added yesterday to be implemented.

llvm-svn: 90008
2009-11-27 16:53:57 +00:00
Chris Lattner
225a88f4ab this (and probably several others) are now done.
llvm-svn: 89982
2009-11-27 00:35:04 +00:00
Chris Lattner
4824ebfded Teach memdep to phi translate bitcasts. This allows us to compile
the example in GCC PR16799 to:

LBB1_2:                                                     ## %bb1
	movl	%eax, %eax
	subq	%rax, %rdi
	movq	%rdi, (%rcx)
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB1_2

instead of:

LBB1_2:                                                     ## %bb1
	movl	(%rdi), %ecx
	subq	%rcx, %rdi
	movq	%rdi, (%rax)
	cmpl	$0, (%rdi)
	je	LBB1_2

llvm-svn: 89978
2009-11-26 23:41:07 +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
0b862edca3 update some notes slightly
llvm-svn: 89913
2009-11-26 01:51:18 +00:00
Nick Lewycky
b73208f294 Add a complex missed optimization opportunity I came across while investigating
bug 5438.

llvm-svn: 88855
2009-11-15 17:51:23 +00:00
Chris Lattner
0dd2fe1e1e another const prop failure.
llvm-svn: 86848
2009-11-11 17:54:02 +00:00
Chris Lattner
20da198cb6 add a note
llvm-svn: 86847
2009-11-11 17:51:27 +00:00
Chris Lattner
bc9996444e add a note
llvm-svn: 86756
2009-11-10 23:47:45 +00:00
Chris Lattner
67aac80393 I did this a week or two ago
llvm-svn: 86754
2009-11-10 23:40:49 +00:00
Nick Lewycky
2b3ac2b1a7 Improve tail call elimination to handle the switch statement.
llvm-svn: 86403
2009-11-07 21:10:15 +00:00
Chris Lattner
7f61fbfcca add a note from PR5313
llvm-svn: 86146
2009-11-05 18:19:19 +00:00
Bill Wendling
8f96a88125 Add new note.
llvm-svn: 85341
2009-10-27 23:30:07 +00:00
Bill Wendling
cb9a2f20d5 Move and clarify note.
llvm-svn: 85334
2009-10-27 22:48:31 +00:00
Chris Lattner
81c06b943c this is done.
llvm-svn: 85041
2009-10-25 06:17:51 +00:00
Chris Lattner
d1dbcae98f some stuff is done, we still have constantexpr simplification to do.
llvm-svn: 84943
2009-10-23 07:00:55 +00:00
Chris Lattner
2363ec8194 IPSCCP is missing stuff.
llvm-svn: 84725
2009-10-21 01:10:37 +00:00
Chris Lattner
d24ead5c1e add a note
llvm-svn: 82442
2009-09-21 06:04:07 +00:00
Chris Lattner
64e3a9984b one case handled, expanded another testcase inline.
llvm-svn: 82427
2009-09-21 02:53:57 +00:00
Chris Lattner
5963cbb9c9 update an entry, delete an entry which has been fixed.
llvm-svn: 82398
2009-09-20 17:37:38 +00:00
Nick Lewycky
ecb17d4648 Peer through zext and sext to eliminate them when it is safe to do so.
llvm-svn: 82389
2009-09-20 07:31:25 +00:00
Chris Lattner
444c69afae add PR#
llvm-svn: 81770
2009-09-14 16:49:26 +00:00
Dan Gohman
00ee3a9a1a Transform -X/C to X/-C, implementing a README.txt entry.
llvm-svn: 78812
2009-08-12 16:37:02 +00:00
Eli Friedman
a62553ec99 Remove a couple of already-implemented notes.
llvm-svn: 76631
2009-07-21 20:05:43 +00:00
Nick Lewycky
d18c73933e Move PR4517 to README.txt.
llvm-svn: 75098
2009-07-09 04:03:30 +00:00
Dan Gohman
d13f674130 Factor the code for collecting IV users out of LSR into an IVUsers class,
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.

This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.

Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.

llvm-svn: 71535
2009-05-12 02:17:14 +00:00
Dan Gohman
2060db5db5 Fix two wording errors that Duncan spotted.
llvm-svn: 71459
2009-05-11 18:51:16 +00:00
Dan Gohman
361dcef406 LLVM has unaligned loads and stores now.
llvm-svn: 71449
2009-05-11 18:06:05 +00:00
Dan Gohman
d365c7a5a3 Upgrade this example to new-style syntax.
llvm-svn: 71447
2009-05-11 18:04:52 +00:00
Chris Lattner
f5f153394d remove some done things: we have nocapture and SROA is smarter.
llvm-svn: 71443
2009-05-11 17:41:40 +00:00
Chris Lattner
d50058b0c0 add a note
llvm-svn: 71442
2009-05-11 17:36:33 +00:00
Eli Friedman
69845a85a5 Remove a completed optimization. Add a potential optimization I ran
into.

llvm-svn: 71352
2009-05-09 08:40:15 +00:00
Chris Lattner
9b435e06e4 add a note
llvm-svn: 67953
2009-03-28 19:26:55 +00:00
Nick Lewycky
8672fb675c Add a totally synthetic situation I came up with while looking at a bug in
related code.

llvm-svn: 65437
2009-02-25 06:52:48 +00:00
Torok Edwin
b399b47942 add note about sin
llvm-svn: 65137
2009-02-20 18:42:06 +00:00
Torok Edwin
6dd79be128 add note about possible GEP improvement with fields of size 0.
llvm-svn: 62925
2009-01-24 19:30:25 +00:00
Chris Lattner
fcf56e7fbe add a note
llvm-svn: 62760
2009-01-22 07:16:03 +00:00
Dan Gohman
7663e08915 Add a README entry noticed while investigating PR3216.
llvm-svn: 62558
2009-01-20 01:07:33 +00:00
Chris Lattner
fe3e114d7a add some more crazy strlen and memcpy stuff I noticed in spec.
llvm-svn: 61918
2009-01-08 07:34:55 +00:00