oota-llvm.git
14 years agoReport error if codegen tries to instantiate a ARM target when the cpu does support...
Evan Cheng [Wed, 11 Aug 2010 07:17:46 +0000 (07:17 +0000)]
Report error if codegen tries to instantiate a ARM target when the cpu does support it. e.g. cortex-m* processors.

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

14 years agoArchV7M implies HW division instructions.
Evan Cheng [Wed, 11 Aug 2010 07:00:16 +0000 (07:00 +0000)]
ArchV7M implies HW division instructions.

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

14 years agoArchV6T2, V7A, and V7M implies Thumb2; Archv7A implies NEON.
Evan Cheng [Wed, 11 Aug 2010 06:57:53 +0000 (06:57 +0000)]
ArchV6T2, V7A, and V7M implies Thumb2; Archv7A implies NEON.

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

14 years agoAdd ARM Archv6M and let it implies FeatureDB (having dmb, etc.)
Evan Cheng [Wed, 11 Aug 2010 06:51:54 +0000 (06:51 +0000)]
Add ARM Archv6M and let it implies FeatureDB (having dmb, etc.)

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

14 years agoMC/ARM: Add basic support for handling predication by parsing it out of the mnemonic...
Daniel Dunbar [Wed, 11 Aug 2010 06:37:20 +0000 (06:37 +0000)]
MC/ARM: Add basic support for handling predication by parsing it out of the mnemonic into a separate operand form.

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

14 years agoMC/ARM: Split mnemonic on '.' characters.
Daniel Dunbar [Wed, 11 Aug 2010 06:37:16 +0000 (06:37 +0000)]
MC/ARM: Split mnemonic on '.' characters.

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

14 years agoMC/ARM: Fill in ARMOperand::dump a bit.
Daniel Dunbar [Wed, 11 Aug 2010 06:37:12 +0000 (06:37 +0000)]
MC/ARM: Fill in ARMOperand::dump a bit.

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

14 years agollvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation...
Daniel Dunbar [Wed, 11 Aug 2010 06:37:09 +0000 (06:37 +0000)]
llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.

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

14 years agoMCAsmParser: Add dump() hook to MCParsedAsmOperand.
Daniel Dunbar [Wed, 11 Aug 2010 06:37:04 +0000 (06:37 +0000)]
MCAsmParser: Add dump() hook to MCParsedAsmOperand.

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

14 years agotblgen/AsmMatcher: Treat '.' in assembly strings as a token separator.
Daniel Dunbar [Wed, 11 Aug 2010 06:36:59 +0000 (06:36 +0000)]
tblgen/AsmMatcher: Treat '.' in assembly strings as a token separator.

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

14 years agoMC/ARM: Add an ARMOperand class for condition codes.
Daniel Dunbar [Wed, 11 Aug 2010 06:36:53 +0000 (06:36 +0000)]
MC/ARM: Add an ARMOperand class for condition codes.

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

14 years agoReally control isel of barrier instructions with cpu feature.
Evan Cheng [Wed, 11 Aug 2010 06:36:31 +0000 (06:36 +0000)]
Really control isel of barrier instructions with cpu feature.

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

14 years agoAdd Cortex-M0 support. It's a ARMv6m device (no ARM mode) with some 32-bit
Evan Cheng [Wed, 11 Aug 2010 06:30:38 +0000 (06:30 +0000)]
Add Cortex-M0 support. It's a ARMv6m device (no ARM mode) with some 32-bit
instructions: dmb, dsb, isb, msr, and mrs.

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

14 years ago- Add subtarget feature -mattr=+db which determine whether an ARM cpu has the
Evan Cheng [Wed, 11 Aug 2010 06:22:01 +0000 (06:22 +0000)]
- Add subtarget feature -mattr=+db which determine whether an ARM cpu has the
  memory and synchronization barrier dmb and dsb instructions.
- Change instruction names to something more sensible (matching name of actual
  instructions).
- Added tests for memory barrier codegen.

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

