oota-llvm.git
12 years agoTeach MachineLICM reg pressure tracking code to deal with MVT::untyped. Sorry, I...
Evan Cheng [Thu, 1 Sep 2011 01:45:00 +0000 (01:45 +0000)]
Teach MachineLICM reg pressure tracking code to deal with MVT::untyped. Sorry, I can't come up with a small test case. rdar://10043690

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

12 years agoUpdate to new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 01:28:25 +0000 (01:28 +0000)]
Update to new EH scheme.

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

12 years agoResubmit with fix. Properly remove the instructions except for landingpad, which...
Bill Wendling [Thu, 1 Sep 2011 01:28:11 +0000 (01:28 +0000)]
Resubmit with fix. Properly remove the instructions except for landingpad, which should be removed only when its invokes are.

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

12 years agoSubmitted this too early.
Bill Wendling [Thu, 1 Sep 2011 01:18:33 +0000 (01:18 +0000)]
Submitted this too early.

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

12 years agoDon't DCE the landingpad instruction.
Bill Wendling [Thu, 1 Sep 2011 01:16:58 +0000 (01:16 +0000)]
Don't DCE the landingpad instruction.

The landingpad instruction can be removed only when its invokes are removed.

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

12 years agoUpdate to new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 01:08:21 +0000 (01:08 +0000)]
Update to new EH scheme.

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

12 years agoUpdate to new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 01:02:41 +0000 (01:02 +0000)]
Update to new EH scheme.

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

12 years agoUpdate some tests to the new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 00:58:03 +0000 (00:58 +0000)]
Update some tests to the new EH scheme.

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

12 years agoPreRA scheduler should avoid cloning compares.
Andrew Trick [Thu, 1 Sep 2011 00:54:31 +0000 (00:54 +0000)]
PreRA scheduler should avoid cloning compares.

Added canClobberReachingPhysRegUse() to handle a particular pattern in
which a two-address instruction could be forced to interfere with
EFLAGS, causing a compare to be unnecessarilly cloned.
Fixes rdar://problem/5875261

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

12 years agoDon't forget to add the landingpad and resume instructions to the InstructionList.
Bill Wendling [Thu, 1 Sep 2011 00:50:20 +0000 (00:50 +0000)]
Don't forget to add the landingpad and resume instructions to the InstructionList.

This was found via a nightly build of 483.xalancbmk.

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

12 years agoThumb2 assembly parsing and encoding for ADD(immediate).
Jim Grosbach [Thu, 1 Sep 2011 00:28:52 +0000 (00:28 +0000)]
Thumb2 assembly parsing and encoding for ADD(immediate).

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

12 years agoFixup for functions that return a bool.
Chad Rosier [Wed, 31 Aug 2011 23:49:05 +0000 (23:49 +0000)]
Fixup for functions that return a bool.

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

12 years agoReenable test.
Bill Wendling [Wed, 31 Aug 2011 23:08:05 +0000 (23:08 +0000)]
Reenable test.

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

12 years agoRevert accidental commit
Bill Wendling [Wed, 31 Aug 2011 23:07:46 +0000 (23:07 +0000)]
Revert accidental commit

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

12 years agoDisable this test until Bill fixes it properly.
Eli Friedman [Wed, 31 Aug 2011 23:03:30 +0000 (23:03 +0000)]
Disable this test until Bill fixes it properly.

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

12 years agoStatic relocation model Thumb jump table interworking.
Jim Grosbach [Wed, 31 Aug 2011 22:23:09 +0000 (22:23 +0000)]
Static relocation model Thumb jump table interworking.

Make sure the low bit of the PC is set when loading an address directly
for jump tables in static relocation model.

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

12 years agoThe asm parser currently selects the wrong encoding for non-conditional Thumb2 branch...
Owen Anderson [Wed, 31 Aug 2011 22:00:41 +0000 (22:00 +0000)]
The asm parser currently selects the wrong encoding for non-conditional Thumb2 branches.  However, this exposed a number of situations where the decoder was too permissive in allowing invalid instructions to decode successful.  Specify additional fixed bits to close those gaps.

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

