Commit Graph

41632 Commits

Author SHA1 Message Date
Evan Cheng
c739489c19 unpckhps requires sse1, punpckhdq requires sse2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 21:26:30 +00:00
Daniel Dunbar
0526778ab7 Update LICENSE link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 21:12:29 +00:00
Dan Gohman
09aae469ce Fix X86FastISel's address folding to check displacement
values for overflow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 20:04:15 +00:00
Evan Cheng
36a55023c1 Fix @llvm.frameaddress codegen. FP elimination optimization should be disabled when frame address is desired. Also add support for depth > 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56683 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:48:35 +00:00
Oscar Fuentes
dbc2e856fc CMake: Builds all examples. Corrected name of CBackend target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:48:03 +00:00
Dale Johannesen
dfe8c84e1e Generated files for previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:32:34 +00:00
Dale Johannesen
7fefc6b4fe Another file I forgot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56678 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:31:53 +00:00
Dale Johannesen
86098bd6a6 Add "inreg" field to CallSDNode (doesn't increase
its size).  Adjust various lowering functions to
pass this info through from CallInst.  Use it to
implement sseregparm returns on X86.  Remove
X86_ssecall calling convention.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:31:26 +00:00
Dan Gohman
97135e1ee5 Factor out the code for determining when symblic addresses
require RIP-relative addressing and use it to fix a bug
in X86FastISel in x86-64 PIC mode, where it was trying to
use base/index registers with RIP-relative addresses. This
fixes a bunch of x86-64 testsuite failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:15:30 +00:00
Evan Cheng
a67f32abb5 Avoid spilling EBP / RBP twice in the prologue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56675 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:14:21 +00:00
Owen Anderson
082d351361 We don't need to insert copies for implicit_def's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56674 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 18:50:46 +00:00
Jim Grosbach
0eecd899ea When looking for executable extensions, ignore .dSYM, as that's the debug info directory on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 17:27:58 +00:00
Evan Cheng
4367ff7aff X86 address displacement field must be interpreted as a 32-bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 16:58:16 +00:00
Daniel Dunbar
e52cb70767 Set svn:ignore on AsmPrinter Release-Asserts directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 04:50:04 +00:00
Oscar Fuentes
e1ad087fcb CMake: Builds all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 04:40:32 +00:00
Dan Gohman
5af29c2e57 Disable support for x86_f80 in X86FastISel. Supporting it would
require more work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56637 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 01:39:32 +00:00
Bill Wendling
d751c64a67 If we have a function with an unreachable statement such that the ending debug
information is in an unreachable block, then it's possible that the high/low pc
values won't be set for the dwarf information. E.g., this function:

void abort(void) __attribute__((__noreturn__));
void dead_beef(void) __attribute__ ((noreturn));

int *b;

void dead_beef(void) {
  *b=0xdeadbeef;
  abort();
}

has a call to "@llvm.dbg.region.end" only in the unreachable block:

define void @dead_beef() noreturn nounwind  {
entry:
	call void @llvm.dbg.func.start(...)
	call void @llvm.dbg.stoppoint(...)
...
	call void @abort( ) noreturn nounwind 
	unreachable

return:		; No predecessors!
	call void @llvm.dbg.stoppoint(...)
	call void @llvm.dbg.region.end(...)
	ret void
}

The dwarf information emitted is something like:

0x00000084:     TAG_subprogram [5]  
                 AT_name( "dead_beef" )
                 AT_external( 0x01 )
                 AT_prototyped( 0x01 )
                 AT_decl_file( 0x01 )
                 AT_decl_line( 0x08 )