14 years agoMC/ARM: Switch to using the generated match functions instead of stub implementations.
Daniel Dunbar [Wed, 11 Aug 2010 05:24:50 +0000 (05:24 +0000)]
MC/ARM: Switch to using the generated match functions instead of stub implementations.

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

14 years agoMC/ARM: Enable generation of the ARM asm matcher, not that it can do much.
Daniel Dunbar [Wed, 11 Aug 2010 05:09:20 +0000 (05:09 +0000)]
MC/ARM: Enable generation of the ARM asm matcher, not that it can do much.

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

14 years agoARM: Mark some disassembler only instructions as not available for matching --
Daniel Dunbar [Wed, 11 Aug 2010 04:46:13 +0000 (04:46 +0000)]
ARM: Mark some disassembler only instructions as not available for matching --
for some reason they have a very odd MCInst form where the operands overlap, but
I haven't dug in to find out why yet.

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

14 years agoARM: Quote $p in an asm string.
Daniel Dunbar [Wed, 11 Aug 2010 04:46:10 +0000 (04:46 +0000)]
ARM: Quote $p in an asm string.

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

14 years agotblgen/AsmMatcher: Downgrade instructions with tied operands to a debug-only warning...
Daniel Dunbar [Wed, 11 Aug 2010 04:46:08 +0000 (04:46 +0000)]
tblgen/AsmMatcher: Downgrade instructions with tied operands to a debug-only warning, for now.

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

14 years agoImprove indentation.
Owen Anderson [Wed, 11 Aug 2010 04:24:25 +0000 (04:24 +0000)]
Improve indentation.

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

14 years agoRemove AVX 256-bit cast intrinsics now that clang is using __builtin_shufflevector...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 02:15:33 +0000 (02:15 +0000)]
Remove AVX 256-bit cast intrinsics now that clang is using __builtin_shufflevector for those

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

14 years agoRemove AVX 256-bit unpack and interleave intrinsics now that clang is using __builtin...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 01:44:11 +0000 (01:44 +0000)]
Remove AVX 256-bit unpack and interleave intrinsics now that clang is using __builtin_shufflevector for those

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

14 years agoRemove AVX 256-bit shuffle intrinsics now that clang is using __builtin_shufflevector...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 01:18:26 +0000 (01:18 +0000)]
Remove AVX 256-bit shuffle intrinsics now that clang is using __builtin_shufflevector for those

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

14 years agoUpdate test to match output of optimize compares for ARM.
Bill Wendling [Wed, 11 Aug 2010 01:05:02 +0000 (01:05 +0000)]
Update test to match output of optimize compares for ARM.

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

14 years agoCMake: corrections on LLVM.cmake external services.
Oscar Fuentes [Wed, 11 Aug 2010 00:51:32 +0000 (00:51 +0000)]
CMake: corrections on LLVM.cmake external services.

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

14 years agoHandle ARM compares as well as converting for ARM adds, subs, and thumb2's adds.
Bill Wendling [Wed, 11 Aug 2010 00:23:00 +0000 (00:23 +0000)]
Handle ARM compares as well as converting for ARM adds, subs, and thumb2's adds.

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

14 years agoMark ARM compare instructions as isCompare.
Bill Wendling [Wed, 11 Aug 2010 00:22:27 +0000 (00:22 +0000)]
Mark ARM compare instructions as isCompare.

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

14 years agoMake it possible to set the cpu used for codegen.
Rafael Espindola [Wed, 11 Aug 2010 00:15:13 +0000 (00:15 +0000)]
Make it possible to set the cpu used for codegen.

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

14 years agoWhen analyzing loop exit conditions combined with and and or, don't
Dan Gohman [Wed, 11 Aug 2010 00:12:36 +0000 (00:12 +0000)]
When analyzing loop exit conditions combined with and and or, don't
make any assumptions about when the two conditions will agree on when
to permit the loop to exit. This fixes PR7845.

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

14 years agolto: Fix an inverted conditional which prevented the addition of symbols scraped
Daniel Dunbar [Wed, 11 Aug 2010 00:11:19 +0000 (00:11 +0000)]
lto: Fix an inverted conditional which prevented the addition of symbols scraped
from inline assembly, except in cases where they had already been seen (in which
case they would get added twice).
 - I can't see how this ever worked...

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

