oota-llvm.git
13 years agoTrack a retain+release nesting level independently of the
Dan Gohman [Fri, 19 Aug 2011 00:26:36 +0000 (00:26 +0000)]
Track a retain+release nesting level independently of the
known-incremented level, because the two concepts can be used
to prove the saftey of a retain+release removal in different
ways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138016 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntelligently split the landing pad block.
Bill Wendling [Fri, 19 Aug 2011 00:09:22 +0000 (00:09 +0000)]
Intelligently split the landing pad block.

We have to be careful when splitting the landing pad block, because the
landingpad instruction is required to remain as the first non-PHI of an invoke's
unwind edge. To retain this, we split the block into two blocks, moving the
predecessors within the loop to one block and the remaining predecessors to the
other. The landingpad instruction is cloned into the new blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138015 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd SplitLandingPadPredecessors().
Bill Wendling [Fri, 19 Aug 2011 00:05:40 +0000 (00:05 +0000)]
Add SplitLandingPadPredecessors().

SplitLandingPadPredecessors is similar to SplitBlockPredecessors in that it
splits the current block and attaches a set of predecessors to the new basic
block. However, it differs from SplitBlockPredecessors in that it's specifically
designed to handle landing pad blocks.

Two new basic blocks are created: one that is has the vector of predecessors as
its predecessors and one that has the remaining predecessors as its
predecessors. Those two new blocks then receive a cloned copy of the landingpad
instruction from the original block. The landingpad instructions are joined in a
PHI, etc. Like SplitBlockPredecessors, it updates the LLVM IR, AliasAnalysis,
DominatorTree, DominanceFrontier, LoopInfo, and LCCSA analyses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138014 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRe-encoded 128-bit AVX versions of SQRT, RSQRT, RCP have 3 operands
Bruno Cardoso Lopes [Thu, 18 Aug 2011 23:59:21 +0000 (23:59 +0000)]
Re-encoded 128-bit AVX versions of SQRT, RSQRT, RCP have 3 operands
instead of 2. They were already defined this way in their regular
version, but not for the intrinsics versions (*_Int), and that would work
for assembly emission but not for object code, since a MachineOperand
would be missing. This commit fix PR10697.

Also removed the {VSQRT,VRSQRT,VRCP}r_Int forms and match the intrinsic
via INSERT_SUBREG+EXTRACT_SUBREG patterns. The same couldn't be done for
memory versions because sse_load_f32/sse_load_f64 operand need special
handling and don't work like regular "addr" operands.

