oota-llvm.git
12 years agoFix indent in comment.
Nick Lewycky [Wed, 12 Oct 2011 00:14:12 +0000 (00:14 +0000)]
Fix indent in comment.

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

12 years agoFix r141744.
Evan Cheng [Wed, 12 Oct 2011 00:09:14 +0000 (00:09 +0000)]
Fix r141744.
1. The speculation check may not have been performed if the BB hasn't had a load
   LICM candidate.
2. If the candidate would be CSE'ed, then go ahead and speculatively LICM the
   instruction even if it's in high register pressure situation.

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

12 years agoFix -widen-vmovs liveness issues.
Jakob Stoklund Olesen [Wed, 12 Oct 2011 00:06:23 +0000 (00:06 +0000)]
Fix -widen-vmovs liveness issues.

When widening a copy, we are reading a larger register that may not be
live.  Use an <undef> flag to tell the register scavenger and machine
code verifier that we know the value isn't defined.

We now widen:

  %S6<def> = COPY %S4<kill>, %D3<imp-def>

into:

  %D3<def> = VMOVD %D2<undef>, pred:14, pred:%noreg, %S4<imp-use,kill>

This also keeps the <kill> flag on %S4 so we don't inadvertently kill a
live value in %S5.

Finally, ensure that ARMBaseInstrInfo::setExecutionDomain() preserves
the <undef> flag when converting VMOVD to VORR.

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

12 years agoRefine r141689 with a tri-state variable.
Evan Cheng [Tue, 11 Oct 2011 23:48:44 +0000 (23:48 +0000)]
Refine r141689 with a tri-state variable.
Also teach MachineLICM to avoid "speculation" when register pressure is high.

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

12 years agoChange name of class to ArithOverflowR.
Akira Hatanaka [Tue, 11 Oct 2011 23:43:48 +0000 (23:43 +0000)]
Change name of class to ArithOverflowR.

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

12 years agoDefine class ArithLogicI. Make 32-bit and 64-bit arithmetic and logical
Akira Hatanaka [Tue, 11 Oct 2011 23:38:52 +0000 (23:38 +0000)]
Define class ArithLogicI. Make 32-bit and 64-bit arithmetic and logical
instructions with two register operands derive from it.

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

12 years agoMake this test more specific. There are 3 stats that matched "machine-licm".
Bob Wilson [Tue, 11 Oct 2011 23:34:31 +0000 (23:34 +0000)]
Make this test more specific.  There are 3 stats that matched "machine-licm".

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

12 years agoUse public accessors on the scope that is returned.
Eric Christopher [Tue, 11 Oct 2011 23:19:35 +0000 (23:19 +0000)]
Use public accessors on the scope that is returned.

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

12 years agoFix comment.
Akira Hatanaka [Tue, 11 Oct 2011 23:12:12 +0000 (23:12 +0000)]
Fix comment.

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

12 years agoDefine classes ArithLogicR and ArithLogicOfR and make 32-bit and 64-bit
Akira Hatanaka [Tue, 11 Oct 2011 23:05:46 +0000 (23:05 +0000)]
Define classes ArithLogicR and ArithLogicOfR and make 32-bit and 64-bit
arithmetic and logical instructions with three register operands derive from
them. Fix instruction encoding too.

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

12 years agotarget data is a contract with the code generator, not the "processor"
Chris Lattner [Tue, 11 Oct 2011 23:02:17 +0000 (23:02 +0000)]
target data is a contract with the code generator, not the "processor"

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

12 years agoimprove some of the documentation around target data layout strings.
Chris Lattner [Tue, 11 Oct 2011 23:01:39 +0000 (23:01 +0000)]
improve some of the documentation around target data layout strings.

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

12 years agoAdd a new wrapper node for a DILexicalBlock that encapsulates it and a
Eric Christopher [Tue, 11 Oct 2011 22:59:11 +0000 (22:59 +0000)]
Add a new wrapper node for a DILexicalBlock that encapsulates it and a
file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.

This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.

Part of rdar://10246360

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

12 years agoFormatting.
Eric Christopher [Tue, 11 Oct 2011 22:59:04 +0000 (22:59 +0000)]
Formatting.

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

12 years agoSpacing.
Eric Christopher [Tue, 11 Oct 2011 22:58:58 +0000 (22:58 +0000)]
Spacing.

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

