Commit Graph

55008 Commits

Author SHA1 Message Date
Zhou Sheng 7c528e95af Add test case for checkin @r65314.
llvm-svn: 65315
2009-02-23 10:15:04 +00:00
Zhou Sheng 3a86bcf134 Should reset DBI_Prev if DBI_Next == 0.
llvm-svn: 65314
2009-02-23 10:14:11 +00:00
Evan Cheng 9f8fddeed8 Only v1i16 (i.e. _m64) is returned via RAX / RDX.
llvm-svn: 65313
2009-02-23 09:03:22 +00:00
Nate Begeman 9af0d0c97e Make this test use darwin targe triple, to avoid stack traffic on linux.
llvm-svn: 65312
2009-02-23 09:03:06 +00:00
Nate Begeman e684da3e5d Generate better code for v8i16 shuffles on SSE2
Generate better code for v16i8 shuffles on SSE2 (avoids stack)
Generate pshufb for v8i16 and v16i8 shuffles on SSSE3 where it is fewer uops.
Document the shuffle matching logic and add some FIXMEs for later further
  cleanups.
New tests that test the above.

Examples:

New:
_shuf2:
	pextrw	$7, %xmm0, %eax
	punpcklqdq	%xmm1, %xmm0
	pshuflw	$128, %xmm0, %xmm0
	pinsrw	$2, %eax, %xmm0

Old:
_shuf2:
	pextrw	$2, %xmm0, %eax
	pextrw	$7, %xmm0, %ecx
	pinsrw	$2, %ecx, %xmm0
	pinsrw	$3, %eax, %xmm0
	movd	%xmm1, %eax
	pinsrw	$4, %eax, %xmm0
	ret

=========

New:
_shuf4:
	punpcklqdq	%xmm1, %xmm0
	pshufb	LCPI1_0, %xmm0

Old:
_shuf4:
	pextrw	$3, %xmm0, %eax
	movsd	%xmm1, %xmm0
	pextrw	$3, %xmm1, %ecx
	pinsrw	$4, %ecx, %xmm0
	pinsrw	$5, %eax, %xmm0

========

New:
_shuf1:
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	pextrw	$1, %xmm0, %eax
	rolw	$8, %ax
	movd	%xmm0, %ecx
	rolw	$8, %cx
	pextrw	$5, %xmm0, %edx
	pextrw	$4, %xmm0, %esi
	pextrw	$3, %xmm0, %edi
	pextrw	$2, %xmm0, %ebx
	movaps	%xmm0, %xmm1
	pinsrw	$0, %ecx, %xmm1
	pinsrw	$1, %eax, %xmm1
	rolw	$8, %bx
	pinsrw	$2, %ebx, %xmm1
	rolw	$8, %di
	pinsrw	$3, %edi, %xmm1
	rolw	$8, %si
	pinsrw	$4, %esi, %xmm1
	rolw	$8, %dx
	pinsrw	$5, %edx, %xmm1
	pextrw	$7, %xmm0, %eax
	rolw	$8, %ax
	movaps	%xmm1, %xmm0
	pinsrw	$7, %eax, %xmm0
	popl	%esi
	popl	%edi
	popl	%ebx
	ret

