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

72058 Commits

Author SHA1 Message Date
Rafael Espindola
dfc30289f1 Revert 131172 as it is causing clang to miscompile itself. I will try
to provide a reduced testcase.

llvm-svn: 131176
2011-05-11 03:27:17 +00:00
Bill Wendling
453a924d29 Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmp
intrinsic call. This prevents it from being reordered so that it appears
*before* the setjmp intrinsic (thus making it completely useless).
<rdar://problem/9409683>

llvm-svn: 131174
2011-05-11 01:11:55 +00:00
Bill Wendling
68a363dd78 Fix comment.
llvm-svn: 131173
2011-05-11 01:08:39 +00:00
Evan Cheng
271e0ebf0a Add a late optimization to BranchFolding that hoist common instruction sequences
at the start of basic blocks to their common predecessor. It's actually quite
common (e.g. about 50 times in JM/lencod) and has shown to be a nice code size
benefit. e.g.

        pushq   %rax
        testl   %edi, %edi
        jne     LBB0_2
## BB#1:
        xorb    %al, %al
        popq    %rdx
        ret
LBB0_2:
        xorb    %al, %al
        callq   _foo
        popq    %rdx
        ret

=>

        pushq   %rax
        xorb    %al, %al
        testl   %edi, %edi
        je      LBB0_2
## BB#1:
        callq   _foo
LBB0_2:
        popq    %rdx
        ret

rdar://9145558

llvm-svn: 131172
2011-05-11 01:03:01 +00:00
Eric Christopher
3c17ef53c3 Optimize atomic lock or that doesn't use the result value.
Next up: xor and and.

Part of rdar://8470697

llvm-svn: 131171
2011-05-10 23:57:45 +00:00
Rafael Espindola
9a6bbdcc7a Add triple.
llvm-svn: 131169
2011-05-10 23:14:29 +00:00
Rafael Espindola
2cfc1f6480 Fix cmake again.
llvm-svn: 131164
2011-05-10 22:42:41 +00:00
Nick Lewycky
b7f59c5ef2 Remove empty file.
llvm-svn: 131162
2011-05-10 22:38:17 +00:00
Rafael Espindola
ce84130f0f Avoid a gcc warning.
llvm-svn: 131161
2011-05-10 22:28:35 +00:00
Rafael Espindola
8393021e1e Fix cmake build.
llvm-svn: 131160
2011-05-10 22:19:33 +00:00
Nick Lewycky
5a1035a0dc Revert r131155 for now. It makes VMCore depend on Analysis and Transforms
headers.

llvm-svn: 131159
2011-05-10 22:16:06 +00:00
Rafael Espindola
26a7112c00 Initialize moveTypeModule.
llvm-svn: 131157
2011-05-10 21:54:59 +00:00
Eli Friedman
aecbcc0c8f Disable my little CopyToReg argument hack with fast-isel. rdar://problem/9413587 .
llvm-svn: 131156
2011-05-10 21:50:58 +00:00
David Chisnall
17ae92b2d8 Add support for plugins add passes to the default set of passes. The standard set of passes used by front ends can now be modified by LLVM plugins, without needing to modify any front ends.
Still to do:

- Allow replacing / removing passes (infrastructure there, just needs an infrastructure exposed)
- Defining sets of passes to be added or removed as a group
- Extending the support to allow user-defined groups of optimisations
- Allow plugins to be specified for loading automatically (e.g. from plugins.conf or some similar mechanism)

Reviewed by Nick Lewycky.

llvm-svn: 131155
2011-05-10 21:36:48 +00:00
Stuart Hastings
e589a29764 Correctly walk through nested and adjacent CALLSEQ_START nodes. No
test case; I've only seen this on a release branch, and I can't get it
to reproduce on trunk.  rdar://problem/7662569

