Commit Graph

39639 Commits

Author SHA1 Message Date
Chris Lattner
39aa20a981 rip out the various v2f32 "mmx" handling logic, now that
v2f32 is illegal on x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-05 04:36:27 +00:00
Jakob Stoklund Olesen
b1e11455d1 Print symbolic subreg indices on REG_SEQUENCE and INSERT_SUBREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107602 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 23:24:23 +00:00
Chris Lattner
f172ecd964 Just rip v2f32 support completely out of the X86 backend. In
the example in the testcase, we now generate:

_test1:                                 ## @test1
	movss	4(%esp), %xmm0
	addss	8(%esp), %xmm0
	movl	12(%esp), %eax
	movss	%xmm0, (%eax)
	ret

instead of:

_test1:                                                     ## @test1
	subl	$20, %esp
	movl	24(%esp), %eax
	movq	%mm0, (%esp)
	movq	%mm0, 8(%esp)
	movss	(%esp), %xmm0
	addss	12(%esp), %xmm0
	movss	%xmm0, (%eax)
	addl	$20, %esp
	ret

v2f32 support did not work reliably because most of the X86
backend didn't know it was legal.  It was apparently only added
to support returning source-level v2f32 values in MMX registers
in x86-32 mode.  If ABI compatibility is important on this
GCC-extended-vector type for some reason, then the frontend
should generate IR that returns v2i32 instead of v2f32.  However,
we generally don't try very hard to be abi compatible on gcc
extended vectors. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 23:07:25 +00:00
Chris Lattner
e35d9842f7 fix PR7518 - terrible codegen of <2 x float>, by only marking
v2f32 as legal in 32-bit mode.  It is just as terrible there,
but I just care about x86-64 and noone claims it is valuable
in 64-bit mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107600 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 22:57:10 +00:00
Chris Lattner
9d19989fe3 indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107599 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 22:56:10 +00:00
Evan Cheng
f2f4903687 Infer alignments of fixed frame objects when they are constructed. This ensures remat'ed loads from fixed slots have the right alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 18:52:05 +00:00
Bill Wendling
f43f6bc3ec Revert r107583. I no longer think that this is the way to solve the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 09:16:57 +00:00
Bill Wendling
4a991a6fa6 Mark sse_load_f32 and sse_load_f64 as having memory operands
(SDNPMemOperand). This way when they're morphed the memory operands will be
copied as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 08:59:55 +00:00
Bill Wendling
d9cb7ca388 Proper indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 08:58:43 +00:00
Eli Friedman
b482829abb Minor amendment to switch-lowering improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 08:43:32 +00:00
Eli Friedman
b4a74c1d82 Note switch-lowering inefficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107565 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 07:38:12 +00:00
Bruno Cardoso Lopes
68b559e5f3 Add AVX SSE4.1 blend, mpsadbw and vdp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 01:37:03 +00:00
Bruno Cardoso Lopes
4a544be3a8 Add AVX SSE4.1 binop (some forms of packed max,min,mul,pack,cmp) instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 01:15:47 +00:00
Eric Christopher
00e840f469 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107556 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 01:09:18 +00:00
Bruno Cardoso Lopes
c607570563 Add AVX SSE4.1 Horizontal Minimum and Position instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107552 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:49:21 +00:00
Evan Cheng
ed2ae136d2 Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill slots so it's always false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:40:23 +00:00
Bruno Cardoso Lopes
2c70d4ad35 Add AVX SSE4.1 round instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:37:44 +00:00
Jakob Stoklund Olesen
273f7e4299 Detect and handle COPY in many places.
This code is transitional, it will soon be possible to eliminate
isExtractSubreg, isInsertSubreg, and isMoveInstr in most places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107547 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:04:37 +00:00
Bruno Cardoso Lopes
03560600b4 Simple refactoring of SSE4.1 instructions, making room for the AVX forms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:27:59 +00:00
Eric Christopher
cd075a4fb3 80-col fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:17:38 +00:00
Jakob Stoklund Olesen
a4e1ba53dd Add a new target independent COPY instruction and code to lower it.
The COPY instruction is intended to replace the target specific copy
instructions for virtual registers as well as the EXTRACT_SUBREG and
INSERT_SUBREG instructions in MachineFunctions. It won't we used in a selection
DAG.