There are right now 114 "*_Int" and 98 "Int_*" forms! I'm slowly
removing them as I step through, but hope we can get rid of these
someday, they are really annoying :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138012 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThere is no need to add file as context for subroutine type. The subroutine type...
Devang Patel [Thu, 18 Aug 2011 23:50:57 +0000 (23:50 +0000)]
There is no need to add file as context for subroutine type. The subroutine type does not need any context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138010 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd the comments of each declaration follow it, making it easier to read and compare...
Renato Golin [Thu, 18 Aug 2011 23:43:14 +0000 (23:43 +0000)]
add the comments of each declaration follow it, making it easier to read and compare to GCC's result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138009 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse 'getFirstInsertionPt' when trying to insert new instructions during LICM.
Bill Wendling [Thu, 18 Aug 2011 23:42:36 +0000 (23:42 +0000)]
Use 'getFirstInsertionPt' when trying to insert new instructions during LICM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138008 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse subword loads instead of a 4-byte load when the size of a structure (or a
Akira Hatanaka [Thu, 18 Aug 2011 23:39:37 +0000 (23:39 +0000)]
Use subword loads instead of a 4-byte load when the size of a structure (or a
piece of it) that is being passed by value is smaller than a word.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138007 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEliminate unnecessary forwarding function.
Devang Patel [Thu, 18 Aug 2011 23:17:55 +0000 (23:17 +0000)]
Eliminate unnecessary forwarding function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138006 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd NativeClient operating system support.
Ivan Krasin [Thu, 18 Aug 2011 22:54:21 +0000 (22:54 +0000)]
Add NativeClient operating system support.

This patch adds support of NativeClient (*-*-nacl) OS support to LLVM.
It's already supported in autoconf/config.sub.

The motivation for this change is to start upstreaming PNaCl work. The
whole set of patches include llvm backends (i686, x86_64, ARM),
llvm-gcc (probably, would not be upstreamed because it's deprecated)
and clang (the work has been just started, the amount of changes is
going to be low and the most of the work is expected to be done close
to the mainline).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138005 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSTC2L_POST and STC2L_POST should be handled the same as STCL_POST/LDC_POST for the...
Owen Anderson [Thu, 18 Aug 2011 22:47:44 +0000 (22:47 +0000)]
STC2L_POST and STC2L_POST should be handled the same as STCL_POST/LDC_POST for the purposes of decoding all operands except the predicate.
Found by randomized testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138003 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix the decoding of RFE instruction. RFEs have the load bit set, while SRSs have...
Owen Anderson [Thu, 18 Aug 2011 22:31:17 +0000 (22:31 +0000)]
Fix the decoding of RFE instruction.  RFEs have the load bit set, while SRSs have it unset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138000 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd new DIE into the map asap.
Devang Patel [Thu, 18 Aug 2011 22:21:50 +0000 (22:21 +0000)]
Add new DIE into the map asap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137998 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemember to fill in some operands so we can print _something_ coherent even when...
Owen Anderson [Thu, 18 Aug 2011 22:15:25 +0000 (22:15 +0000)]
Remember to fill in some operands so we can print _something_ coherent even when decoding the CPS instruction soft-fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137997 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoImprove handling of failure and unpredictable cases for CPS, STR, and SMLA instructions.
Owen Anderson [Thu, 18 Aug 2011 22:11:02 +0000 (22:11 +0000)]
Improve handling of failure and unpredictable cases for CPS, STR, and SMLA instructions.
Fixes a large class of disassembler crashes found by randomized testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137995 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFastISel: avoid function calls between the materialization of the constant and its...
Ivan Krasin [Thu, 18 Aug 2011 22:06:10 +0000 (22:06 +0000)]
FastISel: avoid function calls between the materialization of the constant and its use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137993 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for LDM instruction.
Jim Grosbach [Thu, 18 Aug 2011 21:50:53 +0000 (21:50 +0000)]
Thumb assembly parsing and encoding for LDM instruction.

Fix base register type and canonicallize to the "ldm" spelling rather than
"ldmia." Add diagnostics for incorrect writeback token and out-of-range
registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137986 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake it clear that this code is iterating in reverse order through the array.
Dan Gohman [Thu, 18 Aug 2011 21:27:42 +0000 (21:27 +0000)]
Make it clear that this code is iterating in reverse order through the array.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137985 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate autoconfig/config.{sub,guess} to the latest version
Ivan Krasin [Thu, 18 Aug 2011 21:23:18 +0000 (21:23 +0000)]
Update autoconfig/config.{sub,guess} to the latest version
from the GNU upstream: git://git.savannah.gnu.org/config.git

1. It eliminates a local LLVM patch for auroraux (because, the
mainline config.sub has already got support of auroraux)
2. It adds several new recognized target cpus and operating systems
(in particular, PNaCl)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137984 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r137871. The loop simplify pass should require all exits from a loop that
Bill Wendling [Thu, 18 Aug 2011 21:10:01 +0000 (21:10 +0000)]
Revert r137871. The loop simplify pass should require all exits from a loop that
aren't from an indirect branch need to be dominated by the loop header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137981 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSplit out the updating of PHI nodes after splitting the BB into a separate
Bill Wendling [Thu, 18 Aug 2011 20:51:04 +0000 (20:51 +0000)]
Split out the updating of PHI nodes after splitting the BB into a separate
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137979 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse this fantzy ArrayRef thing to pass in the list of predecessors.
Bill Wendling [Thu, 18 Aug 2011 20:39:32 +0000 (20:39 +0000)]
Use this fantzy ArrayRef thing to pass in the list of predecessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137978 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake IsShiftedMask a static function rather than defining it in an
Akira Hatanaka [Thu, 18 Aug 2011 20:07:42 +0000 (20:07 +0000)]
Make IsShiftedMask a static function rather than defining it in an
anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137975 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMore Thumb1 decoding tests.
Owen Anderson [Thu, 18 Aug 2011 20:05:06 +0000 (20:05 +0000)]
More Thumb1 decoding tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137974 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThe edge from DISubprogram to DICompileUnit has been removed in recent versions
Nick Lewycky [Thu, 18 Aug 2011 19:07:42 +0000 (19:07 +0000)]
The edge from DISubprogram to DICompileUnit has been removed in recent versions
of debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137972 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd another test.
Devang Patel [Thu, 18 Aug 2011 18:50:25 +0000 (18:50 +0000)]
Add another test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137969 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd test to check type uniquing.
Devang Patel [Thu, 18 Aug 2011 18:40:49 +0000 (18:40 +0000)]
Add test to check type uniquing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137968 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for EOR.
Jim Grosbach [Thu, 18 Aug 2011 18:10:38 +0000 (18:10 +0000)]
Thumb assembly parsing and encoding for EOR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137964 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for CMP.
Jim Grosbach [Thu, 18 Aug 2011 18:08:29 +0000 (18:08 +0000)]
Thumb assembly parsing and encoding for CMP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137963 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTest commit; adding test for invalid LDRD which was part of the patch for r137647...
James Molloy [Thu, 18 Aug 2011 18:03:02 +0000 (18:03 +0000)]
Test commit; adding test for invalid LDRD which was part of the patch for r137647 but seemingly didn't get svn add'ed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137960 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse static instead of anonymous namespace.
Bill Wendling [Thu, 18 Aug 2011 17:57:57 +0000 (17:57 +0000)]
Use static instead of anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137959 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding test for CMN.
Jim Grosbach [Thu, 18 Aug 2011 17:55:03 +0000 (17:55 +0000)]
Thumb assembly parsing and encoding test for CMN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137957 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb instructions CBZ and CBNZ are Thumb2, not THumb1.
Jim Grosbach [Thu, 18 Aug 2011 17:51:36 +0000 (17:51 +0000)]
Thumb instructions CBZ and CBNZ are Thumb2, not THumb1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137956 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPort over BL/BLX to disassembly tests.
Owen Anderson [Thu, 18 Aug 2011 17:43:52 +0000 (17:43 +0000)]
Port over BL/BLX to disassembly tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137954 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRip out the old StructType APIs as warned about on llvmdev last week.
Chris Lattner [Thu, 18 Aug 2011 17:39:28 +0000 (17:39 +0000)]
Rip out the old StructType APIs as warned about on llvmdev last week.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137953 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM assembly parsing and encoding test for BX/BLX (register).
Jim Grosbach [Thu, 18 Aug 2011 17:02:28 +0000 (17:02 +0000)]
ARM assembly parsing and encoding test for BX/BLX (register).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137949 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM assembly parsing and encoding test for BL/BLX (immediate).
Jim Grosbach [Thu, 18 Aug 2011 17:00:09 +0000 (17:00 +0000)]
ARM assembly parsing and encoding test for BL/BLX (immediate).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137948 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM Thumb blx instruction fixup has same data range as bl.
Jim Grosbach [Thu, 18 Aug 2011 16:57:50 +0000 (16:57 +0000)]
ARM Thumb blx instruction fixup has same data range as bl.

These fixups are handled poorly in general, and should have a single
contiguous range of bits per fixup type, but that's not how they're
currently organized, so for now in complex ones like for blx, we just tell the
emitter it's OK for the fixup to munge any bit it wants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137947 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago80 columns.
Jim Grosbach [Thu, 18 Aug 2011 16:50:45 +0000 (16:50 +0000)]
80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137946 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoClenup and fix encoding for Mips ins and ext instruction
Bruno Cardoso Lopes [Thu, 18 Aug 2011 16:30:49 +0000 (16:30 +0000)]
Clenup and fix encoding for Mips ins and ext instruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137943 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing 'break'.
Jim Grosbach [Thu, 18 Aug 2011 16:08:39 +0000 (16:08 +0000)]
Add missing 'break'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137941 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd intrinsics for SETEV, GETED, GETET.
Richard Osborne [Thu, 18 Aug 2011 13:00:48 +0000 (13:00 +0000)]
Add intrinsics for SETEV, GETED, GETET.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137938 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unused variable.
Duncan Sands [Thu, 18 Aug 2011 08:13:18 +0000 (08:13 +0000)]
Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137933 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSplit out the analysis updating code into a helper function. No intended
Bill Wendling [Thu, 18 Aug 2011 05:25:23 +0000 (05:25 +0000)]
Split out the analysis updating code into a helper function. No intended
functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137926 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCleanup vector logical ops in AVX and add use int versions for simple
Bruno Cardoso Lopes [Thu, 18 Aug 2011 02:11:34 +0000 (02:11 +0000)]
Cleanup vector logical ops in AVX and add use int versions for simple
v2i64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137919 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFixed compilation warning on Linux by fixing the type of a return value.
John Criswell [Thu, 18 Aug 2011 01:19:05 +0000 (01:19 +0000)]
Fixed compilation warning on Linux by fixing the type of a return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137913 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDramatically speedup codegen prepare by a) avoiding use of dominator tree and b)...
Devang Patel [Thu, 18 Aug 2011 00:50:51 +0000 (00:50 +0000)]
Dramatically speedup codegen prepare by a) avoiding use of dominator tree and b) doing a separate pass over dbg.value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137908 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPort new Thumb1 encoding tests over to decoding tests.
Owen Anderson [Wed, 17 Aug 2011 23:37:33 +0000 (23:37 +0000)]
Port new Thumb1 encoding tests over to decoding tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137902 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove extraneous newline from operand print method. PR10569.
Jim Grosbach [Wed, 17 Aug 2011 23:23:07 +0000 (23:23 +0000)]
Remove extraneous newline from operand print method. PR10569.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137900 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM assembly parsing and encoding test for BKPT.
Jim Grosbach [Wed, 17 Aug 2011 23:11:13 +0000 (23:11 +0000)]
ARM assembly parsing and encoding test for BKPT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137898 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoClean up patterns for Thumb1 system instructions.
Jim Grosbach [Wed, 17 Aug 2011 23:08:57 +0000 (23:08 +0000)]
Clean up patterns for Thumb1 system instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137897 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM assembly parsing and encoding test for BIC.
Jim Grosbach [Wed, 17 Aug 2011 23:00:53 +0000 (23:00 +0000)]
ARM assembly parsing and encoding test for BIC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137895 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChanged definition of EXT and INS per Bruno's comments.
Akira Hatanaka [Wed, 17 Aug 2011 22:59:46 +0000 (22:59 +0000)]
Changed definition of EXT and INS per Bruno's comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137892 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for B.
Jim Grosbach [Wed, 17 Aug 2011 22:57:40 +0000 (22:57 +0000)]
Thumb assembly parsing and encoding for B.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137891 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDo not use DebugInfoFinder. Extract debug info directly from llvm.dbg.cu named mdnode.
Devang Patel [Wed, 17 Aug 2011 22:49:38 +0000 (22:49 +0000)]
Do not use DebugInfoFinder. Extract debug info directly from llvm.dbg.cu named mdnode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137890 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for ASR.
Jim Grosbach [Wed, 17 Aug 2011 22:49:09 +0000 (22:49 +0000)]
Thumb assembly parsing and encoding for ASR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137889 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAtomic load/store handling for the passes using memdep (GVN, DSE, memcpyopt).
Eli Friedman [Wed, 17 Aug 2011 22:22:24 +0000 (22:22 +0000)]
Atomic load/store handling for the passes using memdep (GVN, DSE, memcpyopt).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137888 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix PR10688. Add support for spliting 256-bit vector shifts when the
Bruno Cardoso Lopes [Wed, 17 Aug 2011 22:12:20 +0000 (22:12 +0000)]
Fix PR10688. Add support for spliting 256-bit vector shifts when the
shift amount is variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137885 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up. 80 columns.
Jim Grosbach [Wed, 17 Aug 2011 21:58:18 +0000 (21:58 +0000)]
Tidy up. 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137881 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd the support in code-gen for the landingpad instruction lowering.
Bill Wendling [Wed, 17 Aug 2011 21:56:44 +0000 (21:56 +0000)]
Add the support in code-gen for the landingpad instruction lowering.

