Commit Graph

64292 Commits

Author SHA1 Message Date
Dan Gohman
c9fa2cd596 Delete an unused declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 14:48:15 +00:00
Kalle Raiskila
bd887df8b9 Fix lowering of INSERT_VECTOR_ELT in SPU.
The IDX was treated as byte index, not element index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 12:41:50 +00:00
Bill Wendling
10ce7f3116 Fix whitespaces. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 11:31:07 +00:00
Chris Lattner
8bfc4299c2 Stop explicitly scheduling domfrontier before the loop passes,
since none of them use it.  With this, we now only run 
domfrontier (an N^2 analysis) 3 times at clang -O3: once for 
"early" per-function cleanup, once at the start of the
per-function pipeline to support SRoA, and once late because
the EHPrepare class uses it.

EHPrepare needs to stop using it, this is silly and wasteful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 07:05:51 +00:00
Chris Lattner
e418ac832c licm preserves the cfg, it doesn't have to explicitly say it
preserves domfrontier.  It does preserve AA though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 07:02:56 +00:00
Chris Lattner
44e2bd31f1 now that it doesn't use the PromoteMemToReg function, LICM doesn't
require DomFrontier.  Dropping this doesn't actually save any runs
of the pass though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 06:49:44 +00:00
Chris Lattner
e488064922 completely rewrite the memory promotion algorithm in LICM.
Among other things, this uses SSAUpdater instead of 
PromoteMemToReg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 06:43:52 +00:00
Bob Wilson
04d6c289ab Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvm
IR add/sub operations with one or both operands sign- or zero-extended.
Auto-upgrade the old intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 05:57:34 +00:00
Chris Lattner
63a75c13b1 use getUniqueExitBlocks instead of a manual set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 05:12:21 +00:00
Eli Friedman
5033f64694 A couple of small missed optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 05:07:40 +00:00
Chris Lattner
a6a36f59b4 reimplement LICM::sink to use SSAUpdater instead of PromoteMemToReg.
This leads to much simpler code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:55:06 +00:00
Chris Lattner
ffd9beefb8 implement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:54:06 +00:00
Chris Lattner
abd2a75900 remove dead proto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:53:24 +00:00
Chris Lattner
d7bc19dfee reduce indentation in LICM::sink by using early exits, use
getUniqueExitBlocks instead of getExitBlocks and a manual
set to eliminate dupes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112405 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:28:20 +00:00
Chris Lattner
dc1ceb370a modernize this pass a bit: use efficient set/map and reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112404 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:23:04 +00:00
Duncan Sands
6654ff2741 Flesh out the list of things I've worked on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112403 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:22:35 +00:00
Chris Lattner
fedac7d9b0 when merging two alias sets, the result set is volatile if either
of the sets is volatile.  We were dropping the volatile bit of the
merged in set, leading (luckily) to assertions in cases like 
PR7535.  I cannot produce a testcase that repros with opt, but this
is obviously correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112402 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:14:47 +00:00
Chris Lattner
9476d746d6 more cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112401 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:13:43 +00:00
Chris Lattner
6e1f51099d clean this up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 04:06:55 +00:00
Bill Wendling
1f7bf0e1f5 - Add a parameter to T2I_bin_irs for those patterns which set the S bit.
- Create T2I_bin_sw_irs to be like T2I_bin_w_irs, but that it sets the S bit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:55:31 +00:00
Chris Lattner
82457d08f9 merge a bunch of shuffle tests into sse2.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:19:04 +00:00
Chris Lattner
4644a936dc add a bunch more common shuffles to the instprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:08:08 +00:00
Chris Lattner
c19b9477c9 add some nounwind's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:07:47 +00:00
Bill Wendling
2c4b30ebca Name ANDflag to ANDS, which is less stupid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:06:09 +00:00
Bill Wendling
ac3b935362 File missing from last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:02:28 +00:00
Bill Wendling
0b4aa7d11b Create an ARMISD::AND node. This node is exactly like the "ARM::AND" node, but
it sets the CPSR register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 03:02:11 +00:00
NAKAMURA Takumi
fedb34665a Minor change.
This is test for git svn dcommit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112389 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 21:12:51 +00:00
Chris Lattner
6aa928d57a I have manually decoded the imm field of an insertps one too many
times.  This patch causes llc and llvm-mc (which both default to
verbose-asm) to print out comments after a few common shuffle 
instructions which indicates the shuffle mask, e.g.:

	insertps	$113, %xmm3, %xmm0     ## xmm0 = zero,xmm0[1,2],xmm3[1]
	unpcklps	%xmm1, %xmm0    ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
	pshufd	$1, %xmm1, %xmm1        ## xmm1 = xmm1[1,0,0,0]