14 years agolto: Fix gratuitous memory leaks.
Daniel Dunbar [Wed, 11 Aug 2010 00:11:17 +0000 (00:11 +0000)]
lto: Fix gratuitous memory leaks.

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

14 years agoAdd a separate ARM instruction format for Saturate instructions.
Bob Wilson [Wed, 11 Aug 2010 00:01:18 +0000 (00:01 +0000)]
Add a separate ARM instruction format for Saturate instructions.
(I discovered 2 more copies of the ARM instruction format list, bringing the
total to 4!!  Two of them were already out of sync.  I haven't yet gotten into
the disassembler enough to know the best way to fix this, but something needs
to be done.)  Add support for encoding these instructions.

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

14 years agoAvoid multiple definition warnings when both config.h and
Oscar Fuentes [Tue, 10 Aug 2010 23:48:22 +0000 (23:48 +0000)]
Avoid multiple definition warnings when both config.h and
llvm-config.h are included.

This is the cmake counterpart of r110547. See bug #7809.

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

14 years agolto: Reduce nesting.
Daniel Dunbar [Tue, 10 Aug 2010 23:46:46 +0000 (23:46 +0000)]
lto: Reduce nesting.

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

14 years agoLTOModule.cpp: Fix numerous style issues.
Daniel Dunbar [Tue, 10 Aug 2010 23:46:39 +0000 (23:46 +0000)]
LTOModule.cpp: Fix numerous style issues.

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

14 years agoRename and reorder the arguments to isImpliedCond, for consistency and clarity.
Dan Gohman [Tue, 10 Aug 2010 23:46:30 +0000 (23:46 +0000)]
Rename and reorder the arguments to isImpliedCond, for consistency and clarity.

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

14 years agoWe already have this as OperandNode.
Eric Christopher [Tue, 10 Aug 2010 23:46:20 +0000 (23:46 +0000)]
We already have this as OperandNode.

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

14 years agoCBZ and CBNZ are implemented.
Evan Cheng [Tue, 10 Aug 2010 23:27:11 +0000 (23:27 +0000)]
CBZ and CBNZ are implemented.

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

14 years agoAdd AVX matching patterns to Packed Bit Test intrinsics.
Bruno Cardoso Lopes [Tue, 10 Aug 2010 23:25:42 +0000 (23:25 +0000)]
Add AVX matching patterns to Packed Bit Test intrinsics.

Apply the same approach of SSE4.1 ptest intrinsics but
create a new x86 node "testp" since AVX introduces
vtest{ps}{pd} instructions which set ZF and CF depending
on sign bit AND and ANDN of packed floating-point sources.

This is slightly different from what the "ptest" does.
Tests comming with the other 256 intrinsics tests.

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

14 years agoNow that we're using ConstantRange to represent potential values, make use of that...
Owen Anderson [Tue, 10 Aug 2010 23:20:01 +0000 (23:20 +0000)]
Now that we're using ConstantRange to represent potential values, make use of that represenation to
create constraints from comparisons other than eq/neq.

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

14 years agoThe optimize comparisons pass removes the "cmp" instruction this is checking for.
Bill Wendling [Tue, 10 Aug 2010 22:16:05 +0000 (22:16 +0000)]
The optimize comparisons pass removes the "cmp" instruction this is checking for.

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

14 years agoAdd test for recent instcombine vector shuffle enhancement
Nate Begeman [Tue, 10 Aug 2010 21:58:00 +0000 (21:58 +0000)]
Add test for recent instcombine vector shuffle enhancement

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

14 years agoupgrade to use new intrinsics, patch by Dan Hipschman!
Chris Lattner [Tue, 10 Aug 2010 21:45:38 +0000 (21:45 +0000)]
upgrade to use new intrinsics, patch by Dan Hipschman!

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

