Commit Graph

25046 Commits

Author SHA1 Message Date
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
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
Anton Korobeynikov
d79cda9232 Use named sections, where they should be
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56581 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:19:13 +00:00
Anton Korobeynikov
6481873dc0 Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56580 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:18:54 +00:00
Anton Korobeynikov
088ae8393f Use generic section-handling stuff to emit constant pool entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:17:59 +00:00
Anton Korobeynikov
dbab2d2272 Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56578 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:17:27 +00:00
Anton Korobeynikov
36133dd324 Get rid of duplicate char*/Section* stuff for TLS sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56577 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:17:06 +00:00
Anton Korobeynikov
0b501d157e Cleanup, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:16:33 +00:00
Anton Korobeynikov
315690ec2a Get rid of duplicate char*/Section* DataSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:16:16 +00:00
Anton Korobeynikov
d7ca416d6c Get rid of duplicate char*/Section* TextSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:15:21 +00:00
Anton Korobeynikov
c25e1ea5e9 Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56573 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:14:23 +00:00
Anton Korobeynikov
0c8e80607b Drop obsolete hook and change all usage to new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56572 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:13:07 +00:00
Anton Korobeynikov
b5a32e2e8c Provide direct function to switch to Section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56571 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:12:10 +00:00
Anton Korobeynikov
90a7b88c5b SPU section handling is really huge mess. Replace remaining TAI calls for sections with explicit names in order not to block existing backends during section handling migration. SPU folks! Please consider using new section handling facility someday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56570 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:11:42 +00:00
Anton Korobeynikov
6ec7cf00f0 Remove dead code for PIC16 (preparation to switch to new section handling stuff)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:11:26 +00:00
Anton Korobeynikov
5979d7192c XMM6-XMM15 are callee-saved on Win64. Patch by Nicolas Capens!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 22:03:04 +00:00
Owen Anderson
f835f84071 Fix off-by-one error when updating live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 21:30:38 +00:00
Evan Cheng
446531e7bb Add DisableGVCompilation which forces the JIT to assert when it tries to allocate space for a GlobalVariable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 16:25:55 +00:00
Bill Wendling
f3cbca279d Reapplying r56550
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56553 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 10:25:02 +00:00