oota-llvm.git
12 years agoUntil now all debug info MDNodes referred to a root MDNode, a compile unit. This...
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

12 years agoA bunch of misc fixes to SCCPSolver::ResolvedUndefsIn, including a fix to stop
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

12 years agoRemove tests that have been obsoleted or migrated to clang/optimizer tests.
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

12 years agoAdd missing exit for 'case'.
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

12 years agoThumb assembly parsing and encoding for ADD(register) instruction.
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

12 years agoThe resume instruction may throw. Return 'true' in this case.
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

12 years agoMove some logic into a helper function and expand the commentary.
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

12 years agoMinor bug in SCCP found by inspection. (I don't think it's possible to hit this...
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

12 years agoAdd testcase for r137746.
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

12 years agoIncrement debug info version to accommodate upcoming change in debug info node structure.
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

12 years agoTidy up formatting.
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

12 years agoARM thumb assembly parsing for arithmetic flag setting instructions.
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

12 years agoUse the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>'
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

12 years agoAdd getFirstInsertionPt() method.
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

12 years agoI think there was some confusion about what I meant. :-) Replacing the comment.
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

12 years agoPrefer diagnostics from target predicate in asm matcher.
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

12 years agoRemove unused Target argument from AsmParser construction methods.
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

12 years agoRemove unused forward declaration.
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

12 years agoInstead of always leaving the work to the generic legalizer when
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

12 years agoRemove unnecessary version check.
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

12 years agoAdd test case for r137711.
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

12 years agoARM .align NOP padding uses different encoding pre-ARMv6.
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

12 years agoTidy up. Trailing whitespace.
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

12 years agoRevert r137562 because it caused PR10674
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

12 years agoAdd a mechanism for optimisation plugins to register passes that all front ends can...
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

12 years agoRemove unimplemented method. Fixes PR10658.
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

12 years agocmake/modules/FindBison.cmake: It must be unneeded any more.
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

12 years agoA few places where we want to skip the landingpad instruction for insertion.
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

12 years agoFix handling of double precision loads and stores when Mips1 is targeted.
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

12 years agoDefine function MipsMCInstLower::LowerOperand.
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

12 years agoAdd parameter Offset to MipsMCInstLower::LowerSymbolOperand.
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

12 years agoFix test.
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

12 years agoRevert a bit of r137667; the logic in question can safely handle atomic load/store.
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

12 years agoMigrate this test from llvm/test/FrontendC++/ptr-to-method-devirt.cpp and
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

12 years agoAfter talking with Bill, it seems like the LandingPad handling here is likely
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

12 years agoMinor comment fixes.
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

12 years agoUpdate SimplifyCFG for atomic operations.
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

12 years agoAdd comments and test for atomic load/store and mem2reg.
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

12 years agoRefactor.
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

12 years agoAdd a test file for Thumb2 NEON.
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

12 years agoSpecify a necessary fixed bit for VLD3DUP, and otherwise rearrange the Thumb2 NEON...
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

12 years agoWhile I'm here, remove the "_alt" hacks to a series of INSERT_SUBREG and
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

12 years agoReorder declarations of vmovmskp* and also put the necessary AVX
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

12 years agoContinue to hoist uses of getCompileUnit() up. The goal is to get rid of uses of...
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

12 years agoAvoid evaluating Neon macro arguments more than once by disabling type checks.
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

12 years agoIn places where it's using "getFirstNonPHI", skip the landingpad instruction if neces...
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

12 years agoMCTargetAsmParser target match predicate support.
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

12 years agoAdd a finalize() hook, that'll let DIBuilder construct compile unit lazily.
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

12 years agoDon't sink the instruction to before a landingpad instruction.
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

12 years agoThis is somewhat déjà-vu, but avoid using getCompileUnit() as much as possible.
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

12 years agoUpdate inter-procedural optimizations for atomic load/store.
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

12 years agoUpdate instcombine for atomic load/store.
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

12 years agoRefactor. Variables are part of compile unit so let CompileUnit create new variable.
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

12 years agoAdd some comments here because the lack of a check for volatile/atomic here is a...
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

12 years agoFix PR10656. It's only profitable to use 128-bit inserts and extracts
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

12 years agoThere is no need to maintain a set to keep track of variables that use location expre...
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

12 years agoFix warning.
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

12 years agoAdd some more comprehensive VFP decoding tests.
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

12 years agoSimplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
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

12 years agoDuncan pointed out that the LandingPadInst might read memory. (It might also
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

12 years agoFix llvm::CloneModule to correctly clone globals. Patch per bug report by Simon...
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

12 years agoFix predicates methods on Instruction to handle atomic load/store correctly.
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

12 years agoFix this test to avoid leaving a temporary file behind.
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

12 years agoMisc analysis passes that need to be aware of atomic load/store.
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

12 years agoMove MatchResultTy enum into base class definition.
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

12 years agoAtomic load/store support in LICM.
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

12 years agoEnforce the constraint that Rt must be even on LDRD/STRD instructions in ARM mode...
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

12 years agoAdd an ipsccp test. Migrated from test/FrontendC++.
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

12 years agoAdd a test for Thumb1 LDRSH decoding.
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

12 years agoAdd testcase for STRH. Patch by James Molloy.
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

12 years agoRemove dead classes.
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

12 years agoThe "landingpad" instruction will never be "trivially" dead.
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

12 years agoFix incorrect encoding of UMAAL and friends. Patch by James Molloy.
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

12 years agoSimplify mapping to variable from its abstract variable info.
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

12 years agoFix decoding LDRSB and LDRSH in Thumb1 mode. Patch by James Molloy.
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

12 years agoFix problems decoding the to/from-lane NEON memory instructions, and add a comprehens...
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

12 years agoRefactor.
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

12 years agoRefactor.
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

12 years agoDon't try to sink the landingpad instruction. It's immobile.
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

12 years agoThe landingpad instruction isn't loop-invariant.
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

12 years agoMark the SCC as "might unwind" if we run into a 'resume' instruction.
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

12 years agoSkip the insertion iterator past the landingpad instruction if there.
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

12 years agoRefactor. Global variables are part of compile unit so let CompileUnit create new...
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

12 years agoTidy up trailing whitespace.
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

12 years agoRefactor. A subprogram is part of compile unit so let CompileUnit construct new subpr...
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

12 years agoUpdate comment to reflect MC target machine refactor.
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

12 years agoAdd inlining for the new EH scheme.
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

12 years agoThis transform is not safe. Thanks to Eli for pointing that out!
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

12 years agoDon't attempt to add 'nsw' when intermediate instructions had no such guarantee.
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

12 years agoTeach instcombine to preserve the nsw bit by doing an after-the-fact analysis
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

12 years agoEE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.
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

12 years agoFix PR 10635. When generating integer constants, the constant element type may
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

12 years agoFix test.
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

12 years agoExpand VMOVQQQQ pseudo instructions.
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

12 years agoRemove the last improper use of getGlobalContext() from LLVM.
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

12 years agoFix the getelementptr description so it is extremely clear that array indices passed...
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

12 years agoMove "atomic" and "volatile" designations on instructions after the opcode
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

12 years agoARM STR_POST_IMM offset encoding fix in load/store optimizer.
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

12 years agoFix comment!
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

12 years agoSome reorganization of atomic docs. Added explicit section for NonAtomic. Added...
Eli Friedman [Fri, 12 Aug 2011 21:50:54 +0000 (21:50 +0000)]
Some reorganization of atomic docs.  Added explicit section for NonAtomic.  Added example for illegal non-atomic operation.

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