12 years agoN.B. This is with the new EH scheme:
Bill Wendling [Tue, 11 Oct 2011 22:42:31 +0000 (22:42 +0000)]
N.B. This is with the new EH scheme:

The blocks with invokes have branches to the dispatch block, because that more
correctly models the behavior of the CFG. The dispatch of course has edges to
the landing pads. Those landing pads could contain invokes, which then have
branches back to the dispatch. This creates a loop. The machine LICM pass looks
at this loop and thinks it can hoist elements out of it. But because the
dispatch is an alternate entry point into the program, the hoisted instructions
won't be executed.

I wasn't able to get a testcase which was small and could reproduce all of the
time. The function_try_block.cpp in llvm-test was where this showed up.

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

12 years agoFix function isUnalignedLoadStore.
Akira Hatanaka [Tue, 11 Oct 2011 22:04:01 +0000 (22:04 +0000)]
Fix function isUnalignedLoadStore.

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

12 years agoARM assembly parsing and encoding for LDC{2}{L}/STC{2}{L} instructions.
Jim Grosbach [Tue, 11 Oct 2011 21:55:36 +0000 (21:55 +0000)]
ARM assembly parsing and encoding for LDC{2}{L}/STC{2}{L} instructions.

Fill out the rest of the encoding information, update to properly mark
the LDC/STC instructions as predicable while the LDC2/STC2 instructions are
not, and adjust the parser accordingly.

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

12 years agoRemove unused PatLeaf.
Akira Hatanaka [Tue, 11 Oct 2011 21:53:08 +0000 (21:53 +0000)]
Remove unused PatLeaf.

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

12 years agoChange the names of 64-bit logical instructions so that they match the names of
Akira Hatanaka [Tue, 11 Oct 2011 21:48:01 +0000 (21:48 +0000)]
Change the names of 64-bit logical instructions so that they match the names of
the real instructions.

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

12 years agoRevert r141529. This is causing failures in the test-suite, like bigstack and ReedSol...
Bill Wendling [Tue, 11 Oct 2011 21:40:47 +0000 (21:40 +0000)]
Revert r141529. This is causing failures in the test-suite, like bigstack and ReedSolomon. Boo...

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

12 years agoRemove redundancy in setcc patterns using multiclass.
Akira Hatanaka [Tue, 11 Oct 2011 21:40:01 +0000 (21:40 +0000)]
Remove redundancy in setcc patterns using multiclass.

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

12 years agoFix PR11106 by correcting a typo that has been in the code for over a year. This
Cameron Zwarich [Tue, 11 Oct 2011 21:26:40 +0000 (21:26 +0000)]
Fix PR11106 by correcting a typo that has been in the code for over a year. This
would have never worked, since the element type of a vector type is never a
vector type. Also fix the conditional to be more direct in checking whether
EltTy is a vector type.

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

12 years agoUse sltiu instead of sltu when a register operand and immediate are compared.
Akira Hatanaka [Tue, 11 Oct 2011 20:44:43 +0000 (20:44 +0000)]
Use sltiu instead of sltu when a register operand and immediate are compared.

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

12 years agoUpdate test for r141704.
Jim Grosbach [Tue, 11 Oct 2011 20:18:50 +0000 (20:18 +0000)]
Update test for r141704.

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

12 years agoARM addressing mode cleanup for LDC/STC.
Jim Grosbach [Tue, 11 Oct 2011 20:17:35 +0000 (20:17 +0000)]
ARM addressing mode cleanup for LDC/STC.

We parse at least some forms of the instructions now. Encoding is
pretty screwed up, still, though.

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

12 years agoClean up a few references to System/. We still have docs/SystemLibrary.html
Daniel Dunbar [Tue, 11 Oct 2011 20:02:52 +0000 (20:02 +0000)]
Clean up a few references to System/. We still have docs/SystemLibrary.html
lying around...

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