14 years agoAdd the minimal amount of smarts necessary to instcombine of shufflevectors to recognize
Nate Begeman [Tue, 10 Aug 2010 21:38:12 +0000 (21:38 +0000)]
Add the minimal amount of smarts necessary to instcombine of shufflevectors to recognize
patterns generated by clang for transpose of a matrix in generic vectors.  This is made
of two parts:

1) Propagating vector extracts of hi/lo half into their users
2) Recognizing an insertion of even elements followed by the odd elements as an unpack.

Testcase to come, but this shrinks the # of shuffle instructions generated on x86 from ~40 to the minimal 8.

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

14 years agoTurn optimize compares back on with fix. We needed to test that a machine op was
Bill Wendling [Tue, 10 Aug 2010 21:38:11 +0000 (21:38 +0000)]
Turn optimize compares back on with fix. We needed to test that a machine op was
a register before checking if it was defined.

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

14 years agoGive up on register class recalculation when the register is used with subreg
Jakob Stoklund Olesen [Tue, 10 Aug 2010 21:16:16 +0000 (21:16 +0000)]
Give up on register class recalculation when the register is used with subreg
operands. We don't currently have a hook to provide "the largest super class of
A where all registers' getSubReg(subidx) is valid and in B".

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

14 years agoRevert r110718; it broke clang-i386-darwin9.
Dan Gohman [Tue, 10 Aug 2010 20:49:33 +0000 (20:49 +0000)]
Revert r110718; it broke clang-i386-darwin9.

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

14 years agoAvoid editing the current live interval during remat.
Jakob Stoklund Olesen [Tue, 10 Aug 2010 20:45:07 +0000 (20:45 +0000)]
Avoid editing the current live interval during remat.

The live interval may be used for a spill slot as well, and that spill slot
could be shared by split registers. We cannot shrink it, even if we know the
current register won't need the spill slot in that range.

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

14 years agoMore debug spew
Jakob Stoklund Olesen [Tue, 10 Aug 2010 20:45:01 +0000 (20:45 +0000)]
More debug spew

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

14 years agoTurn optimize cmps on by default so that we can get some testing by the nightly
Bill Wendling [Tue, 10 Aug 2010 20:23:02 +0000 (20:23 +0000)]
Turn optimize cmps on by default so that we can get some testing by the nightly
ARM testers.

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

14 years agoAdd missing argument. CreateCompositeTypeEx() users, please verify.
Devang Patel [Tue, 10 Aug 2010 20:22:49 +0000 (20:22 +0000)]
Add missing argument. CreateCompositeTypeEx() users, please verify.

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

14 years agoSwitch over to using ConstantRange to track integral values.
Owen Anderson [Tue, 10 Aug 2010 20:03:09 +0000 (20:03 +0000)]
Switch over to using ConstantRange to track integral values.

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

14 years agoDo not forget debug info for enums. Use named mdnode to keep track of these types.
Devang Patel [Tue, 10 Aug 2010 20:01:20 +0000 (20:01 +0000)]
Do not forget debug info for enums. Use named mdnode to keep track of these types.

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

14 years agotests: Don't error out if HOME isn't present in t the environment.
Daniel Dunbar [Tue, 10 Aug 2010 19:36:25 +0000 (19:36 +0000)]
tests: Don't error out if HOME isn't present in t the environment.

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

14 years agoDelete some unused instructions.
Evan Cheng [Tue, 10 Aug 2010 19:36:22 +0000 (19:36 +0000)]
Delete some unused instructions.

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

14 years agoRe-apply r110655 with fixes. Epilogue must restore sp from fp if the function stack...
Evan Cheng [Tue, 10 Aug 2010 19:30:19 +0000 (19:30 +0000)]
Re-apply r110655 with fixes. Epilogue must restore sp from fp if the function stack frame has a var-sized object.

Also added a test case to check for the added benefit of this patch: it's optimizing away the unnecessary restore of sp from fp for some non-leaf functions.

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

14 years agoMake it possible to set the flags passed to the assembler.
Rafael Espindola [Tue, 10 Aug 2010 18:55:09 +0000 (18:55 +0000)]
Make it possible to set the flags passed to the assembler.

Nick, please review.

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