llvm-svn: 131152
2011-05-10 21:20:03 +00:00
Rafael Espindola
46b0ce1b5f Produce a __debug_frame section on darwin ARM when appropriate.
llvm-svn: 131151
2011-05-10 21:04:45 +00:00
Rafael Espindola
e8890f4b16 On MachO, unlike ELF, there should be no relocation to produce the CIE pointer.
llvm-svn: 131149
2011-05-10 20:59:42 +00:00
Rafael Espindola
9b3e6a9cb4 Rename DwarfRequiresRelocationForStmtList to
DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList.

llvm-svn: 131148
2011-05-10 20:35:05 +00:00
Rafael Espindola
ec3d43391f The EH symbols are only needed in eh_frame, not debug_frame.
llvm-svn: 131146
2011-05-10 19:51:53 +00:00
Rafael Espindola
92dc58fea6 Use .cfi_sections to put the unwind info in .debug_frame when possible. With
this clang will use .debug_frame in, for example,
clang -g -c -m32 test.c
This matches gcc's behaviour. It looks like .debug_frame is a bit bigger
than .eh_frame, but has the big advantage of not being allocated.

llvm-svn: 131140
2011-05-10 18:39:09 +00:00
Eric Christopher
aa7c86ec19 Refactor lock versions of binary operators to be a little less
cut and paste.

llvm-svn: 131139
2011-05-10 18:36:16 +00:00
Jason W Kim
5b6e73e499 First cut at getting debugging support for ARM/MC/ELF/.o
DWARF stuff also gets fixed up by ELFARMAsmBackend::ApplyFixup(),
but the offset is not guaranteed to be mod 4 == 0 as in text/data. 

llvm-svn: 131137
2011-05-10 18:07:25 +00:00
Jakob Stoklund Olesen
509b4ecd92 Downgrade a tablegen warning to an error.
Ambiguous sub-register index compositions are OK as long as the backend writer
knows what he is doing.

llvm-svn: 131134
2011-05-10 17:52:59 +00:00
Jakob Stoklund Olesen
1dfbef8150 Fix PR9883. Make sure all caches are invalidated when a live range is repaired.
The previous invalidation missed the alias interference caches.

Also add a stats counter for the number of repaired ranges.

llvm-svn: 131133
2011-05-10 17:37:41 +00:00
Rafael Espindola
ff4443c82c In a debug_frame the cfi offset is to the start of the debug_frame section!
llvm-svn: 131129
2011-05-10 15:20:23 +00:00
Justin Holewinski
4afbfa1796 PTX: add test cases for cvt, fneg, and selp
Patch by Dan Bailey

llvm-svn: 131128
2011-05-10 14:53:13 +00:00
Rafael Espindola
33cc7a8f74 Add CFIStartSections to the asm printer. Add an assert that at least
one of the sections is created.

llvm-svn: 131124
2011-05-10 13:39:48 +00:00
Justin Holewinski
ecdabf3295 PTX: add PTX 2.3 setting in PTX sub-target.
Patch by Wei-Ren Chen

llvm-svn: 131123
2011-05-10 12:32:11 +00:00
Rafael Espindola
b7c942431f Add support for producing .deubg_frame sections.
llvm-svn: 131121
2011-05-10 03:54:12 +00:00
Rafael Espindola
566d48be51 Small cleanups.
llvm-svn: 131120
2011-05-10 03:26:21 +00:00
Rafael Espindola
3d5f7d1fc1 Factor some code into a new EmitFrames method.
llvm-svn: 131119
2011-05-10 03:14:15 +00:00
Rafael Espindola
dce419e62b Remove unused argument.
llvm-svn: 131118
2011-05-10 03:01:39 +00:00
Rafael Espindola
c5f10dda05 Parsing and plumbing for .cfi_sections.
llvm-svn: 131117
2011-05-10 01:10:18 +00:00
Devang Patel
ca956d0334 Preserve line number information.
llvm-svn: 131112
2011-05-10 00:03:11 +00:00
Devang Patel
38193e7550 Do not ignore InlinedAt while walking up scope chain to find subprogram node.
llvm-svn: 131106
2011-05-09 22:14:49 +00:00
Jim Grosbach
1643ba6894 Tidy up. 80-column and whitespace.
llvm-svn: 131094
2011-05-09 20:05:25 +00:00
Eric Christopher
ba60d3d108 Look through struct wrapped types for inline asm statments.
Patch by Evan Cheng.

