1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
Commit Graph

24959 Commits

Author SHA1 Message Date
Bill Wendling
bf75299f0a 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.

llvm-svn: 56628
2008-09-26 00:28:12 +00:00
Evan Cheng
c8674dcfd0 Prefer movlhps over punpcklqdq, etc. in more cases.
llvm-svn: 56627
2008-09-25 23:35:16 +00:00
Dan Gohman
524c506db3 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.

llvm-svn: 56626
2008-09-25 23:34:02 +00:00
Bill Wendling
8b4fecfb09 Make pointer parameter const for isUsedInBasicBlock.
llvm-svn: 56625
2008-09-25 22:42:01 +00:00
Devang Patel
64dd7a2e89 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.

llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Anton Korobeynikov
7367de00cf Reapply 56585:56589 with proper fix for some gcc versions
llvm-svn: 56621
2008-09-25 21:00:33 +00:00
Evan Cheng
d190aeb62d 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
llvm-svn: 56620
2008-09-25 20:50:48 +00:00
Dale Johannesen
62f64ab4c8 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.

llvm-svn: 56619
2008-09-25 20:47:45 +00:00
Dan Gohman
f03be3916e Avoid a spurious extra space character when printing empty structs.
llvm-svn: 56616
2008-09-25 17:37:20 +00:00
Dan Gohman
9bb92ce6e9 Support for i1 XOR in FastISel. It is actually safe because
i1 operands are assumed to already by zero-extended.

llvm-svn: 56615
2008-09-25 17:22:52 +00:00
Dan Gohman
51cd436ad8 Don't print fast-isel debug messages by default. Thanks Chris!
llvm-svn: 56614
2008-09-25 17:21:42 +00:00
Dan Gohman
5ee9d9af7f Don't forget the newline in debug output.
llvm-svn: 56613
2008-09-25 17:17:27 +00:00
Dan Gohman
b63e6de501 FastISel support for debug info.
llvm-svn: 56610
2008-09-25 17:05:24 +00:00
Richard Pennington
1db9263b05 bug 2812: Segmentation fault on a big emdiam processor.
llvm-svn: 56609
2008-09-25 16:15:10 +00:00
Dan Gohman
6f5c6be90f PIC support in X86FastISel.
llvm-svn: 56608
2008-09-25 15:24:26 +00:00
Evan Cheng
12a67b5226 Temporarily backing out 56585:56589 to unbreak the build.
llvm-svn: 56607
2008-09-25 07:38:08 +00:00
Dan Gohman
1776533304 Fix a recent fast-isel coverage regression - don't bail out before
giving the target a chance to materialize constants.

llvm-svn: 56605
2008-09-25 01:28:51 +00:00
Dan Gohman
ed3216739e Enable DeadMachineInstructionElim when Fast-ISel is enabled.
llvm-svn: 56604
2008-09-25 01:14:49 +00:00
Dan Gohman
32c4066d62 Add debug output to this pass.
llvm-svn: 56602
2008-09-25 01:06:50 +00:00
Evan Cheng
d8a6a7beaa pmovsxbq etc. requires sse4.1.
llvm-svn: 56600
2008-09-25 00:49:51 +00:00
Dan Gohman
57dc5e1698 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.

llvm-svn: 56599
2008-09-25 00:37:07 +00:00
Evan Cheng
bac8250ba4 <rdar://problem/6234798> Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!")
llvm-svn: 56597
2008-09-25 00:14:04 +00:00
Dan Gohman
4855b659d9 Give LowerSubregs.cpp a top-level description.
llvm-svn: 56596
2008-09-24 23:44:12 +00:00
Evan Cheng
efd1f614ff Fix patterns for SSE4.1 move and sign extend instructions. Also add instructions which fold VZEXT_MOVL and VZEXT_LOAD.
llvm-svn: 56594
2008-09-24 23:27:55 +00:00
Evan Cheng
1d0ed88bf9 X86ISD::VZEXT_LOAD should produce and fold a chain.
llvm-svn: 56593
2008-09-24 23:26:36 +00:00
Dale Johannesen
4184c23365 Remove SelectionDag early allocation of registers
for earlyclobbers.  Teach Local RA about earlyclobber,
and add some tests for it.