14 years agoImplement register class inflation.
Jakob Stoklund Olesen [Tue, 10 Aug 2010 18:37:40 +0000 (18:37 +0000)]
Implement register class inflation.

When splitting a live range, the new registers have fewer uses and the
permissible register class may be less constrained. Recompute the register class
constraint from the uses of new registers created for a split. This may let them
be allocated from a larger set, possibly avoiding a spill.

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

14 years agoRevert r110655, "Fix ARM hasFP() semantics. It should return true whenever FP
Daniel Dunbar [Tue, 10 Aug 2010 18:32:02 +0000 (18:32 +0000)]
Revert r110655, "Fix ARM hasFP() semantics. It should return true whenever FP
register is", it breaks a couple test-suite tests.

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

14 years agoMC/AsmParser: Fix a bug in macro argument parsing, which was dropping
Daniel Dunbar [Tue, 10 Aug 2010 17:38:52 +0000 (17:38 +0000)]
MC/AsmParser: Fix a bug in macro argument parsing, which was dropping
parentheses from argument lists.

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

14 years agoInstall llvmCore_Sim to the simulator SDK directory. Radar 8282845.
Bob Wilson [Tue, 10 Aug 2010 17:13:58 +0000 (17:13 +0000)]
Install llvmCore_Sim to the simulator SDK directory.  Radar 8282845.

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

14 years agoRecalculate the spill weight and allocation hint for virtual registers created
Jakob Stoklund Olesen [Tue, 10 Aug 2010 17:07:22 +0000 (17:07 +0000)]
Recalculate the spill weight and allocation hint for virtual registers created
during live range splitting.

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

14 years agoFix test for more architectures. Patch by Tobias Grosser.
Jakob Stoklund Olesen [Tue, 10 Aug 2010 16:48:24 +0000 (16:48 +0000)]
Fix test for more architectures. Patch by Tobias Grosser.

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

14 years agoFix silly bug.
Rafael Espindola [Tue, 10 Aug 2010 16:32:15 +0000 (16:32 +0000)]
Fix silly bug.

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

14 years agoRevert "MC/MachO: Fix possible null pointer dereference."
Michael J. Spencer [Tue, 10 Aug 2010 16:00:49 +0000 (16:00 +0000)]
Revert "MC/MachO: Fix possible null pointer dereference."

This reverts commit 110575.

Target.isAbsolute() is true if SD would be null.

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

14 years agoUse RunPassesOn as in the rest of bugpoint.
Rafael Espindola [Tue, 10 Aug 2010 15:46:11 +0000 (15:46 +0000)]
Use RunPassesOn as in the rest of bugpoint.

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

14 years agoSimplify generating LLVMC_BUILTIN_PLUGIN.
Mikhail Glushenkov [Tue, 10 Aug 2010 14:49:29 +0000 (14:49 +0000)]
Simplify generating LLVMC_BUILTIN_PLUGIN.

Patch by NAKAMURA Takumi!

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

14 years agoTrailing whitespace.
Mikhail Glushenkov [Tue, 10 Aug 2010 14:49:24 +0000 (14:49 +0000)]
Trailing whitespace.

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

14 years agoMark this variable as used.
Chandler Carruth [Tue, 10 Aug 2010 10:39:25 +0000 (10:39 +0000)]
Mark this variable as used.

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

14 years agoRegionInfo: Do not assert if a BB is not part of the dominance tree.
Tobias Grosser [Tue, 10 Aug 2010 09:54:35 +0000 (09:54 +0000)]
RegionInfo: Do not assert if a BB is not part of the dominance tree.

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

14 years agoFix failing testcase.
Tobias Grosser [Tue, 10 Aug 2010 09:54:29 +0000 (09:54 +0000)]
Fix failing testcase.

Those look like typos to me.

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

14 years agoHandle TAG_constant for integers.
Devang Patel [Tue, 10 Aug 2010 07:11:13 +0000 (07:11 +0000)]
Handle TAG_constant for integers.

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