Old:
_shuf1:
	subl	$252, %esp
	movaps	%xmm0, (%esp)
	movaps	%xmm0, 16(%esp)
	movaps	%xmm0, 32(%esp)
	movaps	%xmm0, 48(%esp)
	movaps	%xmm0, 64(%esp)
	movaps	%xmm0, 80(%esp)
	movaps	%xmm0, 96(%esp)
	movaps	%xmm0, 224(%esp)
	movaps	%xmm0, 208(%esp)
	movaps	%xmm0, 192(%esp)
	movaps	%xmm0, 176(%esp)
	movaps	%xmm0, 160(%esp)
	movaps	%xmm0, 144(%esp)
	movaps	%xmm0, 128(%esp)
	movaps	%xmm0, 112(%esp)
	movzbl	14(%esp), %eax
	movd	%eax, %xmm1
	movzbl	22(%esp), %eax
	movd	%eax, %xmm2
	punpcklbw	%xmm1, %xmm2
	movzbl	42(%esp), %eax
	movd	%eax, %xmm1
	movzbl	50(%esp), %eax
	movd	%eax, %xmm3
	punpcklbw	%xmm1, %xmm3
	punpcklbw	%xmm2, %xmm3
	movzbl	77(%esp), %eax
	movd	%eax, %xmm1
	movzbl	84(%esp), %eax
	movd	%eax, %xmm2
	punpcklbw	%xmm1, %xmm2
	movzbl	104(%esp), %eax
	movd	%eax, %xmm1
	punpcklbw	%xmm1, %xmm0
	punpcklbw	%xmm2, %xmm0
	movaps	%xmm0, %xmm1
	punpcklbw	%xmm3, %xmm1
	movzbl	127(%esp), %eax
	movd	%eax, %xmm0
	movzbl	135(%esp), %eax
	movd	%eax, %xmm2
	punpcklbw	%xmm0, %xmm2
	movzbl	155(%esp), %eax
	movd	%eax, %xmm0
	movzbl	163(%esp), %eax
	movd	%eax, %xmm3
	punpcklbw	%xmm0, %xmm3
	punpcklbw	%xmm2, %xmm3
	movzbl	188(%esp), %eax
	movd	%eax, %xmm0
	movzbl	197(%esp), %eax
	movd	%eax, %xmm2
	punpcklbw	%xmm0, %xmm2
	movzbl	217(%esp), %eax
	movd	%eax, %xmm4
	movzbl	225(%esp), %eax
	movd	%eax, %xmm0
	punpcklbw	%xmm4, %xmm0
	punpcklbw	%xmm2, %xmm0
	punpcklbw	%xmm3, %xmm0
	punpcklbw	%xmm1, %xmm0
	addl	$252, %esp
	ret

llvm-svn: 65311
2009-02-23 08:49:38 +00:00
Nick Lewycky fc684c0c83 If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
off in libLTO.

llvm-svn: 65310
2009-02-23 07:41:55 +00:00
Mon P Wang dccfa0b26c Changed option name from inline-threshold to basic-inline-threshold because
inline-threshold option is used by the inliner.

llvm-svn: 65309
2009-02-23 07:07:56 +00:00
Chris Lattner d5420f0957 fix some typos that Duncan noticed
llvm-svn: 65306
2009-02-23 05:56:17 +00:00
Eli Friedman 3ae5911042 A few small improvements to Evaluate for stuff I noted in FIXMEs.
llvm-svn: 65305
2009-02-23 04:23:56 +00:00
Ted Kremenek e73f282213 retain/release checker: For now don't track the retain count of NSWindow objects (opt for false negatives).
llvm-svn: 65304
2009-02-23 02:51:29 +00:00
Ted Kremenek e6d2b40bcc More retain/release naming convention tests.
llvm-svn: 65303
2009-02-23 02:50:20 +00:00
Ted Kremenek 5485a2f70b Remove typo.
llvm-svn: 65302
2009-02-23 02:42:56 +00:00
Ted Kremenek 7d4fc5bcdc '[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a DoNothing effect.
llvm-svn: 65301
2009-02-23 02:31:16 +00:00
Steve Naroff 77170dcb14 Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to 'Class'. Also improve "super" handling.
llvm-svn: 65300
2009-02-23 02:25:40 +00:00
Ted Kremenek 5fa0d070a5 Add test case for PR 2599.
llvm-svn: 65299
2009-02-23 01:29:25 +00:00
Bill Wendling 9ee052bcdc Propagate debug loc info through prologue/epilogue.
llvm-svn: 65298
2009-02-23 00:42:30 +00:00
Scott Michel 9d31aca679 Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTOR
instruction. The class also consolidates the code for detecting constant
splats that's shared across PowerPC and the CellSPU backends (and might be
useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for
generating new BUILD_VECTOR nodes.