12 years agoSupport/DataTypes.h: Clean up some types and add matching (but presumably
Daniel Dunbar [Tue, 11 Oct 2011 20:02:49 +0000 (20:02 +0000)]
Support/DataTypes.h: Clean up some types and add matching (but presumably
unused) code from .cmake to DataTypes.h.in so that the files are essentially in
sync module differences in autoconf/cmake replacement syntax.

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

12 years agoRemove extra semicolon.
Eli Friedman [Tue, 11 Oct 2011 19:53:40 +0000 (19:53 +0000)]
Remove extra semicolon.

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

12 years agoAdd patterns for conditional branches with 64-bit register operands.
Akira Hatanaka [Tue, 11 Oct 2011 19:09:09 +0000 (19:09 +0000)]
Add patterns for conditional branches with 64-bit register operands.

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

12 years agoAdd support for 64-bit set-on-less-than instructions.
Akira Hatanaka [Tue, 11 Oct 2011 18:53:46 +0000 (18:53 +0000)]
Add support for 64-bit set-on-less-than instructions.

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

12 years agoAdd support for conditional branch instructions with 64-bit register operands.
Akira Hatanaka [Tue, 11 Oct 2011 18:49:17 +0000 (18:49 +0000)]
Add support for conditional branch instructions with 64-bit register operands.

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

12 years agoAdd dominance check for the instruction being hoisted.
Devang Patel [Tue, 11 Oct 2011 18:09:58 +0000 (18:09 +0000)]
Add dominance check for the instruction being hoisted.

For example, MachineLICM should not hoist a load that is not guaranteed to be executed.
Radar 10254254.

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

12 years agoFixed docs to reflect the proper default value and behaviour of the natural stack...
Lang Hames [Tue, 11 Oct 2011 17:50:14 +0000 (17:50 +0000)]
Fixed docs to reflect the proper default value and behaviour of the natural stack alignment.

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

12 years agoExpose MachOObjectFile externally, like we do for COFF. First step in reducing the...
Owen Anderson [Tue, 11 Oct 2011 17:32:27 +0000 (17:32 +0000)]
Expose MachOObjectFile externally, like we do for COFF.  First step in reducing the amount of special-purpose code needed for llvm-objdump.

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

12 years agoARM parse alignment specifier for NEON load/store instructions.
Jim Grosbach [Tue, 11 Oct 2011 17:29:55 +0000 (17:29 +0000)]
ARM parse alignment specifier for NEON load/store instructions.

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

12 years agoMention the cmake build guide on the main docs page.
Duncan Sands [Tue, 11 Oct 2011 16:35:07 +0000 (16:35 +0000)]
Mention the cmake build guide on the main docs page.

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

12 years agoARM Rename operand sub-structure 'Mem' to 'Memory' for a bit more clarity.
Jim Grosbach [Tue, 11 Oct 2011 15:59:20 +0000 (15:59 +0000)]
ARM Rename operand sub-structure 'Mem' to 'Memory' for a bit more clarity.

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

12 years agoAdd support for legalization of vector SHL/SRA/SRL instructions
Nadav Rotem [Tue, 11 Oct 2011 14:36:35 +0000 (14:36 +0000)]
Add support for legalization of vector SHL/SRA/SRL instructions

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

12 years agoImplement the emitFrameIndexDebugValue and getDebugValueLocation hooks.
Richard Osborne [Tue, 11 Oct 2011 12:55:35 +0000 (12:55 +0000)]
Implement the emitFrameIndexDebugValue and getDebugValueLocation hooks.

This fixes an assert due to the operands of the DBG_VALUE instruction not
being as expected (PR11105).

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

12 years agoFix a iterator out of bounds error, that triggers rarely.
Kalle Raiskila [Tue, 11 Oct 2011 12:55:18 +0000 (12:55 +0000)]
Fix a iterator out of bounds error, that triggers rarely.

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

12 years agollvm-objdump.cpp: Use PRIx64 as format specifier for int64_t.
NAKAMURA Takumi [Tue, 11 Oct 2011 12:51:50 +0000 (12:51 +0000)]
llvm-objdump.cpp: Use PRIx64 as format specifier for int64_t.

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

12 years agoAdd -D__STDC_FORMAT_MACROS to use PRIx64.
NAKAMURA Takumi [Tue, 11 Oct 2011 12:51:44 +0000 (12:51 +0000)]
Add -D__STDC_FORMAT_MACROS to use PRIx64.

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

12 years agocmake/modules/HandleLLVMOptions.cmake: Reorder __STDC_CONSTANT_MACROS and __STDC_LIMI...
NAKAMURA Takumi [Tue, 11 Oct 2011 12:51:36 +0000 (12:51 +0000)]
cmake/modules/HandleLLVMOptions.cmake: Reorder __STDC_CONSTANT_MACROS and __STDC_LIMIT_MACROS.

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

12 years agoAdd support for legalization of vector trunc-store where the saved scalar type is...
Nadav Rotem [Tue, 11 Oct 2011 11:25:16 +0000 (11:25 +0000)]
Add support for legalization of vector trunc-store where the saved scalar type is illegal (for example, v2i16 on systems where the smallest store size is i32)

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

12 years agoCleanup the trunc-store legalization code and add asserts.
Nadav Rotem [Tue, 11 Oct 2011 10:04:25 +0000 (10:04 +0000)]
Cleanup the trunc-store legalization code and add asserts.

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

12 years agoUpdate to a newer doxygen version. PR8214. Patch by Jeremy Huddleston.
Bill Wendling [Tue, 11 Oct 2011 07:25:38 +0000 (07:25 +0000)]
Update to a newer doxygen version. PR8214. Patch by Jeremy Huddleston.

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

12 years agoAdd HasPOPCNT predicate to the POPCNT instructions. Also mark POPCNT as modifying...
Craig Topper [Tue, 11 Oct 2011 07:13:09 +0000 (07:13 +0000)]
Add HasPOPCNT predicate to the POPCNT instructions. Also mark POPCNT as modifying EFLAGS.

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

12 years agoMinor modifications to make the Hello World example resemble the Hello World
Bill Wendling [Tue, 11 Oct 2011 07:03:52 +0000 (07:03 +0000)]
Minor modifications to make the Hello World example resemble the Hello World
pass in the tree. Also some minor formatting changes.
PR9413

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

12 years agoMake Ivy Bridge 16-bit floating point conversion instructions require AVX.
Craig Topper [Tue, 11 Oct 2011 07:01:37 +0000 (07:01 +0000)]
Make Ivy Bridge 16-bit floating point conversion instructions require AVX.

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

12 years agoApparently, sometimes llvm-nm doesn't put the undefined symbol at the top. Take
Nick Lewycky [Tue, 11 Oct 2011 06:58:11 +0000 (06:58 +0000)]
Apparently, sometimes llvm-nm doesn't put the undefined symbol at the top. Take
that into account and test for no U's showing up in the middle, which is what
we really wanted to test for.

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

12 years agoTest case for X86 LZCNT instruction selection.
Craig Topper [Tue, 11 Oct 2011 06:47:01 +0000 (06:47 +0000)]
Test case for X86 LZCNT instruction selection.

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

12 years agoAdd X86 LZCNT instruction. Including instruction selection support.
Craig Topper [Tue, 11 Oct 2011 06:44:02 +0000 (06:44 +0000)]
Add X86 LZCNT instruction. Including instruction selection support.

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

12 years agoUse the proper name for "externally visible" linkage -- 'external'. This is the
Bill Wendling [Tue, 11 Oct 2011 06:41:28 +0000 (06:41 +0000)]
Use the proper name for "externally visible" linkage -- 'external'. This is the
keyword in LLVM for externally visible linkage.
PR10636

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

12 years agoReword the SetVector description to reflect reality.
Bill Wendling [Tue, 11 Oct 2011 06:33:56 +0000 (06:33 +0000)]
Reword the SetVector description to reflect reality.
Patch by Michael Ilseman!

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

12 years agoAdd a test for PR10565.
Cameron Zwarich [Tue, 11 Oct 2011 06:10:37 +0000 (06:10 +0000)]
Add a test for PR10565.

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

12 years agoRemove a lot of the fancy scalar replacement code for dealing with llvm-gcc's
Cameron Zwarich [Tue, 11 Oct 2011 06:10:30 +0000 (06:10 +0000)]
Remove a lot of the fancy scalar replacement code for dealing with llvm-gcc's
lowering of NEON code. It provides little-to-no benefit now and only introduces
additional complexity.

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

12 years agoTest simplification that Ana Pazos noticed.
Bill Wendling [Tue, 11 Oct 2011 04:43:15 +0000 (04:43 +0000)]
Test simplification that Ana Pazos noticed.

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

12 years agoFix disassembling of popcntw. Also remove some code that says it accounts for 64BIT_R...
Craig Topper [Tue, 11 Oct 2011 04:34:23 +0000 (04:34 +0000)]
Fix disassembling of popcntw. Also remove some code that says it accounts for 64BIT_REXW_XD not existing, but it does exist.

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

12 years agoAlso create a shndx even if there are no symbols. This lets us test
Nick Lewycky [Tue, 11 Oct 2011 03:54:50 +0000 (03:54 +0000)]
Also create a shndx even if there are no symbols. This lets us test
.symtab_shndx reading and writing together, and finally we have a testcase for
r141440.

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

12 years agotest/CodeGen/X86/movbe.ll: Give explicit -mtriple=x86_64-linux, to unbreak win32...
NAKAMURA Takumi [Tue, 11 Oct 2011 03:41:03 +0000 (03:41 +0000)]
test/CodeGen/X86/movbe.ll: Give explicit -mtriple=x86_64-linux, to unbreak win32 hosts.

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

12 years agoReapply r141605 with fixes for appropriate handling of reserved section numbers
Nick Lewycky [Tue, 11 Oct 2011 03:18:58 +0000 (03:18 +0000)]
Reapply r141605 with fixes for appropriate handling of reserved section numbers
in st_shndx fields.

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

12 years agoAdd support for .symtab_shnidx. Unfortunately, doing this required breaking a
Nick Lewycky [Tue, 11 Oct 2011 02:57:48 +0000 (02:57 +0000)]
Add support for .symtab_shnidx. Unfortunately, doing this required breaking a
layer of abstraction around SymbolRef where you can read its private
SymbolPimpl member.

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

12 years agoAdd experimental -enable-lsr-phielim option.
Andrew Trick [Tue, 11 Oct 2011 02:30:45 +0000 (02:30 +0000)]
Add experimental -enable-lsr-phielim option.

I'm not sure we will need it in the long run, but the option is
currently useful for checking if the output of LSR is "clean".

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

12 years agoMove replaceCongruentIVs into SCEVExapander and bias toward "expanded"
Andrew Trick [Tue, 11 Oct 2011 02:28:51 +0000 (02:28 +0000)]
Move replaceCongruentIVs into SCEVExapander and bias toward "expanded"
IVs.

Indvars previously chose randomly between congruent IVs. Now it will
bias the decision toward IVs that SCEVExpander likes to create. This
was not done to fix any problem, it's just a welcome side effect of
factoring code.

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

12 years agoTest cases for 64-bit load and store instructions.
Akira Hatanaka [Tue, 11 Oct 2011 01:52:31 +0000 (01:52 +0000)]
Test cases for 64-bit load and store instructions.

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

12 years agoAdded a testcase for r141599, rdar://problem/10063881.
Lang Hames [Tue, 11 Oct 2011 01:32:10 +0000 (01:32 +0000)]
Added a testcase for r141599, rdar://problem/10063881.

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

12 years agoMake changes necessary for supporting floating point load and store instructions
Akira Hatanaka [Tue, 11 Oct 2011 01:12:52 +0000 (01:12 +0000)]
Make changes necessary for supporting floating point load and store instructions
that have 64-bit pointers or access the 32 x 64-bit floating pointer register
file. Update functions in MipsInstrInfo.cpp too.

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

12 years agoMove -widen-vmovs to ARMBaseInstrInfo::expandPostRAPseudo().
Jakob Stoklund Olesen [Tue, 11 Oct 2011 00:59:06 +0000 (00:59 +0000)]
Move -widen-vmovs to ARMBaseInstrInfo::expandPostRAPseudo().

The VMOVS widening needs to look at the implicit COPY operands.  Trying
to dig out the COPY instruction from an iterator in copyPhysReg() is the
wrong approach.

The expandPostRAPseudo() hook gets to look at COPY instructions before
they are converted to copyPhysReg() calls.

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

12 years agoModify lowering of GlobalAddress so that correct code is emitted when target is
Akira Hatanaka [Tue, 11 Oct 2011 00:55:05 +0000 (00:55 +0000)]
Modify lowering of GlobalAddress so that correct code is emitted when target is
Mips64.

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

12 years agoFixed natural stack alignment for Linux x86-32. Thanks Eli.
Lang Hames [Tue, 11 Oct 2011 00:51:36 +0000 (00:51 +0000)]
Fixed natural stack alignment for Linux x86-32. Thanks Eli.

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

12 years agoModify MipsDAGToDAGISel::SelectAddr so that it can handle 64-bit pointers too.
Akira Hatanaka [Tue, 11 Oct 2011 00:44:20 +0000 (00:44 +0000)]
Modify MipsDAGToDAGISel::SelectAddr so that it can handle 64-bit pointers too.

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

12 years agoRevert r141605 as it broke tests for llvm-nm.
Nick Lewycky [Tue, 11 Oct 2011 00:38:56 +0000 (00:38 +0000)]
Revert r141605 as it broke tests for llvm-nm.

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

12 years agoSimplify and update functions storeRegToStackSlot and loadRegFromStackSlot.
Akira Hatanaka [Tue, 11 Oct 2011 00:37:28 +0000 (00:37 +0000)]
Simplify and update functions storeRegToStackSlot and loadRegFromStackSlot.

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

12 years agoAdd definitions of 64-bit loads and stores. Add a patterns for unaligned
Akira Hatanaka [Tue, 11 Oct 2011 00:27:28 +0000 (00:27 +0000)]
Add definitions of 64-bit loads and stores. Add a patterns for unaligned
zextloadi32 for which there is no corresponding pseudo or real instruction.

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

12 years agoAdd testcase for PR11107.
Bill Wendling [Tue, 11 Oct 2011 00:26:57 +0000 (00:26 +0000)]
Add testcase for PR11107.

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

12 years agoMake it possible to use the linker without destroying the source module. This is...
Tanya Lattner [Tue, 11 Oct 2011 00:24:54 +0000 (00:24 +0000)]
Make it possible to use the linker without destroying the source module. This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before.

This line, and those below, will be ignored--

M    include/llvm/Linker.h
M    tools/bugpoint/Miscompilation.cpp
M    tools/bugpoint/BugDriver.cpp
M    tools/llvm-link/llvm-link.cpp
M    lib/Linker/LinkModules.cpp

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

12 years agoAdd support for reading many-section ELF files.
Nick Lewycky [Tue, 11 Oct 2011 00:15:42 +0000 (00:15 +0000)]
Add support for reading many-section ELF files.
If you want to tackle adding the testcase, let me know. It's a 4.2MB ELF file
and I'll be happy to mail it to you.

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

12 years agoChange definitions of classes LoadM and StoreM in preparation for adding support
Akira Hatanaka [Tue, 11 Oct 2011 00:11:12 +0000 (00:11 +0000)]
Change definitions of classes LoadM and StoreM in preparation for adding support
for 64-bit load and store instructions. Add definitions of 64-bit memory operand
and 16-bit immediate operand.

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

12 years agoSimplify check that optional def is there and is CPSR.
Bill Wendling [Tue, 11 Oct 2011 00:10:41 +0000 (00:10 +0000)]
Simplify check that optional def is there and is CPSR.

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

12 years agoAdd a natural stack alignment field to TargetData, and prevent InstCombine from
Lang Hames [Mon, 10 Oct 2011 23:42:08 +0000 (23:42 +0000)]
Add a natural stack alignment field to TargetData, and prevent InstCombine from
promoting allocas to preferred alignments that exceed the natural
alignment. This avoids some potentially expensive dynamic stack realignments.

The natural stack alignment is set in target data strings via the "S<size>"
option. Size is in bits and must be a multiple of 8. The natural stack alignment
defaults to "unspecified" (represented by a zero value), and the "unspecified"
value does not prevent any alignment promotions. Target maintainers that care
about avoiding promotions should explicitly add the "S<size>" option to their
target data strings.

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

12 years agoFix warning.
Michael J. Spencer [Mon, 10 Oct 2011 23:36:56 +0000 (23:36 +0000)]
Fix warning.

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

12 years agoRevert r141569 and r141576.
Devang Patel [Mon, 10 Oct 2011 23:18:02 +0000 (23:18 +0000)]
Revert r141569 and r141576.

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

12 years agoSimplify operand Kind checks a bit.
Jim Grosbach [Mon, 10 Oct 2011 23:06:42 +0000 (23:06 +0000)]
Simplify operand Kind checks a bit.

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

12 years agoReapply r141365 now that PR11107 is fixed.
Bill Wendling [Mon, 10 Oct 2011 22:59:55 +0000 (22:59 +0000)]
Reapply r141365 now that PR11107 is fixed.

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

12 years agoAdd a name to sub-operand for clarity.
Jim Grosbach [Mon, 10 Oct 2011 22:55:05 +0000 (22:55 +0000)]
Add a name to sub-operand for clarity.

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

12 years agoIf the CPSR is defined by a copy, then we don't want to merge it into an IT
Bill Wendling [Mon, 10 Oct 2011 22:52:53 +0000 (22:52 +0000)]
If the CPSR is defined by a copy, then we don't want to merge it into an IT
block. E.g., if we have:

  movs  r1, r1
  rsb   r1, 0
  movs  r2, r2
  rsb   r2, 0

we don't want this to be converted to:

  movs  r1, r1
  movs  r2, r2
  itt   mi
  rsb   r1, 0
  rsb   r2, 0

PR11107 & <rdar://problem/10259534>

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

12 years agoMake sure the X86 backend doesn't explode on 128-bit shuffles in AVX mode. Fixes...
Eli Friedman [Mon, 10 Oct 2011 22:28:47 +0000 (22:28 +0000)]
Make sure the X86 backend doesn't explode on 128-bit shuffles in AVX mode.  Fixes PR11102.

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

12 years agoObject: add getSectionAlignment.
Michael J. Spencer [Mon, 10 Oct 2011 21:55:43 +0000 (21:55 +0000)]
Object: add getSectionAlignment.

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

12 years agoAdd support for dumping section headers to llvm-objdump. This uses the same
Nick Lewycky [Mon, 10 Oct 2011 21:21:34 +0000 (21:21 +0000)]
Add support for dumping section headers to llvm-objdump. This uses the same
flags as binutils objdump but the output is different, not just in format but
also showing different sections. Compare its results against readelf, not
objdump.

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

12 years agoGive targets a chance to expand even standard pseudos.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 20:34:28 +0000 (20:34 +0000)]
Give targets a chance to expand even standard pseudos.