12 years agoUpdate to new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:50:07 +0000 (21:50 +0000)]
Update to new EH scheme.

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

12 years agoUpdate to new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:44:24 +0000 (21:44 +0000)]
Update to new EH scheme.

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

12 years agoRemove old declare statements.
Bill Wendling [Wed, 31 Aug 2011 21:41:20 +0000 (21:41 +0000)]
Remove old declare statements.

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

12 years agoUpdate more tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:40:15 +0000 (21:40 +0000)]
Update more tests to the new EH scheme.

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

12 years agoUpdate more tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:39:05 +0000 (21:39 +0000)]
Update more tests to the new EH scheme.

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

12 years agoAdd tests for the transformations SCCP can do on atomic loads and stores (which are...
Eli Friedman [Wed, 31 Aug 2011 21:37:06 +0000 (21:37 +0000)]
Add tests for the transformations SCCP can do on atomic loads and stores (which are safe without any modifications).

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

12 years agoFix Size Typing
David Greene [Wed, 31 Aug 2011 21:34:20 +0000 (21:34 +0000)]
Fix Size Typing

Stores sizes as uint64_t to avoid possible truncation.

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

12 years agoRevert r138894. This was failing on cmake-clang-i686-msvc10.
Bill Wendling [Wed, 31 Aug 2011 21:20:25 +0000 (21:20 +0000)]
Revert r138894. This was failing on cmake-clang-i686-msvc10.

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

12 years agoThumb2 t2Bcc should encode as t2B when condition is 'always'.
Jim Grosbach [Wed, 31 Aug 2011 21:17:31 +0000 (21:17 +0000)]
Thumb2 t2Bcc should encode as t2B when condition is 'always'.

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

12 years agoMove more code around and duplicate AVX patterns: MOVHPS and MOVLPS
Bruno Cardoso Lopes [Wed, 31 Aug 2011 21:15:32 +0000 (21:15 +0000)]
Move more code around and duplicate AVX patterns: MOVHPS and MOVLPS

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

12 years agoMove MOVAPS,MOVUPS patterns close to the instructions definition
Bruno Cardoso Lopes [Wed, 31 Aug 2011 21:15:29 +0000 (21:15 +0000)]
Move MOVAPS,MOVUPS patterns close to the instructions definition

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

12 years agoRemove "_Int" forms of MOVUPSmr and MOVAPSmr
Bruno Cardoso Lopes [Wed, 31 Aug 2011 21:15:22 +0000 (21:15 +0000)]
Remove "_Int" forms of MOVUPSmr and MOVAPSmr

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

12 years agoUpdate more tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:04:11 +0000 (21:04 +0000)]
Update more tests to the new EH scheme.

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

12 years agoUpdate the tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 20:55:40 +0000 (20:55 +0000)]
Update the tests to the new EH scheme.

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

12 years agoMake sure we aren't deleting the landingpad instruction.
Bill Wendling [Wed, 31 Aug 2011 20:55:20 +0000 (20:55 +0000)]
Make sure we aren't deleting the landingpad instruction.

The landingpad instruction is required in the landing pad block. Because we're
not deleting terminating instructions, the invoke may still jump to here (see
Transforms/SCCP/2004-11-16-DeadInvoke.ll). Remove all uses of the landingpad
instruction, but keep it around until code-gen can remove the basic block.

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

12 years agoFix encoding for tBcc with immediate offset operand.
Owen Anderson [Wed, 31 Aug 2011 20:26:14 +0000 (20:26 +0000)]
Fix encoding for tBcc with immediate offset operand.

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

12 years agoMisc cleanup; addresses Duncan's comments on r138877.
Eli Friedman [Wed, 31 Aug 2011 20:13:26 +0000 (20:13 +0000)]
Misc cleanup; addresses Duncan's comments on r138877.

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

12 years agoWhen performing instruction selection for LDR_PRE_IMM/LDRB_PRE_IMM, we still need...
Owen Anderson [Wed, 31 Aug 2011 20:00:11 +0000 (20:00 +0000)]
When performing instruction selection for LDR_PRE_IMM/LDRB_PRE_IMM, we still need to preserve the sign of the index.  This fixes miscompilations of Quicksort in the nightly testsuite, and hopefully others as well.
<rdar://problem/10046188>

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