llvm-svn: 65296
2009-02-22 23:36:09 +00:00
Nick Lewycky 338d07e94e Add an option to the gold plugin to make it emit a file with the public api
list that can in turn be passed to -internalize pass through
-internalize-public-api-file.

Pass gold -plugin-opt=generate-api-file to produce "apifile.txt" in the current
directory.

llvm-svn: 65295
2009-02-22 22:15:44 +00:00
Steve Naroff d2c44d224c Minor cleanup, replace bool with qual_empty().
llvm-svn: 65293
2009-02-22 19:41:00 +00:00
Steve Naroff c4173fa704 Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).
- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.

llvm-svn: 65292
2009-02-22 19:35:57 +00:00
Anders Carlsson e14282e274 Make sure to reset the DidCallStackSave variable before emitting a compound statement. Fixes PR3649.
llvm-svn: 65291
2009-02-22 18:44:21 +00:00
Fariborz Jahanian 0773533b27 More objc gc work. Match gcc's treatment of ivar access
true a local pointer to objective-c object in generating
write barriers.

llvm-svn: 65290
2009-02-22 18:40:18 +00:00
Dan Gohman 648c5e9c99 Revert the part of 64623 that attempted to align the source in a
memcpy to match the alignment of the destination. It isn't necessary
for making loads and stores handled like the SSE loadu/storeu
intrinsics, and it was causing a performance regression in
MultiSource/Applications/JM/lencod.

The problem appears to have been a memcpy that copies from some
highly aligned array into an alloca; the alloca was then being
assigned a large alignment, which required codegen to perform
dynamic stack-pointer re-alignment, which forced the enclosing
function to have a frame pointer, which led to increased spilling.

llvm-svn: 65289
2009-02-22 18:06:32 +00:00
Dan Gohman f394e58af5 Properly parenthesize this expression, fixing a real bug in the new
-full-lsr code, as well as a GCC warning.

llvm-svn: 65288
2009-02-22 16:40:52 +00:00
Richard Pennington d853864705 bug 3610: Test case.
llvm-svn: 65287
2009-02-22 15:54:44 +00:00
Mike Stump e8b2d066ea Copy some clenaups from Eli to code that I copied. :-)
llvm-svn: 65286
2009-02-22 13:55:31 +00:00
Mike Stump 624497c29a Cleanp code with some recent suggestions.
llvm-svn: 65285
2009-02-22 13:27:11 +00:00
Eli Friedman c2b5017a72 A bit of Evaluate cleanup. Also, a full audit of what's missing that
someone would reasonably expect Evaluate to handle for C/ObjC.

llvm-svn: 65284
2009-02-22 11:46:18 +00:00
Ted Kremenek cd25abed46 Update to checker-0.162 (fixed header issue in tar.bz2 package).
llvm-svn: 65283
2009-02-22 08:50:06 +00:00
Ted Kremenek 589aa282dd Reverted back to checker-0.161 because of a header issue.
llvm-svn: 65281
2009-02-22 08:42:49 +00:00
Ted Kremenek 1f19573c84 Updated checker build.
llvm-svn: 65280
2009-02-22 08:38:12 +00:00
Evan Cheng e779595af0 If a use operand is marked isKill, don't forget to add kill to its live interval as well.
llvm-svn: 65279
2009-02-22 08:35:56 +00:00
Daniel Dunbar bb525c3c7f x86_64 ABI: Actually, we can always pass things we want to pass in
memory using Indirect; this was a holdover from when CGCall wasn't as
robust.

