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

49008 Commits

Author SHA1 Message Date
Devang Patel
9ea2ce9b7b Fix warning.
llvm-svn: 137658
2011-08-15 21:35:16 +00:00
Devang Patel
1113107823 Simplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
llvm-svn: 137656
2011-08-15 21:24:36 +00:00
Bill Wendling
a75d2d0416 Duncan pointed out that the LandingPadInst might read memory. (It might also
write to memory.) Marking it as such makes some checks for immobility go away.

llvm-svn: 137655
2011-08-15 21:14:31 +00:00
Eli Friedman
b25f5aeda5 Fix llvm::CloneModule to correctly clone globals. Patch per bug report by Simon Moll on llvmdev.
llvm-svn: 137654
2011-08-15 21:05:06 +00:00
Eli Friedman
bfebfae6f6 Fix predicates methods on Instruction to handle atomic load/store correctly.
llvm-svn: 137652
2011-08-15 21:00:18 +00:00
Eli Friedman
5acfaeab2d Misc analysis passes that need to be aware of atomic load/store.
llvm-svn: 137650
2011-08-15 20:54:19 +00:00
Eli Friedman
e18709e5b2 Atomic load/store support in LICM.
llvm-svn: 137648
2011-08-15 20:52:09 +00:00
Owen Anderson
42946000dd Enforce the constraint that Rt must be even on LDRD/STRD instructions in ARM mode. Update tests to reflect this fact.
Patch by James Molloy.

llvm-svn: 137647
2011-08-15 20:51:32 +00:00
Owen Anderson
f86afc2459 Remove dead classes.
llvm-svn: 137643
2011-08-15 20:11:11 +00:00
Bill Wendling
0c8837a1f1 The "landingpad" instruction will never be "trivially" dead.
llvm-svn: 137642
2011-08-15 20:10:51 +00:00
Owen Anderson
4854258d9c Fix incorrect encoding of UMAAL and friends. Patch by James Molloy.
llvm-svn: 137641
2011-08-15 20:08:25 +00:00
Devang Patel
7e0fc7cf86 Simplify mapping to variable from its abstract variable info.
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.

llvm-svn: 137637
2011-08-15 19:01:20 +00:00
Owen Anderson
cd94fca93d Fix decoding LDRSB and LDRSH in Thumb1 mode. Patch by James Molloy.
llvm-svn: 137636
2011-08-15 19:00:06 +00:00
Owen Anderson
894585de33 Fix problems decoding the to/from-lane NEON memory instructions, and add a comprehensive NEON decoding testcase.
llvm-svn: 137635
2011-08-15 18:44:44 +00:00
Devang Patel
2b6f546226 Refactor.
llvm-svn: 137632
2011-08-15 18:40:16 +00:00
Devang Patel
84b2564244 Refactor.
llvm-svn: 137631
2011-08-15 18:35:42 +00:00
Bill Wendling
a8d6570a7a Don't try to sink the landingpad instruction. It's immobile.
llvm-svn: 137629
2011-08-15 18:23:40 +00:00
Bill Wendling
8cc5168e87 The landingpad instruction isn't loop-invariant.
llvm-svn: 137628
2011-08-15 18:22:49 +00:00
Bill Wendling
b0c5dd0ebd Mark the SCC as "might unwind" if we run into a 'resume' instruction.
llvm-svn: 137627
2011-08-15 18:22:00 +00:00
Bill Wendling
a5dc9de3c4 Skip the insertion iterator past the landingpad instruction if there.
llvm-svn: 137626
2011-08-15 18:21:07 +00:00
Devang Patel
1b73744344 Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.
llvm-svn: 137621
2011-08-15 17:57:41 +00:00
Devang Patel
ec9a83977b Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
llvm-svn: 137618
2011-08-15 17:24:54 +00:00
Jim Grosbach
b2b673661a Update comment to reflect MC target machine refactor.
llvm-svn: 137615
2011-08-15 16:52:24 +00:00
Bill Wendling
e4ea267524 Add inlining for the new EH scheme.
This builds off of the current scheme, but instead of llvm.eh.exception and
llvm.eh.selector, it uses the landingpad instruction. And instead of
llvm.eh.resume, it uses the resume instruction.

Because of the invariants in the landing pad instruction, a lot of code that's
currently needed to find the appropriate intrinsic calls for an invoke
instruction won't be needed once we go to the new EH scheme. The "FIXME"s tell
us what to remove after we switch.

llvm-svn: 137576
2011-08-14 08:01:36 +00:00
Nick Lewycky
e020632f7e This transform is not safe. Thanks to Eli for pointing that out!
llvm-svn: 137575
2011-08-14 04:51:49 +00:00
Nick Lewycky
0326303a7a Don't attempt to add 'nsw' when intermediate instructions had no such guarantee.
llvm-svn: 137572
2011-08-14 03:41:33 +00:00
Nick Lewycky
b6a9488190 Teach instcombine to preserve the nsw bit by doing an after-the-fact analysis
when combining add and sub instructions. Patch by Pranav Bhandarkar!

llvm-svn: 137570
2011-08-14 01:45:19 +00:00
NAKAMURA Takumi
89d778eb47 EE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.
With libcxx, it seems <unistd.h> would not be provided. Thanks to Ryuta Suzuki.