12 years agoRun the Thumb1 parser tests in Thumb2 mode, as well.
Jim Grosbach [Wed, 31 Aug 2011 19:50:28 +0000 (19:50 +0000)]
Run the Thumb1 parser tests in Thumb2 mode, as well.

Thumb2 is a superset of Thumb1, so all of the encodings should still work.

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

12 years agoRemove FIXME. Thumb2 MOV instruction will use separate custom tricks.
Jim Grosbach [Wed, 31 Aug 2011 18:39:39 +0000 (18:39 +0000)]
Remove FIXME. Thumb2 MOV instruction will use separate custom tricks.

When we want encoding T3 (the wide encoding), we can explicitly check for
that and twiddle the CanAcceptCarrySet accordingly. For now, just correctly
handle encodings T1 and T2 when in Thumb2 mode.

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

12 years agoFill in type legalization for MERGE_VALUES in all the various cases. Patch by Micah...
Eli Friedman [Wed, 31 Aug 2011 18:36:04 +0000 (18:36 +0000)]
Fill in type legalization for MERGE_VALUES in all the various cases.  Patch by Micah Villmow.  (No testcase because the issue only showed up in an out-of-tree backend.)

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

12 years agoThumb NOP encoding varies depending on ARCH revision.
Jim Grosbach [Wed, 31 Aug 2011 18:35:46 +0000 (18:35 +0000)]
Thumb NOP encoding varies depending on ARCH revision.

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

12 years agoFix roundtripping of Thumb BL/BLX instructions with immediate offsets instead of...
Owen Anderson [Wed, 31 Aug 2011 18:30:20 +0000 (18:30 +0000)]
Fix roundtripping of Thumb BL/BLX instructions with immediate offsets instead of labels.

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

12 years agotBcc is OK to be predicated in Thumb2 outside of IT blocks (obviously).
Jim Grosbach [Wed, 31 Aug 2011 18:29:05 +0000 (18:29 +0000)]
tBcc is OK to be predicated in Thumb2 outside of IT blocks (obviously).

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

12 years agoGeneric expansion for atomic load/store into cmpxchg/atomicrmw xchg; implements 64...
Eli Friedman [Wed, 31 Aug 2011 18:26:09 +0000 (18:26 +0000)]
Generic expansion for atomic load/store into cmpxchg/atomicrmw xchg; implements 64-bit atomic load/store for ARM.

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

12 years agoThumb2 parsing and encoding for ADC(register).
Jim Grosbach [Wed, 31 Aug 2011 18:23:08 +0000 (18:23 +0000)]
Thumb2 parsing and encoding for ADC(register).

Also add instruction aliases for non-.w versions of SBC since they're the
same.

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

12 years agoAfter r138010, subroutine type does not have context info. Update type verifier accor...
Devang Patel [Wed, 31 Aug 2011 18:04:31 +0000 (18:04 +0000)]
After r138010, subroutine type does not have context info. Update type verifier accordingly.
This fixes ptype.exp gdb testsuite regressions.

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

12 years ago64-bit atomic cmpxchg for ARM.
Eli Friedman [Wed, 31 Aug 2011 17:52:22 +0000 (17:52 +0000)]
64-bit atomic cmpxchg for ARM.

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

12 years agoFix typo. Patch by Liu.
Akira Hatanaka [Wed, 31 Aug 2011 17:49:04 +0000 (17:49 +0000)]
Fix typo. Patch by Liu.

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

12 years agoCompress Repeated Byte Output
David Greene [Wed, 31 Aug 2011 17:30:56 +0000 (17:30 +0000)]
Compress Repeated Byte Output

Emit a repeated sequence of bytes using .zero.  This saves an enormous
amount of asm file space for certain programs.

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

12 years agoTweak Thumb1 ADD encoding selection a bit.
Jim Grosbach [Wed, 31 Aug 2011 17:07:33 +0000 (17:07 +0000)]
Tweak Thumb1 ADD encoding selection a bit.

