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

49480 Commits

Author SHA1 Message Date
Bill Wendling
32608b1900 As a first step, emit both the compact unwind and CIE/FDEs for a function.
llvm-svn: 139152
2011-09-06 18:37:11 +00:00
Owen Anderson
ca0326a423 Try again at r138809 (make DSE more aggressive in removing dead stores at the end of a function), now with less deleting stores before memcpy's.
llvm-svn: 139150
2011-09-06 18:14:09 +00:00
Jakob Stoklund Olesen
7994269719 Atomic pseudos don't use (as in read) CPSR. They clobber it.
llvm-svn: 139148
2011-09-06 17:40:35 +00:00
Devang Patel
2c2dd9114e Now, named mdnode llvm.dbg.cu keeps track of all compile units in a module. Update DebugInfoFinder to collect compile units from llvm.dbg.cu.
llvm-svn: 139147
2011-09-06 17:40:08 +00:00
Duncan Sands
6939ae53ac Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC.  While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function.  To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function.  Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!).  Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC.  Patch mostly by Sanjoy Das.

llvm-svn: 139140
2011-09-06 13:37:06 +00:00
Nick Lewycky
e1c0b41d41 Fix typo in comment again.
llvm-svn: 139139
2011-09-06 07:02:40 +00:00
Nick Lewycky
700f71a0ac Apparently we compile the code, not the comments. Thanks Eli!
llvm-svn: 139138
2011-09-06 06:56:00 +00:00
Nick Lewycky
4add6eec38 Fix typo in comment.
llvm-svn: 139137
2011-09-06 06:46:01 +00:00
Nick Lewycky
0c9df5d6c2 Nope! I had it right the first time. Revert the operative part of r139135 and
add more showing of my work.

llvm-svn: 139136
2011-09-06 06:39:54 +00:00
Nick Lewycky
39b165bb7d Fix flipped sign. While there, show my math.
llvm-svn: 139135
2011-09-06 05:33:18 +00:00
Nick Lewycky
fdc650ea7a No no no, fix typo properly!
llvm-svn: 139134
2011-09-06 05:08:09 +00:00
Nick Lewycky
3823432a57 The logic inside getMulExpr to simplify {a,+,b}*{c,+,d} was wrong, which was
visible given a=b=c=d=1, on iteration #1 (the second iteration). Replace it with
correct math. Fixes PR10383!

llvm-svn: 139133
2011-09-06 05:05:14 +00:00
Nick Lewycky
18c0b01a56 Revert r139126 due to selfhost failures reported by buildbots.
llvm-svn: 139130
2011-09-06 02:43:13 +00:00
Nick Lewycky
30dcc754df Teach SCEV to report a max backedge count in one interesting case in
HowFarToZero; the case for a canonical loop.

llvm-svn: 139126
2011-09-05 23:25:16 +00:00
Nick Lewycky
9b5a242546 Add a new MC bit for NaCl (Native Client) mode. NaCl requires that certain
instructions are more aligned than the CPU requires, and adds some additional
directives, to follow in future patches. Patch by David Meyer!

llvm-svn: 139125
2011-09-05 21:51:43 +00:00
Nick Lewycky
cf82a5a673 Update the C++ backend to use the new ArrayRef'ified APIs. Patch by arrowdodger!
llvm-svn: 139124
2011-09-05 18:50:59 +00:00
Nick Lewycky
c10a9bb850 Fix typo in comment.
llvm-svn: 139122
2011-09-05 18:35:03 +00:00
Benjamin Kramer
ec933b857e InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match.
Fixes clang selfhost.

llvm-svn: 139120
2011-09-05 18:16:19 +00:00
Duncan Sands
d883f9f371 Delete trivial landing pads that just continue unwinding the caught
exception.

llvm-svn: 139117
2011-09-05 12:57:57 +00:00
Duncan Sands
a74d10bb60 Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.

llvm-svn: 139113
2011-09-05 06:52:48 +00:00
Benjamin Kramer
0c1a5d2067 Use canonical forms for the branch probability zero heutistic.
- Drop support for X >u 0, it's equivalent to X != 0 and should be canonicalized into the latter.
- Add X < 1 -> unlikely, which is what instcombine canonicalizes X <= 0 into.
- Add X > -1 -> likely, which is what instcombine canonicalizes X >= 0 into.

llvm-svn: 139110
2011-09-04 23:53:04 +00:00
Bill Wendling
0506959970 Use Duncan's patch to delete the instructions in reverse order (minus the landingpad and terminator).
llvm-svn: 139090
2011-09-04 09:43:36 +00:00
Bill Wendling
dbea8de893 The insertion point for the loads is right before the llvm.eh.exception
call. The call may be in the same BB as the landingpad instruction. If that's
the case, then inserting the loads after the landingpad inst, but before the
extractvalues, causes undefined behavior.

llvm-svn: 139088
2011-09-04 09:02:18 +00:00
Benjamin Kramer
902004dcd8 Use internal storage for command line option.
llvm-svn: 139079
2011-09-03 03:45:06 +00:00
Bill Wendling
c273c3f456 Don't reload the values that are already there. The llvm.eh.resume uses the same
values that the resume instruction uses.
PR10850

llvm-svn: 139076
2011-09-03 01:38:17 +00:00
Bruno Cardoso Lopes
02157d584a Add AVX versions to match AESENC/AESDEC intrinsics. This hopefully ends
the cycle of missing AVX counterparts of already present SSE* patterns