llvm-svn: 131093
2011-05-09 20:04:43 +00:00
Dan Gohman
392ab7a6ba Change a few std::maps to DenseMaps.
llvm-svn: 131088
2011-05-09 18:44:09 +00:00
Eric Christopher
49409b8534 Fix td file comments for Mips.
Patch by Liu <proljc@gmail.com>!

llvm-svn: 131086
2011-05-09 18:16:46 +00:00
Mon P Wang
08d3b69861 Fixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for size 32
llvm-svn: 131085
2011-05-09 17:47:27 +00:00
Duncan Sands
afe16d8de1 Indent properly, no functionality change.
llvm-svn: 131082
2011-05-09 08:03:33 +00:00
NAKAMURA Takumi
b8bfce2165 Eliminate an unused line to fix a warning.
llvm-svn: 131078
2011-05-08 23:19:04 +00:00
Jakob Stoklund Olesen
56a5573e6f Remove an assertion to fix PR9872.
It can happen that a live debug variable is the last use of a sub-register, and
the register allocator will pick a larger register class for the virtual
register.  If the allocated register doesn't support the sub-register index,
just use %noreg for the debug variables instead of asserting.

In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD
register. The register is split and one part is inflated to GR32 and assigned
%ESI because there are no more normal uses of sub_8bit_hi.

Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will
simply insert a %noreg instead, and the debug variable will be marked
unavailable in that range.

We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I
don't know if DWARF even supports that.

llvm-svn: 131073
2011-05-08 19:21:08 +00:00
Benjamin Kramer
ba7c9948e8 X86: Add a bunch of peeps for add and sub of SETB.
"b + ((a < b) ? 1 : 0)" compiles into
	cmpl	%esi, %edi
	adcl	$0, %esi
instead of
	cmpl	%esi, %edi
	sbbl	%eax, %eax
	andl	$1, %eax
	addl	%esi, %eax

This saves a register, a false dependency on %eax
(Intel's CPUs still don't ignore it) and it's shorter.

llvm-svn: 131070
2011-05-08 18:36:07 +00:00
Rafael Espindola
0baeced1f4 Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.

llvm-svn: 131067
2011-05-08 14:35:21 +00:00
Eli Friedman
f580be6fe3 PR9869: Add explicit destructor declarations to Operator subclasses, to allow
compiling Operator.h with gcc 4.6 in C++0x mode.

llvm-svn: 131062
2011-05-08 01:59:22 +00:00
Jakob Stoklund Olesen
4a57c64408 Eliminate the ARM sub-register indexes that are not needed by the sources.
Tablegen will invent its own names for these indexes, and the register file is a
bit simpler.

llvm-svn: 131059
2011-05-07 21:22:42 +00:00
Jakob Stoklund Olesen
3bc1816380 Teach TableGen to automatically generate missing SubRegIndex instances.
The RegisterInfo.td file should only specify the indexes that sources need to
refer to. The rest is inferred.

llvm-svn: 131058
2011-05-07 21:22:39 +00:00
Eli Friedman
f608aeaefa Fix comments per Duncan's review.
llvm-svn: 131055
2011-05-07 19:23:14 +00:00
Duncan Sands
77695f14dc The comparision "max(x,y)==x" is equivalent to "x>=y". Since the max is
often expressed as "x >= y ? x : y", there is a good chance we can extract
the existing "x >= y" from it and use that as a replacement for "max(x,y)==x".

llvm-svn: 131049
2011-05-07 16:56:49 +00:00