llvm-svn: 56592
2008-09-24 23:13:09 +00:00
Anton Korobeynikov
ff74ae04b1 Minor cleanup
llvm-svn: 56588
2008-09-24 22:22:54 +00:00
Anton Korobeynikov
1c1eeb6b7b Get rid of virtual inheritance for ARM TAI
llvm-svn: 56587
2008-09-24 22:22:27 +00:00
Anton Korobeynikov
3f07365446 Get rid of virtual inheritance for PPC TAI
llvm-svn: 56586
2008-09-24 22:22:03 +00:00
Anton Korobeynikov
9e5cbcc134 Use crazy template-based inheritance instead of virtual one.
llvm-svn: 56585
2008-09-24 22:21:39 +00:00
Anton Korobeynikov
ccd9174b23 Use helper
llvm-svn: 56584
2008-09-24 22:21:04 +00:00
Anton Korobeynikov
f465171596 SmallPtrSet will be better
llvm-svn: 56583
2008-09-24 22:20:46 +00:00
Anton Korobeynikov
b9294473f0 Get rid of ReadOnlySection duplicate
llvm-svn: 56582
2008-09-24 22:20:27 +00:00
Anton Korobeynikov
abf1e5277b Use named sections, where they should be
llvm-svn: 56581
2008-09-24 22:19:13 +00:00
Anton Korobeynikov
9b9c3a38ad Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection
llvm-svn: 56580
2008-09-24 22:18:54 +00:00
Anton Korobeynikov
f95cbd4834 Use generic section-handling stuff to emit constant pool entries
llvm-svn: 56579
2008-09-24 22:17:59 +00:00
Anton Korobeynikov
154a35a723 Cleanup
llvm-svn: 56578
2008-09-24 22:17:27 +00:00
Anton Korobeynikov
1b3c67c5cf Get rid of duplicate char*/Section* stuff for TLS sections
llvm-svn: 56577
2008-09-24 22:17:06 +00:00
Anton Korobeynikov
021a7eed86 Cleanup, no functionality change
llvm-svn: 56576
2008-09-24 22:16:33 +00:00
Anton Korobeynikov
dca16f3acf Get rid of duplicate char*/Section* DataSection
llvm-svn: 56575
2008-09-24 22:16:16 +00:00
Anton Korobeynikov
83fa257f55 Get rid of duplicate char*/Section* TextSection
llvm-svn: 56574
2008-09-24 22:15:21 +00:00
Anton Korobeynikov
c7ac49c632 Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic.
llvm-svn: 56573
2008-09-24 22:14:23 +00:00
Anton Korobeynikov
9e5d24042c Drop obsolete hook and change all usage to new interface
llvm-svn: 56572
2008-09-24 22:13:07 +00:00
Anton Korobeynikov
ff79214785 Provide direct function to switch to Section
llvm-svn: 56571
2008-09-24 22:12:10 +00:00
Anton Korobeynikov
5c9283696b 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.
llvm-svn: 56570
2008-09-24 22:11:42 +00:00
Anton Korobeynikov
a76d9f547f Remove dead code for PIC16 (preparation to switch to new section handling stuff)
llvm-svn: 56569
2008-09-24 22:11:26 +00:00
Anton Korobeynikov
24b906c8a3 XMM6-XMM15 are callee-saved on Win64. Patch by Nicolas Capens!
llvm-svn: 56568
2008-09-24 22:03:04 +00:00
Owen Anderson
2cfce89777 Fix off-by-one error when updating live intervals.
llvm-svn: 56567
2008-09-24 21:30:38 +00:00
Evan Cheng
0ed8f5b185 Add DisableGVCompilation which forces the JIT to assert when it tries to allocate space for a GlobalVariable.
llvm-svn: 56557
2008-09-24 16:25:55 +00:00
Bill Wendling
7c60c6e7bf Reapplying r56550
llvm-svn: 56553
2008-09-24 10:25:02 +00:00