COPY is lowered to native register copies by LowerSubregs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 22:29:50 +00:00
Bruno Cardoso Lopes
f5cd8c51e3 - Add support for the rest of AVX SSE3 instructions
- Fix VEX prefix to be emitted with 3 bytes whenever VEX_5M
represents a REX equivalent two byte leading opcode



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 22:06:54 +00:00
Jim Grosbach
6627ac040a Custom inserters (e.g., conditional moves in Thumb1 can introduce
new basic blocks, and if used as a function argument, that can cause call frame
setup / destroy pairs to be split across a basic block boundary. That prevents
us from doing a simple assertion to check that the pairs match and alloc/
dealloc the same amount of space. Modify the assertion to only check the
amount allocated when there are matching pairs in the same basic block.

rdar://8022442

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:23:37 +00:00
Devang Patel
1192d4d0a5 MDString is already checked earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:13:23 +00:00
Evan Cheng
dca653951c Remove early IT block formation. It's not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:07:09 +00:00
Evan Cheng
98ec91ea80 - Two-address pass should not assume unfolding is always successful.
- X86 unfolding should check if the instructions being unfolded has memoperands.
  If there is no memoperands, then it must assume conservative alignment. If this
  would introduce an expensive sse unaligned load / store, then unfoldMemoryOperand
  etc. should not unfold the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 20:36:18 +00:00
Dale Johannesen
f1e309eb48 Propagate the AlignStack bit in InlineAsm's to the
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not.  gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks.  There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it.  PR 5125.  Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now.  I'm not making it any
worse.  If anyone is inspired I think you can find all
the right places from this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107506 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 20:16:09 +00:00
Jakob Stoklund Olesen
6bae55017c Remove invalid assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:54:47 +00:00
Jakob Stoklund Olesen
3b9c7ebc44 Properly handle debug values during inline spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:54:40 +00:00
Gabor Greif
135d7fe9bb beautify output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107500 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:26:28 +00:00
Gabor Greif
53ba550df1 use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:08:46 +00:00
Dan Gohman
8c1ffae068 Don't claim to preserve AliasAnalysis. First, this is doesn't actually
have any effect, and second, deleting stores can potentially invalidate
an AliasAnalysis, and there's currently no notification for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 18:43:05 +00:00
Jakob Stoklund Olesen
8de3b1eb86 Rematerialize as much as possible before inserting spills and reloads.
This allows us to recognize the common case where all uses could be
rematerialized, and no stack slot allocation is necessary.

If some values could be fully rematerialized, remove them from the live range
before allocating a stack slot for the rest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:44:57 +00:00
Jim Grosbach
6e9926108a 80-column and trailing whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:41:59 +00:00
Jim Grosbach
ee7f8b5f05 grammar tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:38:34 +00:00
Bob Wilson
e45f72c833 Fix incorrect asm-printing of some NEON immediates. Fix weak testcase so
that it checks the immediate values, not just the instructions opcodes.
Radar 8110263.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:23:44 +00:00
Gabor Greif
9d135f0ba5 use ArgOperand API (found by my previous commit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 13:37:16 +00:00
Dan Gohman
108e3707fa IndirectBr is not safe to speculatively execute (!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 00:35:34 +00:00
Dan Gohman
89496d0eb7 Rename CreateReg to CreateRegs, and MakeReg to CreateReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 00:10:16 +00:00
Bruno Cardoso Lopes
f12ad66741 Shrink down SSE3 code by more multiclass refactoring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 23:10:49 +00:00
Bill Wendling
eabd735c9a Make the "linker_private" linkage type emit a non-weak symbol to the file. It
will still be stripped by the linker when it generates the final image.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:38:24 +00:00
Bruno Cardoso Lopes
944facac2e Shrink down SSE3 code by some multiclass refactoring - 1st part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:33:18 +00:00
Bob Wilson
b5b5057a70 ARM function alignments were off by a power of two. svn 83242 changed
getFunctionAlignment and the corresponding use of that value in the ARM
asm printer, but now we're using the standard asm printer.  The result of
this was that function alignments were dropped completely for Thumb functions.
Radar 8143571.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:26:26 +00:00
Bill Wendling
5e721d7682 Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

      .globl l_objc_msgSend_fixup_alloc
      .weak_definition l_objc_msgSend_fixup_alloc
      .section __DATA, __objc_msgrefs, coalesced
      .align 3
l_objc_msgSend_fixup_alloc:
       .quad   _objc_msgSend_fixup
       .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 21:55:59 +00:00
Devang Patel
7fb231cbec Do not require line number entry for undefined local variable.
This is a regression caused by r106792 and caught by gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107430 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 21:38:08 +00:00
Daniel Dunbar
b570968424 MC: Fix some stray hunks I didn't intend to commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:48:51 +00:00
Daniel Dunbar
9186fa6b0c MC: Pass the target instance to the AsmParser constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:41:56 +00:00
Daniel Dunbar
839348a9f0 MC: Fix an error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:20:01 +00:00
Dan Gohman
21de4c0daf Remove context sensitivity concerns from interprocedural-basic-aa, and
make it more aggressive in cases where both pointers are known to live
in the same function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:08:40 +00:00
Daniel Dunbar
94610588af MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
Spencer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:07:24 +00:00