When the destination register of an add immediate instruction is
explicitly specified, encoding T1 is preferred, else encoding T2 is
preferred.

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

12 years agoPut VMOVS widening under a command line option, off by default.
Jakob Stoklund Olesen [Wed, 31 Aug 2011 17:00:02 +0000 (17:00 +0000)]
Put VMOVS widening under a command line option, off by default.

It appears that our use of the imp-use and imp-def flags with
sub-registers is not yet robust enough to support this.

The failing test case is complicated, I am working on a reduction.

<rdar://problem/10044201>

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

12 years agoThis test requires sse, otherwise x87 ops will block tailcall optimization
Benjamin Kramer [Wed, 31 Aug 2011 16:49:05 +0000 (16:49 +0000)]
This test requires sse, otherwise x87 ops will block tailcall optimization

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

12 years agoSpelling and grammar fixes to problems found by Duncan.
Rafael Espindola [Wed, 31 Aug 2011 16:43:33 +0000 (16:43 +0000)]
Spelling and grammar fixes to problems found by Duncan.

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

12 years agoMake sure we don't crash when -miphoneos-version-min is specified on x86. Hopefully...
Eli Friedman [Wed, 31 Aug 2011 16:19:51 +0000 (16:19 +0000)]
Make sure we don't crash when -miphoneos-version-min is specified on x86.  Hopefully this will fix gcc testsuite failures.

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

12 years agoRework this conditional a bit.
Eric Christopher [Wed, 31 Aug 2011 04:17:21 +0000 (04:17 +0000)]
Rework this conditional a bit.

Patch by Sanjoy Das

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

12 years agolit: Normalize pathsep slashes also on %T.
NAKAMURA Takumi [Wed, 31 Aug 2011 03:56:17 +0000 (03:56 +0000)]
lit: Normalize pathsep slashes also on %T.

On Python-w32 with mingw msys bash, %T was replaced to "x:\foo\bar...". msys bash cannot handle DOSish paths.

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

12 years ago- Move all MOVSS and MOVSD patterns close to their definitions
Bruno Cardoso Lopes [Wed, 31 Aug 2011 03:04:20 +0000 (03:04 +0000)]
- Move all MOVSS and MOVSD patterns close to their definitions
- Duplicate some store patterns to their AVX forms!
- Catched a bug while restricting the patterns subtarget, fix it
  and update a testcase to check it properly

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

12 years agoRemove unnecessary AVX checks
Bruno Cardoso Lopes [Wed, 31 Aug 2011 03:04:14 +0000 (03:04 +0000)]
Remove unnecessary AVX checks

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

12 years agoTeach more places to use VMOVAPS,VMOVUPS instead of MOVAPS,MOVUPS,
Bruno Cardoso Lopes [Wed, 31 Aug 2011 03:04:09 +0000 (03:04 +0000)]
Teach more places to use VMOVAPS,VMOVUPS instead of MOVAPS,MOVUPS,
whenever AVX is enabled.

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

12 years agoFix (movhps load) lowering / pattern to match more cases. rdar://10050549
Evan Cheng [Wed, 31 Aug 2011 02:05:24 +0000 (02:05 +0000)]
Fix (movhps load) lowering / pattern to match more cases. rdar://10050549

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

12 years agoSome minor cleanups for r138845.
Eli Friedman [Wed, 31 Aug 2011 00:41:05 +0000 (00:41 +0000)]
Some minor cleanups for r138845.

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

12 years agoSome 64-bit atomic operations on ARM. 64-bit cmpxchg coming next.
Eli Friedman [Wed, 31 Aug 2011 00:31:29 +0000 (00:31 +0000)]
Some 64-bit atomic operations on ARM.  64-bit cmpxchg coming next.

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

12 years agoFix test typo.
Benjamin Kramer [Wed, 31 Aug 2011 00:02:59 +0000 (00:02 +0000)]
Fix test typo.

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

12 years agoRemove the old tail duplication pass. It is not used and is unable to update
Rafael Espindola [Tue, 30 Aug 2011 23:03:45 +0000 (23:03 +0000)]
Remove the old tail duplication pass. It is not used and is unable to update
ssa, so it has to be run really early in the pipeline. Any replacement
should probably use the SSAUpdater.

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