Allow targets to expand COPY and other standard pseudo-instructions
before they are expanded with copyPhysReg().

This allows the target to examine the COPY instruction for extra
operands indicating it can be widened to a preferable super-register
copy.  See the ARM -widen-vmovs option.

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

12 years agoIf loop header is also loop exiting block then it may not be safe to hoist instructions.
Devang Patel [Mon, 10 Oct 2011 20:32:03 +0000 (20:32 +0000)]
If loop header is also loop exiting block then it may not be safe to hoist instructions.

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

12 years agoEmit full ED initializers even for pseudo-instructions.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 20:15:49 +0000 (20:15 +0000)]
Emit full ED initializers even for pseudo-instructions.

This should unbreak the picky buildbots.

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

12 years agoAllow stat += 0 without activating the stat.
Andrew Trick [Mon, 10 Oct 2011 19:48:56 +0000 (19:48 +0000)]
Allow stat += 0 without activating the stat.

For me, this is a nice convenience. We generally want grep to match
stats output only when the event has occurred.

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

12 years agowhitespace
Andrew Trick [Mon, 10 Oct 2011 19:35:46 +0000 (19:35 +0000)]
whitespace

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

12 years agoX86: Add a subtarget definition for core-avx-i, which is GCC's name for ivy bridge.
Benjamin Kramer [Mon, 10 Oct 2011 19:35:07 +0000 (19:35 +0000)]
X86: Add a subtarget definition for core-avx-i, which is GCC's name for ivy bridge.

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