The landingpad instruction is lowered into the EXCEPTIONADDR and EHSELECTION
SDNodes. The information from the landingpad instruction is harvested by the
'AddLandingPadInfo' function. The new EH uses the current EH scheme in the
back-end. This will change once we switch over to the new scheme. (Reviewed by
Jakob!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137880 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM clean up the imm_sr operand class representation.
Jim Grosbach [Wed, 17 Aug 2011 21:51:27 +0000 (21:51 +0000)]
ARM clean up the imm_sr operand class representation.

Represent the operand value as it will be encoded in the instruction. This
allows removing the specialized encoder and decoder methods entirely. Add
an assembler match class while we're at it to lay groundwork for parsing the
thumb shift instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137879 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable PRE for landing pads.
Bill Wendling [Wed, 17 Aug 2011 21:32:02 +0000 (21:32 +0000)]
Disable PRE for landing pads.

PRE needs the landing pads to have their critical edges split. Doing this for a
landing pad is non-trivial. Abandon the attempt to perform PRE when we come
across a landing pad. (Reviewed by Owen!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137876 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert patch. Forgot a dependent commit.
Bill Wendling [Wed, 17 Aug 2011 21:28:05 +0000 (21:28 +0000)]
Revert patch. Forgot a dependent commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137875 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd the body of 'visitLandingPad'.
Bill Wendling [Wed, 17 Aug 2011 21:25:14 +0000 (21:25 +0000)]
Add the body of 'visitLandingPad'.

This generates the SDNodes for the new exception handling scheme. It takes the
two values coming from the landingpad instruction and assigns them to the
EXCEPTIONADDR and EHSELECTION nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137873 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIncrement the insertion iterator to beyond the landingpad instruction.
Bill Wendling [Wed, 17 Aug 2011 21:21:31 +0000 (21:21 +0000)]
Increment the insertion iterator to beyond the landingpad instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137872 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't optimize the landing pad exit block.
Bill Wendling [Wed, 17 Aug 2011 21:20:43 +0000 (21:20 +0000)]
Don't optimize the landing pad exit block.

One way to exit the loop is through an unwind edge. However, that may involve
splitting the critical edge of the landing pad, which is non-trivial. Prevent
the transformation from rewriting the landing pad exit loop block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137871 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAssert that we aren't trying to split the critical edge of a landing pad. Doing
Bill Wendling [Wed, 17 Aug 2011 21:04:05 +0000 (21:04 +0000)]
Assert that we aren't trying to split the critical edge of a landing pad. Doing
so requires more care than this generic algorithm should handle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137866 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix predicate for imm1_32
Jim Grosbach [Wed, 17 Aug 2011 21:01:11 +0000 (21:01 +0000)]
Fix predicate for imm1_32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137865 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for ADR.
Jim Grosbach [Wed, 17 Aug 2011 20:37:40 +0000 (20:37 +0000)]
Thumb assembly parsing and encoding for ADR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137864 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r137655. There is some question about whether the 'landingpad'
Bill Wendling [Wed, 17 Aug 2011 20:36:44 +0000 (20:36 +0000)]
Revert r137655. There is some question about whether the 'landingpad'
instruction should be marked as potentially reading and/or writing memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137863 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a couple of FIXMEs.
Jim Grosbach [Wed, 17 Aug 2011 20:35:57 +0000 (20:35 +0000)]
Add a couple of FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137861 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago80 columns.
Jim Grosbach [Wed, 17 Aug 2011 19:55:51 +0000 (19:55 +0000)]
80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137857 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up.
Jim Grosbach [Wed, 17 Aug 2011 19:53:53 +0000 (19:53 +0000)]
Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137856 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoModify for the new EH scheme.
Bill Wendling [Wed, 17 Aug 2011 19:48:49 +0000 (19:48 +0000)]
Modify for the new EH scheme.

Things are much saner now. We no longer need to modify the laning pads, because
of the invariants we impose upon them. The only thing DwarfEHPrepare needs to do
is convert the 'resume' instruction into a call to '_Unwind_Resume'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137855 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unneeded sentence.
Bill Wendling [Wed, 17 Aug 2011 19:33:27 +0000 (19:33 +0000)]
Remove unneeded sentence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137854 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r137781; I agree with Duncan's comment that the situation in question is clear...
Eli Friedman [Wed, 17 Aug 2011 19:31:49 +0000 (19:31 +0000)]
Revert r137781; I agree with Duncan's comment that the situation in question is clearly impossible given the current structure of the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137853 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for half-word unaligned loads and stores.
Akira Hatanaka [Wed, 17 Aug 2011 18:49:18 +0000 (18:49 +0000)]
Add support for half-word unaligned loads and stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137848 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix test case.
Devang Patel [Wed, 17 Aug 2011 18:48:28 +0000 (18:48 +0000)]
Fix test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137847 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove superficial test.
Devang Patel [Wed, 17 Aug 2011 18:39:13 +0000 (18:39 +0000)]
Remove superficial test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137846 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRobustify test.
Devang Patel [Wed, 17 Aug 2011 18:38:44 +0000 (18:38 +0000)]
Robustify test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137845 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoStatic fields require an out-of-line definition. Fix DynamicLibrary for real.
Jordy Rose [Wed, 17 Aug 2011 18:38:42 +0000 (18:38 +0000)]
Static fields require an out-of-line definition. Fix DynamicLibrary for real.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137844 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago...and make sure DynamicLibrary builds by removing "const" from the Invalid placeholder.
Jordy Rose [Wed, 17 Aug 2011 18:28:14 +0000 (18:28 +0000)]
...and make sure DynamicLibrary builds by removing "const" from the Invalid placeholder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137843 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't use NULL to represent an invalid library; Cygwin uses this for RTLD_DEFAULT...
Jordy Rose [Wed, 17 Aug 2011 18:23:17 +0000 (18:23 +0000)]
Don't use NULL to represent an invalid library; Cygwin uses this for RTLD_DEFAULT. Caught by Takumi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137841 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoStart building a Thumb1 decoding test file based on the Thumb1 parsing/encoding test...
Owen Anderson [Wed, 17 Aug 2011 18:21:36 +0000 (18:21 +0000)]
Start building a Thumb1 decoding test file based on the Thumb1 parsing/encoding test file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137840 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoBe more careful in the Thumb decoder hooks to avoid walking off the end of the OpInfo...
Owen Anderson [Wed, 17 Aug 2011 18:14:48 +0000 (18:14 +0000)]
Be more careful in the Thumb decoder hooks to avoid walking off the end of the OpInfo array.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137838 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSilly mistake from r137777; restore significant isStructTy() checks. While here...
Eli Friedman [Wed, 17 Aug 2011 18:10:43 +0000 (18:10 +0000)]
Silly mistake from r137777; restore significant isStructTy() checks.  While here, be a bit more defensive
with unknown instructions.

Fixes PR10687.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137836 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb assembly parsing and encoding for ADC(register) instruction.
Jim Grosbach [Wed, 17 Aug 2011 17:55:28 +0000 (17:55 +0000)]
Thumb assembly parsing and encoding for ADC(register) instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137833 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing '@' delimiter.
Jim Grosbach [Wed, 17 Aug 2011 17:46:01 +0000 (17:46 +0000)]
Add missing '@' delimiter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137832 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove pattern matching for EXT and INS to post-legalization DAGCombine per Bruno's...
Akira Hatanaka [Wed, 17 Aug 2011 17:45:08 +0000 (17:45 +0000)]
Move pattern matching for EXT and INS to post-legalization DAGCombine per Bruno's comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137831 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAllow the MCDisassembler to return a "soft fail" status code, indicating an instructi...
Owen Anderson [Wed, 17 Aug 2011 17:44:15 +0000 (17:44 +0000)]
Allow the MCDisassembler to return a "soft fail" status code, indicating an instruction that is disassemblable, but invalid.  Only used for ARM UNPREDICTABLE instructions at the moment.
Patch by James Molloy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137830 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntroduce matching patterns for vbroadcast AVX instruction. The idea is to
Bruno Cardoso Lopes [Wed, 17 Aug 2011 02:29:19 +0000 (02:29 +0000)]
Introduce matching patterns for vbroadcast AVX instruction. The idea is to
match splats in the form (splat (scalar_to_vector (load ...))) whenever
the load can be folded. All the logic and instruction emission is
working but because of PR8156, there are no ways to match loads, cause
they can never be folded for splats. Thus, the tests are XFAILed, but
I've tested and exercised all the logic using a relaxed version for
checking the foldable loads, as if the bug was already fixed. This
should work out of the box once PR8156 gets fixed since MayFoldLoad will
work as expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137810 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate test to not use the scalar type to splat from a load
Bruno Cardoso Lopes [Wed, 17 Aug 2011 02:29:15 +0000 (02:29 +0000)]
Update test to not use the scalar type to splat from a load

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137809 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate comments about vector splat handling in x86
Bruno Cardoso Lopes [Wed, 17 Aug 2011 02:29:13 +0000 (02:29 +0000)]
Update comments about vector splat handling in x86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137808 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoNow that we have a canonical way to handle 256-bit splats:
Bruno Cardoso Lopes [Wed, 17 Aug 2011 02:29:10 +0000 (02:29 +0000)]
Now that we have a canonical way to handle 256-bit splats:
vinsertf128 $1 + vpermilps $0, remove the old code that used to first
do the splat in a 128-bit vector and then insert it into a larger one.
This is better because the handling code gets simpler and also makes a
better room for the upcoming vbroadcast!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137807 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate uwtable vim color!
Bruno Cardoso Lopes [Wed, 17 Aug 2011 02:29:07 +0000 (02:29 +0000)]
Update uwtable vim color!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137806 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for ext and ins.
Akira Hatanaka [Wed, 17 Aug 2011 02:05:42 +0000 (02:05 +0000)]
Add support for ext and ins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137804 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCMake: [MSVC] Suppress C4551 'function call missing argument list'.
NAKAMURA Takumi [Wed, 17 Aug 2011 01:28:30 +0000 (01:28 +0000)]
CMake: [MSVC] Suppress C4551 'function call missing argument list'.

(void)static_func; it is used as idiom in llvm source tree to suppress "Unused static function" warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137800 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUnbork Windows build. Thanks, Francois.
Jordy Rose [Wed, 17 Aug 2011 00:59:50 +0000 (00:59 +0000)]
Unbork Windows build. Thanks, Francois.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137798 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse DynamicLibrary instances as a way to get symbols from a specific library. Prepara...
Jordy Rose [Wed, 17 Aug 2011 00:29:32 +0000 (00:29 +0000)]
Use DynamicLibrary instances as a way to get symbols from a specific library. Preparation for upcoming (preliminary) support for plugins for the static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137791 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb ADD(immediate) parsing support.
Jim Grosbach [Tue, 16 Aug 2011 23:57:34 +0000 (23:57 +0000)]
Thumb ADD(immediate) parsing support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137788 91177308-0d34-0410-b5e6-96231b3b80d8