12 years agoFix issues with disassembly of IT instructions involving condition codes other the...
Owen Anderson [Tue, 30 Aug 2011 22:58:27 +0000 (22:58 +0000)]
Fix issues with disassembly of IT instructions involving condition codes other the EQ/NE.  Discovered by roundtrip testing.

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

12 years agoFix encoding of CBZ/CBNZ Thumb2 instructions with immediate offsets rather than labels.
Owen Anderson [Tue, 30 Aug 2011 22:15:17 +0000 (22:15 +0000)]
Fix encoding of CBZ/CBNZ Thumb2 instructions with immediate offsets rather than labels.

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

12 years agoTeach macho-dump to dump the uleb128s referred to by linkedit_data segments.
Benjamin Kramer [Tue, 30 Aug 2011 22:10:58 +0000 (22:10 +0000)]
Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.

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

12 years agoFix encoding of PC-relative Thumb1 LDR's when using immediate offsets instead of...
Owen Anderson [Tue, 30 Aug 2011 22:10:03 +0000 (22:10 +0000)]
Fix encoding of PC-relative Thumb1 LDR's when using immediate offsets instead of labels.

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

12 years agoFix encoding of Thumb1 B instructions with immediate offsets, which is necessary...
Owen Anderson [Tue, 30 Aug 2011 22:03:20 +0000 (22:03 +0000)]
Fix encoding of Thumb1 B instructions with immediate offsets, which is necessary for round-tripping.

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

12 years agoClean up whitespace.
Owen Anderson [Tue, 30 Aug 2011 21:58:18 +0000 (21:58 +0000)]
Clean up whitespace.

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

12 years agoFix off-by-one error Benjamin noticed.
Bill Wendling [Tue, 30 Aug 2011 21:23:24 +0000 (21:23 +0000)]
Fix off-by-one error Benjamin noticed.

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

12 years agoAdd a triple.
Rafael Espindola [Tue, 30 Aug 2011 21:19:37 +0000 (21:19 +0000)]
Add a triple.

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

12 years agoRemove empty file.
Owen Anderson [Tue, 30 Aug 2011 21:17:20 +0000 (21:17 +0000)]
Remove empty file.

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

12 years agoSpeculatively revert r138809 in an attempt to fix DragonEgg.
Owen Anderson [Tue, 30 Aug 2011 21:11:06 +0000 (21:11 +0000)]
Speculatively revert r138809 in an attempt to fix DragonEgg.

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

12 years agoEnable compact unwind info by default. This only applies to Darwin when CFI is
Bill Wendling [Tue, 30 Aug 2011 20:54:11 +0000 (20:54 +0000)]
Enable compact unwind info by default. This only applies to Darwin when CFI is
disabled.

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

12 years agoFix C++0x narrowing errors when char is unsigned.
Jeffrey Yasskin [Tue, 30 Aug 2011 20:53:29 +0000 (20:53 +0000)]
Fix C++0x narrowing errors when char is unsigned.

In the case of EDInstInfo, this would actually cause a bug when -1 became 255
and was then compared >=0 in llvm-mc/Disassembler.cpp.

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

12 years agoPreliminary documentation in docs/SegmentedStacks.html.
Rafael Espindola [Tue, 30 Aug 2011 20:25:49 +0000 (20:25 +0000)]
Preliminary documentation in docs/SegmentedStacks.html.

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

12 years agoPort Thumb2 assembler tests over to disassembler tests.
Owen Anderson [Tue, 30 Aug 2011 20:03:11 +0000 (20:03 +0000)]
Port Thumb2 assembler tests over to disassembler tests.

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

12 years agoSome test code to check if correct code is being generated.
Rafael Espindola [Tue, 30 Aug 2011 19:51:29 +0000 (19:51 +0000)]
Some test code to check if correct code is being generated.
Patch by Sanjoy Das.

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

12 years agoThe code model of JIT should default to JITDefault.
Nicolas Geoffray [Tue, 30 Aug 2011 19:50:33 +0000 (19:50 +0000)]
The code model of JIT should default to JITDefault.

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