14 years agoFix ARM hasFP() semantics. It should return true whenever FP register is
Evan Cheng [Tue, 10 Aug 2010 06:26:49 +0000 (06:26 +0000)]
Fix ARM hasFP() semantics. It should return true whenever FP register is
reserved, not available for general allocation. This eliminates all the
extra checks for Darwin.

This change also fixes the use of FP to access frame indices in leaf
functions and cleaned up some confusing code in epilogue emission.

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

14 years agoUpdate CMake...sorry for the breakage.
Bill Wendling [Tue, 10 Aug 2010 05:16:06 +0000 (05:16 +0000)]
Update CMake...sorry for the breakage.

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

14 years agoSimplify.
Devang Patel [Tue, 10 Aug 2010 04:12:17 +0000 (04:12 +0000)]
Simplify.

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

14 years agoDrop "const". It does not add value here.
Devang Patel [Tue, 10 Aug 2010 04:09:06 +0000 (04:09 +0000)]
Drop "const". It does not add value here.

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

14 years agoAdd AVX movnt{pd,ps,dq} 256-bit intrinsics
Bruno Cardoso Lopes [Tue, 10 Aug 2010 02:49:24 +0000 (02:49 +0000)]
Add AVX movnt{pd,ps,dq} 256-bit intrinsics

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

14 years agoAdd missing null check reported by Amaury Pouly.
Evan Cheng [Tue, 10 Aug 2010 02:39:45 +0000 (02:39 +0000)]
Add missing null check reported by Amaury Pouly.

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

14 years agoAdd AVX movmsk 256-bit intrinsics
Bruno Cardoso Lopes [Tue, 10 Aug 2010 02:34:56 +0000 (02:34 +0000)]
Add AVX movmsk 256-bit intrinsics

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

14 years agoRemove replicate intrinsics, clang will generate shufflevector for those. The shuffle...
Bruno Cardoso Lopes [Tue, 10 Aug 2010 02:25:35 +0000 (02:25 +0000)]
Remove replicate intrinsics, clang will generate shufflevector for those. The shuffles can't be matched by x86 codegen yet, but will soon

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

14 years agoSupport AVX 256-bit load and store intrinsics
Bruno Cardoso Lopes [Tue, 10 Aug 2010 01:43:16 +0000 (01:43 +0000)]
Support AVX 256-bit load and store intrinsics

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

14 years agoUse i32 instead of i8 for dot product intrinsic
Bruno Cardoso Lopes [Tue, 10 Aug 2010 01:40:05 +0000 (01:40 +0000)]
Use i32 instead of i8 for dot product intrinsic

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

14 years agoDo not include file static variable in pubnames list.
Devang Patel [Tue, 10 Aug 2010 01:37:23 +0000 (01:37 +0000)]
Do not include file static variable in pubnames list.
Refactor and simplify code to avoid redundant checks.

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

14 years agoExpand uses of python 2.6's "A if B else C" syntax into regular
Dan Gohman [Tue, 10 Aug 2010 01:03:34 +0000 (01:03 +0000)]
Expand uses of python 2.6's "A if B else C" syntax into regular
if-else statements, to hopefully support older pythons (PR7850).

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

14 years agoremove code setting rw locks to PTHREAD_PROCESS_PRIVATE, which
Chris Lattner [Tue, 10 Aug 2010 00:34:06 +0000 (00:34 +0000)]
remove code setting rw locks to PTHREAD_PROCESS_PRIVATE, which
is the default.  Patch by NAKAMURA Takumi!

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

14 years agoPatterns to match AVX cmp instructions
Bruno Cardoso Lopes [Tue, 10 Aug 2010 00:13:20 +0000 (00:13 +0000)]
Patterns to match AVX cmp instructions

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

14 years agoTranspose the calculation of spill weights such that we are calculating one
Jakob Stoklund Olesen [Tue, 10 Aug 2010 00:02:26 +0000 (00:02 +0000)]
Transpose the calculation of spill weights such that we are calculating one
register at a time. This turns out to be slightly faster than iterating over
instructions, but more importantly, it allows us to compute spill weights for
new registers created after the spill weight pass has run.