llvm-svn: 65278
2009-02-22 08:17:51 +00:00
Daniel Dunbar 9e5dfc6111 ccc: Remove unknown host warning, it was breaking gcc's configure.
llvm-svn: 65276
2009-02-22 08:15:14 +00:00
Evan Cheng 2448aa1d8d Add a note.
llvm-svn: 65275
2009-02-22 08:13:45 +00:00
Evan Cheng e4ffc030e2 Be bug compatible with gcc by returning MMX values in RAX.
llvm-svn: 65274
2009-02-22 08:05:12 +00:00
Evan Cheng 91193c0094 Do not consider MMX_MOVD64rr a move instructions. The source register is in GR32, the destination is VR64. They are not compatible.
llvm-svn: 65273
2009-02-22 08:04:23 +00:00
Eli Friedman fd85266342 Fix test to be legal on 64-bit systems.
llvm-svn: 65270
2009-02-22 07:40:57 +00:00
Ted Kremenek 35251f3d92 Fix regression in naming convention derivation: a method only follows the copy 'rule' if it doesn't already start with 'init', etc.
llvm-svn: 65269
2009-02-22 07:32:24 +00:00
Evan Cheng 69decbf0b2 Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
llvm-svn: 65268
2009-02-22 07:31:19 +00:00
Eli Friedman 825fe7565e Eliminate a bunch of code which should be dead.
llvm-svn: 65267
2009-02-22 07:29:04 +00:00
Daniel Dunbar 075d642e24 x86_64 ABI: Make sure to pass vectors that we want to pass in memory
as byval. Otherwise LLVM will have its own opinion about where to put
things.

We now pass all gcc dg.compat tests on x86_64.

llvm-svn: 65266
2009-02-22 07:22:25 +00:00
Eli Friedman 7bfab36877 Throw the switch to exclusively use Evaluate (along with the small
helper isConstantInitializer) to check whether an initializer is 
constant.  This passes tests, but it's possible that it'll cause 
regressions with real-world code.

Future work:
1. The diagnostics obtained this way are lower quality at the moment; 
some work both here and in Evaluate is needed for accurate diagnostics.
2. We probably need some extra code when we're in -pedantic mode so we 
can strictly enforce the rules in C99 6.6p7.
3. Dead code cleanup (this should wait until after 2, because we might 
want to re-use some of the code).

llvm-svn: 65265
2009-02-22 06:45:27 +00:00
Daniel Dunbar c64c481d18 x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't care
about these much but <2 x i16> shows up in the gcc test suite.

llvm-svn: 65264
2009-02-22 04:48:22 +00:00
Daniel Dunbar 3ebd531b2c ABITestGen: Use explicit list of vector types instead of just a list
of sizes. Turns out we don't care very much about vector types that
don't map to the hardware.

llvm-svn: 65263
2009-02-22 04:17:53 +00:00
Daniel Dunbar f25afad9e5 x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).
Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't
quite work yet in the backend).

llvm-svn: 65262
2009-02-22 04:16:10 +00:00
Eli Friedman f837924faf Enhance Evaluate to handle ObjC qualified id and class types; as far as
I know, these follow the exact same rules as pointers, so I just made 
them use the same codepath.  Someone more familiar with ObjC should 
double-check this, though.

llvm-svn: 65261
2009-02-22 04:02:33 +00:00
Eli Friedman 3f8c01a110 Fix for PR3433: map __alignof__ to preferred alignment. (This was
partially done in r65258.)

llvm-svn: 65260
2009-02-22 03:31:23 +00:00
Eli Friedman 34ef305759 Last part of PR3254: use the same alignment computation in Sema and
CodeGen.  I'm not sure whether this actually makes any visible 
difference, but it's better to be consistent anyway.

llvm-svn: 65259
2009-02-22 03:23:43 +00:00
Eli Friedman 19a546c15b Improvements to ASTContext::getDeclAlignInBytes; fixes the testcase in
PR3254 and part of PR3433.

The isICE changes are necessary to keep the computed results 
consistent with Evaluate.

llvm-svn: 65258
2009-02-22 02:56:25 +00:00