12 years agoAdds support for variable sized allocas. For a variable sized alloca,
Rafael Espindola [Tue, 30 Aug 2011 19:47:04 +0000 (19:47 +0000)]
Adds support for variable sized allocas. For a variable sized alloca,
code is inserted to first check if the current stacklet has enough
space. If so, space is allocated by simply decrementing the stack
pointer. Otherwise a runtime routine (__morestack_allocate_stack_space
in libgcc) is called which allocates the required memory from the
heap.

Patch by Sanjoy Das.

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

12 years agoAdds a SelectionDAG node X86SegAlloca which will be custom lowered
Rafael Espindola [Tue, 30 Aug 2011 19:43:21 +0000 (19:43 +0000)]
Adds a SelectionDAG node X86SegAlloca which will be custom lowered
from DYNAMIC_STACKALLOC.

Two new pseudo instructions (SEG_ALLOCA_32 and SEG_ALLOCA_64) which
will match X86SegAlloca (based on word size) are also added.  They
will be custom emitted to inject the actual stack handling code.

Patch by Sanjoy Das.

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

12 years agoEmit segmented-stack specific code into function prologues for
Rafael Espindola [Tue, 30 Aug 2011 19:39:58 +0000 (19:39 +0000)]
Emit segmented-stack specific code into function prologues for
X86. Modify the pass added in the previous patch to call this new
code.

This new prologues generated will call a libgcc routine (__morestack)
to allocate more stack space from the heap when required

Patch by Sanjoy Das.

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

12 years agoCommand line option to enable support for segmented stacks:
Rafael Espindola [Tue, 30 Aug 2011 19:29:02 +0000 (19:29 +0000)]
Command line option to enable support for segmented stacks:
-segmented-stacks.
Patch by Sanjoy Das!

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

12 years agoFollow up to r138791.
Evan Cheng [Tue, 30 Aug 2011 19:09:48 +0000 (19:09 +0000)]
Follow up to r138791.

Add a instruction flag: hasPostISelHook which tells the pre-RA scheduler to
call a target hook to adjust the instruction. For ARM, this is used to
adjust instructions which may be setting the 's' flag. ADC, SBC, RSB, and RSC
instructions have implicit def of CPSR (required since it now uses CPSR physical
register dependency rather than "glue"). If the carry flag is used, then the
target hook will *fill in* the optional operand with CPSR. Otherwise, the hook
will remove the CPSR implicit def from the MachineInstr.

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

12 years agoWhen walking backwards to eliminate final stores to allocas at the end of a function...
Owen Anderson [Tue, 30 Aug 2011 18:51:55 +0000 (18:51 +0000)]
When walking backwards to eliminate final stores to allocas at the end of a function, encountering an unrelated store should not cause us to give up like encountering a load does.

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

12 years agoTeach macho-dump how to dump linkedit_data load commands.
Benjamin Kramer [Tue, 30 Aug 2011 18:33:37 +0000 (18:33 +0000)]
Teach macho-dump how to dump linkedit_data load commands.

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

12 years agoAdd load commands from Lion to Macho.h.
Benjamin Kramer [Tue, 30 Aug 2011 18:33:34 +0000 (18:33 +0000)]
Add load commands from Lion to Macho.h.

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

12 years agoUpdate docs: Bugpoint understands -O[123]
Tobias Grosser [Tue, 30 Aug 2011 18:26:11 +0000 (18:26 +0000)]
Update docs: Bugpoint understands -O[123]

Eli added this in revision 132695.

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

12 years agoLit option for ignoring stderr output.
Andrew Trick [Tue, 30 Aug 2011 17:42:33 +0000 (17:42 +0000)]
Lit option for ignoring stderr output.

This is useful for testing a build a temporarily hand instrumented
build.
Patch by arrowdodger!

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