Also compute the allocation hint at the same time as the spill weight. This
allows us to use the spill weight as a cost metric for copies, and choose the
most profitable hint if there is more than one possibility.

The new hints provide a very small (< 0.1%) but universal code size improvement.

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

14 years agoAdd matching patterns for vblend AVX intrinsics
Bruno Cardoso Lopes [Tue, 10 Aug 2010 00:02:05 +0000 (00:02 +0000)]
Add matching patterns for vblend AVX intrinsics

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

14 years agoFix the last argument type of AVX vblend intrinsics
Bruno Cardoso Lopes [Tue, 10 Aug 2010 00:00:22 +0000 (00:00 +0000)]
Fix the last argument type of AVX vblend intrinsics

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

14 years agoMerge the OptimizeExts and OptimizeCmps passes into one PeepholeOptimizer
Bill Wendling [Mon, 9 Aug 2010 23:59:04 +0000 (23:59 +0000)]
Merge the OptimizeExts and OptimizeCmps passes into one PeepholeOptimizer
pass. This pass should expand with all of the small, fine-grained optimization
passes to reduce compile time and increase happiment.

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

14 years agoUndo accidental commit.
Devang Patel [Mon, 9 Aug 2010 23:28:52 +0000 (23:28 +0000)]
Undo accidental commit.

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

14 years agoSimplify. Avoid redundant checks.
Devang Patel [Mon, 9 Aug 2010 23:26:06 +0000 (23:26 +0000)]
Simplify. Avoid redundant checks.

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

14 years agoWording.
Eric Christopher [Mon, 9 Aug 2010 22:52:47 +0000 (22:52 +0000)]
Wording.

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

14 years agoNext bit of support for the dwarf .file directive. This patch takes the
Kevin Enderby [Mon, 9 Aug 2010 22:52:14 +0000 (22:52 +0000)]
Next bit of support for the dwarf .file directive.  This patch takes the
previously collected info from the .file directives and outputs the encoded
bytes for it.  For now this is only in the Mach-O streamer but at some point
will move to a more generic place.

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

14 years agoARMBaseRegisterInfo::hasFP() has been broken for a while now. :-(
Evan Cheng [Mon, 9 Aug 2010 22:32:45 +0000 (22:32 +0000)]
ARMBaseRegisterInfo::hasFP() has been broken for a while now. :-(
This will always be false before PEI:
(DisableFramePointerElim(MF) && MFI->adjustsStack())
Which means it's going to make r11 available as a general purpose register even
if -disable-fp-elim is specified. It's working on Darwin only because r7 is
always reserved. But it's obviously broken for other targets.

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

14 years agoAdd VCVTPD2PS, VCVTPS2DQ, VCVTPS2PDY, VCVTTPD2DQY, VCVTTPS2DQ and VCVTPD2DQ 256-bit...
Bruno Cardoso Lopes [Mon, 9 Aug 2010 21:51:56 +0000 (21:51 +0000)]
Add VCVTPD2PS, VCVTPS2DQ, VCVTPS2PDY, VCVTTPD2DQY, VCVTTPS2DQ and VCVTPD2DQ 256-bit conversion intrinsics

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

14 years agoRefactor.
Devang Patel [Mon, 9 Aug 2010 21:39:24 +0000 (21:39 +0000)]
Refactor.

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

14 years agoAdd patterns to AVX conversions instructions. Do that instead of declaring more intru...
Bruno Cardoso Lopes [Mon, 9 Aug 2010 21:24:59 +0000 (21:24 +0000)]
Add patterns to AVX conversions instructions. Do that instead of declaring more intructions whenever is possible, more coming

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

14 years agoMake it possible to set the target triple and expose that with an option in the
Rafael Espindola [Mon, 9 Aug 2010 21:09:46 +0000 (21:09 +0000)]
Make it possible to set the target triple and expose that with an option in the
gold plugin.

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

14 years agoFix a use after free error caught by the valgrind builders.
Nick Lewycky [Mon, 9 Aug 2010 21:03:28 +0000 (21:03 +0000)]
Fix a use after free error caught by the valgrind builders.

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