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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Owen Anderson [Tue, 16 Aug 2011 23:45:44 +0000 (23:45 +0000)]
Separate out Thumb1 instructions that need an S bit operand from those that do not, for the purposes of decoding them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137787
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 23:29:17 +0000 (23:29 +0000)]
An additional atomic test; related to r137662.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137786
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 22:38:34 +0000 (22:38 +0000)]
Extend the undef ^ undef idiom once more. No testcase: I can't figure out how to actually trigger the codepath in question at the moment, but it might get exposed in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137781
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 22:20:01 +0000 (22:20 +0000)]
Thumb parsing diagnostics for low-reg requirements on ADD and MOV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137779
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Aug 2011 22:09:43 +0000 (22:09 +0000)]
Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.
MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137778
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 22:06:31 +0000 (22:06 +0000)]
A bunch of misc fixes to SCCPSolver::ResolvedUndefsIn, including a fix to stop
making random bad assumptions about instructions which are not explicitly listed.
Includes fix for rdar://
9956541, a version of "undef ^ undef should return
0 because it's easier than arguing with users".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137777
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:46:25 +0000 (21:46 +0000)]
Remove tests that have been obsoleted or migrated to clang/optimizer tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137775
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 21:42:31 +0000 (21:42 +0000)]
Add missing exit for 'case'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137774
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 21:34:08 +0000 (21:34 +0000)]
Thumb assembly parsing and encoding for ADD(register) instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137759
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Aug 2011 21:15:50 +0000 (21:15 +0000)]
The resume instruction may throw. Return 'true' in this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137757
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 21:12:37 +0000 (21:12 +0000)]
Move some logic into a helper function and expand the commentary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137756
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 21:12:35 +0000 (21:12 +0000)]
Minor bug in SCCP found by inspection. (I don't think it's possible to hit this with a normal pass pipeline, but fixing for completeness.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137755
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 21:11:21 +0000 (21:11 +0000)]
Add testcase for r137746.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137754
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Aug 2011 21:00:05 +0000 (21:00 +0000)]
Increment debug info version to accommodate upcoming change in debug info node structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137751
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 20:55:41 +0000 (20:55 +0000)]
Tidy up formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137747
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 20:45:50 +0000 (20:45 +0000)]
ARM thumb assembly parsing for arithmetic flag setting instructions.
Thumb one requires that many arithmetic instruction forms have an 'S'
suffix. For Thumb2, the whether the suffix is required or precluded depends
on whether the instruction is in an IT block. Use target parser predicates
to check for these sorts of context-sensitive constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137746
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Aug 2011 20:45:24 +0000 (20:45 +0000)]
Use the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>'
check for a LandingPadInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137745
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Aug 2011 20:42:52 +0000 (20:42 +0000)]
Add getFirstInsertionPt() method.
getFirstInsertionPt() returns an iterator to the first insertion point in a
basic block. This is after all PHIs and any other instruction which is required
to be at the top of the basic block (like LandingPadInst).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137744
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Aug 2011 20:41:17 +0000 (20:41 +0000)]
I think there was some confusion about what I meant. :-) Replacing the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137743
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 20:12:35 +0000 (20:12 +0000)]
Prefer diagnostics from target predicate in asm matcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137742
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 18:33:49 +0000 (18:33 +0000)]
Remove unused Target argument from AsmParser construction methods.
The argument is unused, and is a layering violation in any case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 18:31:36 +0000 (18:31 +0000)]
Remove unused forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137734
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 16 Aug 2011 18:21:54 +0000 (18:21 +0000)]
Instead of always leaving the work to the generic legalizer when
there is no support for native 256-bit shuffles, be more smart in some
cases, for example, when you can extract specific 128-bit parts and use
regular 128-bit shuffles for them. Example:
For this shuffle:
shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32>
<i32 1, i32 0, i32 7, i32 6>
This was expanded to:
vextractf128 $1, %ymm1, %xmm2
vpextrq $0, %xmm2, %rax
vmovd %rax, %xmm1
vpextrq $1, %xmm2, %rax
vmovd %rax, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1
vpextrq $0, %xmm0, %rax
vmovd %rax, %xmm2
vpextrq $1, %xmm0, %rax
vmovd %rax, %xmm0
vpunpcklqdq %xmm2, %xmm0, %xmm0
vinsertf128 $1, %xmm1, %ymm0, %ymm0
ret
Now we get:
vshufpd $1, %xmm0, %xmm0, %xmm0
vextractf128 $1, %ymm1, %xmm1
vshufpd $1, %xmm1, %xmm1, %xmm1
vinsertf128 $1, %xmm1, %ymm0, %ymm0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137733
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Aug 2011 17:41:41 +0000 (17:41 +0000)]
Remove unnecessary version check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137728
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 16 Aug 2011 17:32:01 +0000 (17:32 +0000)]
Add test case for r137711.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137725
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 17:06:20 +0000 (17:06 +0000)]
ARM .align NOP padding uses different encoding pre-ARMv6.
Patch by Kristof Beyls and James Malloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137723
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 16:38:17 +0000 (16:38 +0000)]
Tidy up. Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137721
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 16 Aug 2011 14:34:29 +0000 (14:34 +0000)]
Revert r137562 because it caused PR10674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137719
91177308-0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 16 Aug 2011 13:58:41 +0000 (13:58 +0000)]
Add a mechanism for optimisation plugins to register passes that all front ends can use without needing to be aware of the plugin (or the plugin be aware of the front end).
Before 3.0, I'd like to add a mechanism for automatically loading a set of plugins from a config file. API suggestions welcome...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137717
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Aug 2011 13:53:50 +0000 (13:53 +0000)]
Remove unimplemented method. Fixes PR10658.
Thanks to Jonas Gafele for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137716
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 16 Aug 2011 11:10:54 +0000 (11:10 +0000)]
cmake/modules/FindBison.cmake: It must be unneeded any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137715
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Aug 2011 04:52:55 +0000 (04:52 +0000)]
A few places where we want to skip the landingpad instruction for insertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137712
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 16 Aug 2011 03:51:51 +0000 (03:51 +0000)]
Fix handling of double precision loads and stores when Mips1 is targeted.
Mips1 does not support double precision loads or stores, therefore two single
precision loads or stores must be used in place of these instructions. This
patch treats double precision loads and stores as if they are legal
instructions until MCInstLowering, instead of generating the single precision
instructions during instruction selection or Prolog/Epilog code insertion.
Without the changes made in this patch, llc produces code that has the same
problem described in r137484 or bails out when
MipsInstrInfo::storeRegToStackSlot or loadRegFromStackSlot is called before
register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137711
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 16 Aug 2011 02:21:03 +0000 (02:21 +0000)]
Define function MipsMCInstLower::LowerOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137707
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 16 Aug 2011 02:15:03 +0000 (02:15 +0000)]
Add parameter Offset to MipsMCInstLower::LowerSymbolOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137706
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 01:42:56 +0000 (01:42 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137703
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 01:28:22 +0000 (01:28 +0000)]
Revert a bit of r137667; the logic in question can safely handle atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137702
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 01:17:17 +0000 (01:17 +0000)]
Migrate this test from llvm/test/FrontendC++/ptr-to-method-devirt.cpp and
FileCheckize. It is more properly an optimizer test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137700
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 00:41:37 +0000 (00:41 +0000)]
After talking with Bill, it seems like the LandingPad handling here is likely
to be wrong (or at least somewhat suspect). Leave a FIXME for Bill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137694
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 00:20:11 +0000 (00:20 +0000)]
Minor comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137693
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 23:59:28 +0000 (23:59 +0000)]
Update SimplifyCFG for atomic operations.
This commit includes a mention of the landingpad instruction, but it's not
changing the behavior around it. I think the current behavior is correct,
though. Bill, can you double-check that?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137691
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 23:55:52 +0000 (23:55 +0000)]
Add comments and test for atomic load/store and mem2reg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137690
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:47:24 +0000 (23:47 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137689
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 23:42:20 +0000 (23:42 +0000)]
Add a test file for Thumb2 NEON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137687
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 23:38:54 +0000 (23:38 +0000)]
Specify a necessary fixed bit for VLD3DUP, and otherwise rearrange the Thumb2 NEON decoding hooks to bring us closer to correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137686
91177308-0d34-0410-b5e6-
96231b3b80d8