This is carefully factored to keep the information extraction (of the
shuffle mask) separate from the printing logic.  I plan to move the
extraction part out somewhere else at some point for other parts of
the x86 backend that want to introspect on the behavior of shuffles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 20:42:31 +00:00
Chris Lattner
a5729aae5d fixme accomplished
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 20:40:28 +00:00
Chris Lattner
9a7346ca7e tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 20:34:35 +00:00
NAKAMURA Takumi
48026f56e6 Add me to the "blame list"!
And it is my 1st test commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 20:24:43 +00:00
Dan Gohman
245ae51dce Remove obsolete keywords which are no longer relevant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 20:14:05 +00:00
Dan Gohman
04a7858241 Remove unions from the vim syntax highlighting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 20:11:28 +00:00
Chris Lattner
24faf611a3 fix the buildvector->insertp[sd] logic to not always create a redundant
insertp[sd] $0, which is a noop.  Before:

_f32:                                   ## @f32
	pshufd	$1, %xmm1, %xmm2
	pshufd	$1, %xmm0, %xmm3
	addss	%xmm2, %xmm3
	addss	%xmm1, %xmm0
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
	insertps	$0, %xmm0, %xmm0
	insertps	$16, %xmm3, %xmm0
	ret

after:

_f32:                                   ## @f32
	movdqa	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	pshufd	$1, %xmm1, %xmm1
	pshufd	$1, %xmm0, %xmm3
	addss	%xmm1, %xmm3
	movdqa	%xmm2, %xmm0
	insertps	$16, %xmm3, %xmm0
	ret

The extra movs are due to a random (poor) scheduling decision.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 17:59:08 +00:00
Chris Lattner
3ddcc43040 fix the BuildVector -> unpcklps logic to not do pointless shuffles
when the top elements of a vector are undefined.  This happens all
the time for X86-64 ABI stuff because only the low 2 elements of
a 4 element vector are defined.  For example, on:

_Complex float f32(_Complex float A, _Complex float B) {
  return A+B;
}

We used to produce (with SSE2, SSE4.1+ uses insertps):

_f32:                                   ## @f32
	movdqa	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	pshufd	$16, %xmm2, %xmm2
	pshufd	$1, %xmm1, %xmm1
	pshufd	$1, %xmm0, %xmm0
	addss	%xmm1, %xmm0
	pshufd	$16, %xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	unpcklps	%xmm1, %xmm0
	ret

We now produce:

_f32:                                   ## @f32
	movdqa	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	pshufd	$1, %xmm1, %xmm1
	pshufd	$1, %xmm0, %xmm3
	addss	%xmm1, %xmm3
	movaps	%xmm2, %xmm0
	unpcklps	%xmm3, %xmm0
	ret

This implements rdar://8368414


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 17:28:30 +00:00
Chris Lattner
6e80e44926 improve comments in the unpcklps generating logic, introduce
a new EltStride variable instead of reusing NumElems variable
for a non-obvious purpose.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 17:15:43 +00:00
Michael J. Spencer
44edb0bd0c Don't cast Win32 FILETIME structs to int64. Patch by Dimitry Andric!
According to the Microsoft documentation here:
http://msdn.microsoft.com/en-us/library/ms724284%28VS.85%29.aspx

this cast used in lib/System/Win32/Path.inc:

__int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime);

should not be done.  The documentation says: "Do not cast a pointer to a
FILETIME structure to either a ULARGE_INTEGER* or __int64* value because
it can cause alignment faults on 64-bit Windows."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 16:39:32 +00:00
Chris Lattner
885b661e10 remove the MSIL backend. It isn't maintained, is buggy, has no testcases
and hasn't kept up with ToT.  Approved by Anton.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 16:33:36 +00:00
Benjamin Kramer
9df0a0a871 Update ocaml test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 10:29:41 +00:00
Benjamin Kramer
13ba2f9714 Remove unions from the ocaml bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 09:47:42 +00:00
Bob Wilson
e5ce4f68c7 Use pseudo instructions for VST1 and VST2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112357 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 05:12:57 +00:00
Chris Lattner
61c70e98ac remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 04:09:24 +00:00
Chris Lattner
5f88af5376 remove the ABCD and SSI passes. They don't have any clients that
I'm aware of, aren't maintained, and LVI will be replacing their value.
nlewycky approved this on irc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:51:24 +00:00
Chris Lattner
5f8a87dd76 remove dead proto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:45:03 +00:00
Chris Lattner
2d9005848d more dead thing zapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112353 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:43:50 +00:00
Chris Lattner
1ff90f7896 zap dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112352 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:42:45 +00:00
Chris Lattner
157d4ead36 for completeness, allow undef also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112351 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:36:51 +00:00
Chris Lattner
b188a3789e squish dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:21:03 +00:00
Chris Lattner
18303ef9e5 zap dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112349 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:18:45 +00:00
Bruno Cardoso Lopes
27f1279411 Clean up the logic of vector shuffles -> vector shifts.
Also teach this logic how to handle target specific shuffles if
needed, this is necessary while searching recursively for zeroed
scalar elements in vector shuffle operands.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 02:46:39 +00:00