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
Bruno Cardoso Lopes [Mon, 15 Aug 2011 23:36:51 +0000 (23:36 +0000)]
While I'm here, remove the "_alt" hacks to a series of INSERT_SUBREG and
also add the AVX versions of the 128-bit patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137685
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 15 Aug 2011 23:36:45 +0000 (23:36 +0000)]
Reorder declarations of vmovmskp* and also put the necessary AVX
predicate and TB encoding fields. This fix the encoding for the
attached testcase. This fixes PR10625.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137684
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:36:40 +0000 (23:36 +0000)]
Continue to hoist uses of getCompileUnit() up. The goal is to get rid of uses of getCompileUnit().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137683
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 15 Aug 2011 23:22:56 +0000 (23:22 +0000)]
Avoid evaluating Neon macro arguments more than once by disabling type checks.
It turns out that the use of "__extension__" in these macros was disabling
the expected "incompatible pointer" warnings, so these type checks were not
doing anything anyway. They introduced a serious bug by evaluating some
macro arguments twice, which is a big problem for arguments with side effects.
I'll have to find another way to get the right type checking. Radar
9947657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137680
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 23:19:54 +0000 (23:19 +0000)]
In places where it's using "getFirstNonPHI", skip the landingpad instruction if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137679
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 23:03:29 +0000 (23:03 +0000)]
MCTargetAsmParser target match predicate support.
Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:00:00 +0000 (23:00 +0000)]
Add a finalize() hook, that'll let DIBuilder construct compile unit lazily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137673
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 22:53:05 +0000 (22:53 +0000)]
Don't sink the instruction to before a landingpad instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137672
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 22:24:32 +0000 (22:24 +0000)]
This is somewhat déjà -vu, but avoid using getCompileUnit() as much as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137668
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 22:16:46 +0000 (22:16 +0000)]
Update inter-procedural optimizations for atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137667
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 22:09:40 +0000 (22:09 +0000)]
Update instcombine for atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137664
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 22:04:40 +0000 (22:04 +0000)]
Refactor. Variables are part of compile unit so let CompileUnit create new variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137663
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 21:56:39 +0000 (21:56 +0000)]
Add some comments here because the lack of a check for volatile/atomic here is a bit unusual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137662
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 15 Aug 2011 21:45:54 +0000 (21:45 +0000)]
Fix PR10656. It's only profitable to use 128-bit inserts and extracts
when AVX mode is one. Otherwise is just more work for the type
legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137661
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 21:43:21 +0000 (21:43 +0000)]
There is no need to maintain a set to keep track of variables that use location expressions. In such cases, AT_location attribute's value will be a label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137659
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 21:35:16 +0000 (21:35 +0000)]
Fix warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137658
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 21:29:01 +0000 (21:29 +0000)]
Add some more comprehensive VFP decoding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137657
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 21:24:36 +0000 (21:24 +0000)]
Simplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137656
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 21:14:31 +0000 (21:14 +0000)]
Duncan pointed out that the LandingPadInst might read memory. (It might also
write to memory.) Marking it as such makes some checks for immobility go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137655
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 21:05:06 +0000 (21:05 +0000)]
Fix llvm::CloneModule to correctly clone globals. Patch per bug report by Simon Moll on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137654
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 21:00:18 +0000 (21:00 +0000)]
Fix predicates methods on Instruction to handle atomic load/store correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137652
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 20:55:03 +0000 (20:55 +0000)]
Fix this test to avoid leaving a temporary file behind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137651
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 20:54:19 +0000 (20:54 +0000)]
Misc analysis passes that need to be aware of atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137650
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 20:53:08 +0000 (20:53 +0000)]
Move MatchResultTy enum into base class definition.
No need for it to be redefined as part of every derived target asm parser
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137649
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 20:52:09 +0000 (20:52 +0000)]
Atomic load/store support in LICM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137648
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:51:32 +0000 (20:51 +0000)]
Enforce the constraint that Rt must be even on LDRD/STRD instructions in ARM mode. Update tests to reflect this fact.
Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137647
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 20:50:36 +0000 (20:50 +0000)]
Add an ipsccp test. Migrated from test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137646
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:15:43 +0000 (20:15 +0000)]
Add a test for Thumb1 LDRSH decoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137645
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:12:03 +0000 (20:12 +0000)]
Add testcase for STRH. Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137644
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:11:11 +0000 (20:11 +0000)]
Remove dead classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137643
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 20:10:51 +0000 (20:10 +0000)]
The "landingpad" instruction will never be "trivially" dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137642
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:08:25 +0000 (20:08 +0000)]
Fix incorrect encoding of UMAAL and friends. Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137641
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 19:01:20 +0000 (19:01 +0000)]
Simplify mapping to variable from its abstract variable info.
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137637
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 19:00:06 +0000 (19:00 +0000)]
Fix decoding LDRSB and LDRSH in Thumb1 mode. Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137636
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 18:44:44 +0000 (18:44 +0000)]
Fix problems decoding the to/from-lane NEON memory instructions, and add a comprehensive NEON decoding testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137635
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 18:40:16 +0000 (18:40 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137632
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 18:35:42 +0000 (18:35 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137631
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:23:40 +0000 (18:23 +0000)]
Don't try to sink the landingpad instruction. It's immobile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137629
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:22:49 +0000 (18:22 +0000)]
The landingpad instruction isn't loop-invariant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137628
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:22:00 +0000 (18:22 +0000)]
Mark the SCC as "might unwind" if we run into a 'resume' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137627
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:21:07 +0000 (18:21 +0000)]
Skip the insertion iterator past the landingpad instruction if there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137626
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 17:57:41 +0000 (17:57 +0000)]
Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137621
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 17:30:25 +0000 (17:30 +0000)]
Tidy up trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137619
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 17:24:54 +0000 (17:24 +0000)]
Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137618
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 16:52:24 +0000 (16:52 +0000)]
Update comment to reflect MC target machine refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137615
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 14 Aug 2011 08:01:36 +0000 (08:01 +0000)]
Add inlining for the new EH scheme.
This builds off of the current scheme, but instead of llvm.eh.exception and
llvm.eh.selector, it uses the landingpad instruction. And instead of
llvm.eh.resume, it uses the resume instruction.
Because of the invariants in the landing pad instruction, a lot of code that's
currently needed to find the appropriate intrinsic calls for an invoke
instruction won't be needed once we go to the new EH scheme. The "FIXME"s tell
us what to remove after we switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137576
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 14 Aug 2011 04:51:49 +0000 (04:51 +0000)]
This transform is not safe. Thanks to Eli for pointing that out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137575
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 14 Aug 2011 03:41:33 +0000 (03:41 +0000)]
Don't attempt to add 'nsw' when intermediate instructions had no such guarantee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137572
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 14 Aug 2011 01:45:19 +0000 (01:45 +0000)]
Teach instcombine to preserve the nsw bit by doing an after-the-fact analysis
when combining add and sub instructions. Patch by Pranav Bhandarkar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137570
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Aug 2011 00:34:04 +0000 (00:34 +0000)]
EE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.
With libcxx, it seems <unistd.h> would not be provided. Thanks to Ryuta Suzuki.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137567
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 13 Aug 2011 20:31:45 +0000 (20:31 +0000)]
Fix PR 10635. When generating integer constants, the constant element type may
be illegal, even if the requested vector type is legal. Testcase is one of the
disabled ARM tests in the vector-select patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137562
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 13 Aug 2011 17:06:34 +0000 (17:06 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137556
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 13 Aug 2011 05:14:55 +0000 (05:14 +0000)]
Expand VMOVQQQQ pseudo instructions.
Apparently we never added code to expand these pseudo instructions, and in
over a year, no one has noticed. Our register allocator must be awesome!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137551
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 13 Aug 2011 01:04:44 +0000 (01:04 +0000)]
Remove the last improper use of getGlobalContext() from LLVM.
This caused a race condition where a thread calls ~LLVMContextImpl which calls
Module::dropAllReferences which calls begin() on an empty ilist that would
create the sentinel, which racily accesses the global context.
This can not be fixed by locking inside createSentinel because the lock would
need to be shared with all users of the global context, including those that
reside outside LLVM's own code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137546
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Aug 2011 23:37:55 +0000 (23:37 +0000)]
Fix the getelementptr description so it is extremely clear that array indices passed to getelementptr are signed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137538
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Aug 2011 22:50:01 +0000 (22:50 +0000)]
Move "atomic" and "volatile" designations on instructions after the opcode
of the instruction.
Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137527
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 12 Aug 2011 22:20:41 +0000 (22:20 +0000)]
ARM STR_POST_IMM offset encoding fix in load/store optimizer.
Tidy up the code a bit and push the definition of the value next to the uses
to try to minimize this sort of issue from arising again while I'm at it.
rdar://
9945172
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137525
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:54:42 +0000 (21:54 +0000)]
Fix comment!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137521
91177308-0d34-0410-b5e6-
96231b3b80d8