llvm-svn: 139073
2011-09-03 00:47:08 +00:00
Bruno Cardoso Lopes
c72ce24240 Add AVX version of a SSE4.1 VPBLENDVB pattern
llvm-svn: 139072
2011-09-03 00:47:05 +00:00
Bruno Cardoso Lopes
a25fc6f941 Add AVX versions of SSE4.1 EXTRACTPS patterns
llvm-svn: 139071
2011-09-03 00:47:03 +00:00
Bruno Cardoso Lopes
45d02d5eca Add AVX versions for SSE4.1 MOVZX* patterns
llvm-svn: 139070
2011-09-03 00:47:01 +00:00
Bruno Cardoso Lopes
cadec3711c Add one more AVX pattern for MOVZPQILo2PQI
llvm-svn: 139069
2011-09-03 00:46:58 +00:00
Bruno Cardoso Lopes
48eeb79003 Move PUNPCKLQDQ splat pattern close to the instruction definition and
duplicate it for AVX mode.

llvm-svn: 139068
2011-09-03 00:46:56 +00:00
Bruno Cardoso Lopes
ca90af60bd Add AVX pattern versions for PSHUFB,PSIGN{B,W,D}
llvm-svn: 139067
2011-09-03 00:46:54 +00:00
Bruno Cardoso Lopes
7fae5ca308 Add AVX versions of MOVZDI2PDI patterns. Use SUBREG_TO_REG to indicate
that the AVX versions (even the 128-bit ones) all clear the upper part
of the destination register.

llvm-svn: 139066
2011-09-03 00:46:51 +00:00
Bruno Cardoso Lopes
e749426ece Enforce subtarget checks in a few places to be explicit when the
pattern should be matched

llvm-svn: 139065
2011-09-03 00:46:49 +00:00
Bruno Cardoso Lopes
323a5b334e Tidy up code moving patterns to their appropriate place!
llvm-svn: 139064
2011-09-03 00:46:47 +00:00
Bruno Cardoso Lopes
ea1931b9d0 Add AVX versions of FsMOVAPS and FsMOVAPS. Teach X86InstrInfo how to use
it!

llvm-svn: 139063
2011-09-03 00:46:45 +00:00
Bruno Cardoso Lopes
eb041875c1 Teach X86FastISel to use AVX versions of instructions when possible
llvm-svn: 139062
2011-09-03 00:46:42 +00:00
Bruno Cardoso Lopes
86c67e11c9 Fix 80-column and style
llvm-svn: 139061
2011-09-03 00:46:40 +00:00
Bruno Cardoso Lopes
beb7a448e7 Tidy up some SSE/AVX convert intrinsics. Also add an AVX version of
OptForSize pattern

llvm-svn: 139060
2011-09-03 00:46:38 +00:00
Owen Anderson
05f809efff Fix a truly heinous bug in DAGCombine related to AssertZext.
If we have a chain of zext -> assert_zext -> zext -> use, the first zext would get simplified away because of the later zext, and then the later zext would get simplified away because of the assert.  The solution is to teach SimplifyDemandedBits that assert_zext demands all of the high bits of its input, rather than only those demanded by its users.  No testcase because the only example I have manifests as llvm-gcc miscompiling LLVM, and I haven't found a smaller case that reproduces this problem.
Fixes <rdar://problem/10063365>.

llvm-svn: 139059
2011-09-03 00:26:49 +00:00
Jakob Stoklund Olesen
ef8527b836 Pseudo CMOV instructions don't clobber EFLAGS.
The explanation about a 0 argument being materialized as xor is no
longer valid.  Rematerialization will check if EFLAGS is live before
clobbering it.

The code produced by X86TargetLowering::EmitLoweredSelect does not
clobber EFLAGS.

This causes one less testb instruction to be generated in the cmov.ll
test case.

llvm-svn: 139057
2011-09-02 23:52:55 +00:00
Jakob Stoklund Olesen
29145a3de1 Check for EFLAGS live-out before clobbering it.
It is only allowed to clobber EFLAGS at the end of a block if it isn't
live-in to any successor.

llvm-svn: 139056
2011-09-02 23:52:52 +00:00
Jakob Stoklund Olesen
6d5d51f687 Use existing function.
llvm-svn: 139055
2011-09-02 23:52:49 +00:00
Jim Grosbach
fb5e64e731 Thumb2 parsing and encoding for BXJ.
llvm-svn: 139053
2011-09-02 23:43:09 +00:00
Jim Grosbach
44483a9ba5 Thumb2 parsing and encoding of B instruction.
Tweak handling of IT blocks a bit to enable this. The differentiation between
B and Bcc needs special sauce.

llvm-svn: 139049
2011-09-02 23:22:08 +00:00
Jakob Stoklund Olesen
c710d8fdc7 Remove unused variables.
llvm-svn: 139047
2011-09-02 22:41:25 +00:00
Eli Friedman
383a3c76b2 Don't fast-isel for atomic load/store; some cases require extra handling missing from fast-isel.
llvm-svn: 139044
2011-09-02 22:33:24 +00:00
Jim Grosbach
ba4ceeaae6 Thumb2 parsing and encoding for ASR.
For other shift and rotate instructions, too. Tests for those forthcoming
as I work my way through the ISA.

llvm-svn: 139040
2011-09-02 21:28:54 +00:00
Andrew Trick
43d88c3879 Comment and clarifying assert.
llvm-svn: 139036
2011-09-02 21:20:46 +00:00
Bill Wendling
e35fdee39e No need to get fancy inserting a PHI node when the values are stored in stack
slots. This fixes a bug where the number of nodes coming into the PHI node may
not equal the number of predecessors. E.g., two or more landingpad instructions
may require a PHI before reaching the eh.exception and eh.selector instructions.

llvm-svn: 139035
2011-09-02 21:17:08 +00:00