12 years agoFix 10892 - When lowering SIGN_EXTEND_INREG do not lower v2i64 because the
Nadav Rotem [Mon, 10 Oct 2011 19:31:45 +0000 (19:31 +0000)]
Fix 10892 - When lowering SIGN_EXTEND_INREG do not lower v2i64 because the
instruction set has no 64-bit SRA support.

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

12 years agoAdd dominance check for the instruction being hoisted.
Devang Patel [Mon, 10 Oct 2011 19:09:20 +0000 (19:09 +0000)]
Add dominance check for the instruction being hoisted.

For example, MachineLICM should not hoist a load that is not guaranteed to be executed.
Radar 10254254.

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

12 years agoMark the standard pseudos as isPseudo = 1.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 18:51:33 +0000 (18:51 +0000)]
Mark the standard pseudos as isPseudo = 1.

The difference between isPseudo and isCodeGenOnly is a bit murky, but
isCodeGenOnly should eventually go away.  It is used for instructions
that are clones of real instructions with slightly different properties.

The standard pseudo-instructions never mirror real instructions, so they
are definitely in the isPseudo category.

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

12 years agoThe Mips specific function for instruction cache invalidation cannot be
Bruno Cardoso Lopes [Mon, 10 Oct 2011 18:41:02 +0000 (18:41 +0000)]
The Mips specific function for instruction cache invalidation cannot be
compiled on mips32r1 processors because it uses synci and rdhwr instructions
which are supported only on mips32r2, so I replaced this function with the
call to function cacheflush which works for both mips32r1 and mips32r2.
Patch by Sasa Stankovic

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