llvm-svn: 137567
2011-08-14 00:34:04 +00:00
Nadav Rotem
9a776ed9cd Fix PR 10635. When generating integer constants, the constant element type may
be illegal, even if the requested vector type is legal. Testcase is one of the
disabled ARM tests in the vector-select patch.

llvm-svn: 137562
2011-08-13 20:31:45 +00:00
Bob Wilson
90799621b3 Expand VMOVQQQQ pseudo instructions.
Apparently we never added code to expand these pseudo instructions, and in
over a year, no one has noticed.  Our register allocator must be awesome!

llvm-svn: 137551
2011-08-13 05:14:55 +00:00
Nick Lewycky
5b5b31917d Remove the last improper use of getGlobalContext() from LLVM.
This caused a race condition where a thread calls ~LLVMContextImpl which calls
Module::dropAllReferences which calls begin() on an empty ilist that would
create the sentinel, which racily accesses the global context.

This can not be fixed by locking inside createSentinel because the lock would
need to be shared with all users of the global context, including those that
reside outside LLVM's own code.

llvm-svn: 137546
2011-08-13 01:04:44 +00:00
Eli Friedman
baf0f69f9a Move "atomic" and "volatile" designations on instructions after the opcode
of the instruction.

Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.

llvm-svn: 137527
2011-08-12 22:50:01 +00:00
Jim Grosbach
4b198ae6d5 ARM STR_POST_IMM offset encoding fix in load/store optimizer.
Tidy up the code a bit and push the definition of the value next to the uses
to try to minimize this sort of issue from arising again while I'm at it.

rdar://9945172

llvm-svn: 137525
2011-08-12 22:20:41 +00:00
Bruno Cardoso Lopes
8bdbc680ea Fix comment!
llvm-svn: 137521
2011-08-12 21:54:42 +00:00
Bruno Cardoso Lopes
2d100ca13c The VPERM2F128 is a AVX instruction which permutes between two 256-bit
vectors. It operates on 128-bit elements instead of regular scalar
types. Recognize shuffles that are suitable for VPERM2F128 and teach
the x86 legalizer how to handle them.

llvm-svn: 137519
2011-08-12 21:48:26 +00:00
Bruno Cardoso Lopes
17ae896095 Move code around and add comments
llvm-svn: 137518
2011-08-12 21:48:22 +00:00
Akira Hatanaka
c9c0190cbe Define unaligned load and store.
llvm-svn: 137515
2011-08-12 21:30:06 +00:00
Jim Grosbach
2e48dbda92 ARM expansion of pre-indexed store pseudos should maintain memoperands.
Partial fix for rdar://9945172.

llvm-svn: 137513
2011-08-12 21:02:34 +00:00
Bill Wendling
f57d39d13d Add checks for the landingpad instruction's clause values to make sure that
they're the correct type.

llvm-svn: 137511
2011-08-12 20:52:25 +00:00
Owen Anderson
2ea55a0881 Fix some remaining issues with decoding ARM-mode memory instructions, and add another batch of tests.
llvm-svn: 137502
2011-08-12 20:36:11 +00:00
Bill Wendling
4cbbcd4f82 Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.

llvm-svn: 137501
2011-08-12 20:24:12 +00:00
Owen Anderson
7b426d97ad Fix decoding of ARM-mode STRH.
llvm-svn: 137499
2011-08-12 20:02:50 +00:00
Owen Anderson
9162ba81cf Specify fixed bit in the LDRBT encoding, which allows us to distinguish it from certain USAT16 encodings.
llvm-svn: 137494
2011-08-12 19:41:29 +00:00
Owen Anderson
322b9ce8bf Fix decoding of pre-indexed stores.
llvm-svn: 137487
2011-08-12 18:12:39 +00:00
Devang Patel
5901733259 Use ArrayRef.
llvm-svn: 137485
2011-08-12 18:10:19 +00:00
Akira Hatanaka
5706262bc2 When constant double 0.0 is lowered, make sure 0 is copied directly from an
integer register to a floating point register. It is not valid to interpret
the value of a floating pointer register as part of a double precision
floating point value after a single precision floating point computational
or move instruction stores its result to the register.

- In the test case, the following code is generated before this patch is
  applied:
mtc1  $zero, $f2    ; unformatted copy to $f2
mov.s $f0, $f2      ; $f0 is in single format
sdc1  $f12, 0($sp)
mov.s $f1, $f2      ; $f1 is in single format
c.eq.d  $f12, $f0   ; $f0 cannot be interpreted as double

- The following code is generated after this patch is applied:
mtc1  $zero, $f0    ; unformatted copy to $f0
mtc1  $zero, $f1    ; unformatted copy to $f1
c.eq.d  $f12, $f0   ; $f0 can be interpreted as double

Bhanu Chetlapalli and Chris Dearman at MIPS technologies reported this bug and
provided the test case.

llvm-svn: 137484
2011-08-12 18:09:59 +00:00
Chris Lattner
d297c1dd99 add ifdef's to let people easily remove these dead api for testing.
llvm-svn: 137483
2011-08-12 18:08:19 +00:00
Chris Lattner
92ac219e38 switch to the new struct api.
llvm-svn: 137482
2011-08-12 18:07:26 +00:00
Chris Lattner
109982ca44 switch to the new struct apis.
llvm-svn: 137481
2011-08-12 18:07:07 +00:00
Chris Lattner
ef56f8992d switch to use the new api for structtypes.
llvm-svn: 137480
2011-08-12 18:06:37 +00:00