Note that this is *not* the best fix for this problem, but a band-aid for an
gaping wound. This code needs to be changed when we revamp our debugging
information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 00:28:12 +00:00
Evan Cheng
4dcc8a373d Prefer movlhps over punpcklqdq, etc. in more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56627 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 23:35:16 +00:00
Dan Gohman
789ce77c6a Fix a bug in which address displacements were being added to the
load from the stub, instead of the result of the load from the stub.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 23:34:02 +00:00
Bill Wendling
c4f72dd6e7 Make pointer parameter const for isUsedInBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 22:42:01 +00:00
Devang Patel
0598866c05 Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage 
- to implement function notes as function attributes and 
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 21:00:45 +00:00
Anton Korobeynikov
32b952a2a6 Reapply 56585:56589 with proper fix for some gcc versions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 21:00:33 +00:00
Evan Cheng
0b457f0c3a With sse3 and when the source is a load or has multiple uses, favors movddup over shuffp*, pshufd, etc. Without sse3 or when the source is from a register, make use of movlhps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 20:50:48 +00:00
Dale Johannesen
c9c6da61ac Accept 'inreg' attribute on x86 functions as
meaning sse_regparm (i.e. float/double values go
in XMM0 instead of ST0).  Update documentation
to reflect reality.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 20:47:45 +00:00
Dan Gohman
0c8927efed Avoid a spurious extra space character when printing empty structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 17:37:20 +00:00
Dan Gohman
5dd9c2e9ae Support for i1 XOR in FastISel. It is actually safe because
i1 operands are assumed to already by zero-extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 17:22:52 +00:00
Dan Gohman
77ca41e5c3 Don't print fast-isel debug messages by default. Thanks Chris!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 17:21:42 +00:00
Dan Gohman
2c442eda74 Don't forget the newline in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56613 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 17:17:27 +00:00
Dan Gohman
33134c4a75 FastISel support for debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56610 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 17:05:24 +00:00
Richard Pennington
4b052dc63d bug 2812: Segmentation fault on a big emdiam processor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 16:15:10 +00:00
Dan Gohman
2cc3aa4459 PIC support in X86FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56608 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 15:24:26 +00:00
Evan Cheng
688535e005 Temporarily backing out 56585:56589 to unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56607 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 07:38:08 +00:00
Dan Gohman
dceffe66b9 Fix a recent fast-isel coverage regression - don't bail out before
giving the target a chance to materialize constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 01:28:51 +00:00
Dan Gohman
2c4bf119be Enable DeadMachineInstructionElim when Fast-ISel is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 01:14:49 +00:00
Dan Gohman
723ac3720f Add debug output to this pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56602 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 01:06:50 +00:00
Evan Cheng
89d4a2848d pmovsxbq etc. requires sse4.1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56600 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 00:49:51 +00:00
Dan Gohman
02dae4ba06 Refactor the code that adds standard LLVM codegen passes into
a separate function, eliminating duplication between the
add-passes-for-file and add-passes-for-machine-code code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 00:37:07 +00:00
Evan Cheng
aa765b8c35 <rdar://problem/6234798> Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56597 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 00:14:04 +00:00
Dan Gohman
bd0f144cc2 Give LowerSubregs.cpp a top-level description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56596 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 23:44:12 +00:00
Evan Cheng
ca57f78332 Fix patterns for SSE4.1 move and sign extend instructions. Also add instructions which fold VZEXT_MOVL and VZEXT_LOAD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56594 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 23:27:55 +00:00
Evan Cheng
8a186ae4aa X86ISD::VZEXT_LOAD should produce and fold a chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 23:26:36 +00:00
Dale Johannesen
8e3455ba17 Remove SelectionDag early allocation of registers
for earlyclobbers.  Teach Local RA about earlyclobber,
and add some tests for it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56592 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 23:13:09 +00:00
Anton Korobeynikov
b7679bd0cb Finally get rid of virtual inheritance in TAI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56589 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:23:17 +00:00
Anton Korobeynikov
742fd195a6 Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56588 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:22:54 +00:00
Anton Korobeynikov
621cdf0057 Get rid of virtual inheritance for ARM TAI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:22:27 +00:00
Anton Korobeynikov
93ed1029ec Get rid of virtual inheritance for PPC TAI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56586 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:22:03 +00:00
Anton Korobeynikov
8490322fa9 Use crazy template-based inheritance instead of virtual one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56585 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:21:39 +00:00
Anton Korobeynikov
541af7f769 Use helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56584 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:21:04 +00:00
Anton Korobeynikov
4cad98a0bb SmallPtrSet will be better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:20:46 +00:00
Anton Korobeynikov
00181a33d8 Get rid of ReadOnlySection duplicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56582 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:20:27 +00:00