12 years agoSet CR1EQ only when lowering vararg floating arguments (not any vararg
Roman Divacky [Tue, 30 Aug 2011 17:04:16 +0000 (17:04 +0000)]
Set CR1EQ only when lowering vararg floating arguments (not any vararg
arguments as before), unset CR1EQ otherwise.

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

12 years agoFix typos in SPUMCTargetDesc.h
James Molloy [Tue, 30 Aug 2011 07:27:02 +0000 (07:27 +0000)]
Fix typos in SPUMCTargetDesc.h

Patch supplied by Liu (projlc@gmail.com)

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

12 years agoFix typo in BlackfinFrameLowering.h
James Molloy [Tue, 30 Aug 2011 07:26:11 +0000 (07:26 +0000)]
Fix typo in BlackfinFrameLowering.h

Patch supplied by Liu (projlc@gmail.com)

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

12 years agoFix typo in MSP430MCTargetDesc.h.
James Molloy [Tue, 30 Aug 2011 07:24:47 +0000 (07:24 +0000)]
Fix typo in MSP430MCTargetDesc.h.

Patch supplied by Liu (projlc@gmail.com)

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

12 years agoFix typo in MipsMCTargetDesc.h; Patch supplied by Liu (proljc@gmail.com)
James Molloy [Tue, 30 Aug 2011 07:23:29 +0000 (07:23 +0000)]
Fix typo in MipsMCTargetDesc.h; Patch supplied by Liu (proljc@gmail.com)

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

12 years agoAdd vvvv support to disassembling of instructions with MRMDestMem and MRMDestReg...
Craig Topper [Tue, 30 Aug 2011 07:09:35 +0000 (07:09 +0000)]
Add vvvv support to disassembling of instructions with MRMDestMem and MRMDestReg form. Needed to support mem dest form of vmaskmovps/d. Fixes PR10807.

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

12 years agoDo not try to rematerialize a value from a partial definition.
Bob Wilson [Tue, 30 Aug 2011 05:36:02 +0000 (05:36 +0000)]
Do not try to rematerialize a value from a partial definition.
I don't currently have a good testcase for this; will try to get one
tomorrow.  <rdar://problem/10032939>

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

12 years agoChange ARM / Thumb2 addc / adde and subc / sube modeling to use physical
Evan Cheng [Tue, 30 Aug 2011 01:34:54 +0000 (01:34 +0000)]
Change ARM / Thumb2 addc / adde and subc / sube modeling to use physical
register dependency (rather than glue them together). This is general
goodness as it gives scheduler more freedom. However it is motivated by
a nasty bug in isel.

When a i64 sub is expanded to subc + sube.
  libcall #1
     \
      \        subc
       \       /  \
        \     /    \
         \   /    libcall #2
          sube

If the libcalls are not serialized (i.e. both have chains which are dag
entry), legalizer can serialize them in arbitrary orders. If it's
unlucky, it can force libcall #2 before libcall #1 in the above case.

  subc
   |
  libcall #2
   |
  libcall #1
   |
  sube

However since subc and sube are "glued" together, this ends up being a
cycle when the scheduler combine subc and sube as a single scheduling
unit.

The right solution is to fix LegalizeType too chains the libcalls together.
However, LegalizeType is not processing nodes in order so that's harder than
it should be. For now, the move to physical register dependency will do.

rdar://10019576

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

12 years agoRevert 138781. It's not playing nicely with the immediate forms for ADC.
Jim Grosbach [Mon, 29 Aug 2011 23:24:15 +0000 (23:24 +0000)]
Revert 138781. It's not playing nicely with the immediate forms for ADC.

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

12 years agoThumb2 assembler aliases for ADC/SBC w/o the .w suffix.
Jim Grosbach [Mon, 29 Aug 2011 23:20:54 +0000 (23:20 +0000)]
Thumb2 assembler aliases for ADC/SBC w/o the .w suffix.

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

12 years agoAdd missing encoding information for some of the GPR<->FP register moves.
Owen Anderson [Mon, 29 Aug 2011 23:15:25 +0000 (23:15 +0000)]
Add missing encoding information for some of the GPR<->FP register moves.

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

12 years agoRemove redundant tests from XFAIL'ed test file.
Jim Grosbach [Mon, 29 Aug 2011 23:04:04 +0000 (23:04 +0000)]
Remove redundant tests from XFAIL'ed test file.

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