oota-llvm.git
13 years agoARM encoding and assembly parsing of SMLAD{X} instructions.
Jim Grosbach [Fri, 22 Jul 2011 20:11:20 +0000 (20:11 +0000)]
ARM encoding and assembly parsing of SMLAD{X} instructions.

Fix encoding of destination register. Add tests.

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

13 years agoARM testcases for assembly parsing and encoding SMLA* instructions.
Jim Grosbach [Fri, 22 Jul 2011 20:01:34 +0000 (20:01 +0000)]
ARM testcases for assembly parsing and encoding SMLA* instructions.

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

13 years agoAdd v8f32->v8i32 bitcast. Fixes PR10440
Bruno Cardoso Lopes [Fri, 22 Jul 2011 19:51:02 +0000 (19:51 +0000)]
Add v8f32->v8i32 bitcast. Fixes PR10440

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

13 years agoTurn shuffles into unpacks for VT == MVT::v2i64 and MVT::v2f64
Rafael Espindola [Fri, 22 Jul 2011 18:56:05 +0000 (18:56 +0000)]
Turn shuffles into unpacks for VT == MVT::v2i64 and MVT::v2f64
too. Patch by Jeff Muizelaar.

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

13 years agoFix x86's XALUO lowering to return its replacement values instead
Dan Gohman [Fri, 22 Jul 2011 18:45:15 +0000 (18:45 +0000)]
Fix x86's XALUO lowering to return its replacement values instead
of doing the RAUW calls for the overflow value itself. This makes
it more consistent with how the rest of LegalizeDAG works.

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

13 years agollvm-objdump: Don't ignore errors from raw_fd_ostream.
Benjamin Kramer [Fri, 22 Jul 2011 18:35:11 +0000 (18:35 +0000)]
llvm-objdump: Don't ignore errors from raw_fd_ostream.

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

13 years agollvm-objdump: Skip branches that leave the current function.
Benjamin Kramer [Fri, 22 Jul 2011 18:35:09 +0000 (18:35 +0000)]
llvm-objdump: Skip branches that leave the current function.

In "normal" code these only happen when disassembling data, so we
won't lose anything if we just drop them.

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

13 years agoFix test failures caused by my so_reg refactoring.
Owen Anderson [Fri, 22 Jul 2011 18:30:30 +0000 (18:30 +0000)]
Fix test failures caused by my so_reg refactoring.

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

13 years agoARM assembly parsing and encoding for SMC instruction.
Jim Grosbach [Fri, 22 Jul 2011 18:13:31 +0000 (18:13 +0000)]
ARM assembly parsing and encoding for SMC instruction.

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

13 years agoClean up a few more comments.
Jim Grosbach [Fri, 22 Jul 2011 18:06:01 +0000 (18:06 +0000)]
Clean up a few more comments.

These instruction definitions are for the assembler, too, not just the
disassembler.

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

13 years agoARM encoding and assembly parsing tests.
Jim Grosbach [Fri, 22 Jul 2011 18:04:48 +0000 (18:04 +0000)]
ARM encoding and assembly parsing tests.

Add tests for SHADD8, SHADD16, SHASX, SHSUB8, and SHSUB16.

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

13 years agoTidy up.
Jim Grosbach [Fri, 22 Jul 2011 18:04:10 +0000 (18:04 +0000)]
Tidy up.

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

13 years agoThumb assembly support for SETEND instruction.
Jim Grosbach [Fri, 22 Jul 2011 17:52:23 +0000 (17:52 +0000)]
Thumb assembly support for SETEND instruction.

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

13 years agoTidy up.
Jim Grosbach [Fri, 22 Jul 2011 17:46:13 +0000 (17:46 +0000)]
Tidy up.

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

13 years agoARM assembly parsing and encoding for SETEND instruction.
Jim Grosbach [Fri, 22 Jul 2011 17:44:50 +0000 (17:44 +0000)]
ARM assembly parsing and encoding for SETEND instruction.

Add parsing and diagnostics for malformed inputs. Tests for diagnostics and
for correct encodings.

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

13 years agoARM assembly parsing and encoding tests for SEL instruction.
Jim Grosbach [Fri, 22 Jul 2011 16:59:33 +0000 (16:59 +0000)]
ARM assembly parsing and encoding tests for SEL instruction.

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

13 years agoTidy up.
Jim Grosbach [Fri, 22 Jul 2011 16:59:04 +0000 (16:59 +0000)]
Tidy up.

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

13 years agoRemove unused variables.
Benjamin Kramer [Fri, 22 Jul 2011 16:06:09 +0000 (16:06 +0000)]
Remove unused variables.

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

13 years agoFix more MSVC warnings caused by a cases I missed when converting
Jay Foad [Fri, 22 Jul 2011 08:52:50 +0000 (08:52 +0000)]
Fix more MSVC warnings caused by a cases I missed when converting
ConstantExpr::getGetElementPtr to use ArrayRef.

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

13 years agoConvert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
Jay Foad [Fri, 22 Jul 2011 08:16:57 +0000 (08:16 +0000)]
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.

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

13 years agoMove TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
Chandler Carruth [Fri, 22 Jul 2011 08:16:53 +0000 (08:16 +0000)]
Move TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
The header file was already properly located. The previous need for it
in Support had to do with the version string printing which was fixed in
r135757.

Also update build dependencies where libraries that needed the
functionality of the Target library (in the form of the TargetRegistry)
were picking it up via Support. This is pretty pervasive, essentially
every TargetInfo library (ARMInfo, etc) uses TargetRegistry, making it
depend on Target. All of these were previously just sneaking by.

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

13 years agoUpdate the CMake library dependencies. These shifts are the result of
Chandler Carruth [Fri, 22 Jul 2011 08:05:47 +0000 (08:05 +0000)]
Update the CMake library dependencies. These shifts are the result of
Evan's recent refactorings (I believe). Specifically, MCDisassembler no
longer depends on Target, and ARMDisassembler no longer depends on
CodeGen. The added dependencies from ARMAsmParser to ARMDesc looks
correct based on header file inclusion.

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

13 years agoFix an MSVC warning, caused by a case I missed when converting
Jay Foad [Fri, 22 Jul 2011 07:54:01 +0000 (07:54 +0000)]
Fix an MSVC warning, caused by a case I missed when converting
ConstantExpr::getGetElementPtr to use ArrayRef.

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

13 years agoMove the registered target printing in version strings completely out of
Chandler Carruth [Fri, 22 Jul 2011 07:50:48 +0000 (07:50 +0000)]
Move the registered target printing in version strings completely out of
the Support library. Now its part of the TargetRegistry, and the three
commands that care about this explicitly register this extra bit of
version information.

The set of commands which care was computed by intersecting those which
use the Support library's version string printing and those that
initialize all the registered targets in a way that produces
a meaningful list. The only odd ball out is that 'clang -cc1as -version'
no longer prints the registered targets. I don't think anyone is really
interested in that (especially as the fact that llvm-mc does so is under
a FIXME), but if someone really does want this back I'll happily apply
the same patch there.

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

13 years agoMove the logic for printing the registered targets into a static
Chandler Carruth [Fri, 22 Jul 2011 07:50:44 +0000 (07:50 +0000)]
Move the logic for printing the registered targets into a static
function on the TargetRegistry. Also clean it up and use the modern LLVM
utility libraries available instead of rolling a few things manually.

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

13 years agoAdd an extension point to the CommandLine library where clients can
Chandler Carruth [Fri, 22 Jul 2011 07:50:40 +0000 (07:50 +0000)]
Add an extension point to the CommandLine library where clients can
register extra version information to be printed. This is designed to
allow those tools which link in various targets to also print those
registered targets under --version.

Currently this printing logic is embedded into the Support library
directly; a huge layering violation. This is the first step to hoisting
it out into the tools without adding lots of duplicated code.

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

13 years agolib/Support/Triple.cpp: Recognize "-march=ppc32" to llc properly, as quick hack.
NAKAMURA Takumi [Fri, 22 Jul 2011 04:02:22 +0000 (04:02 +0000)]
lib/Support/Triple.cpp: Recognize "-march=ppc32" to llc properly, as quick hack.

FIXME: There is an inconsistency. llvm::Triple does not understand "ppc32" and PowerPC/TargetInfo holds "ppc32".

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

13 years agoSome LangRef tweaks, per Dan's comments.
Eli Friedman [Fri, 22 Jul 2011 03:04:45 +0000 (03:04 +0000)]
Some LangRef tweaks, per Dan's comments.

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

13 years agoAllow getBlockFreq to return 0.
Jakub Staszak [Fri, 22 Jul 2011 02:24:57 +0000 (02:24 +0000)]
Allow getBlockFreq to return 0.

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

13 years agoGCC complains about the angle of this line.
Benjamin Kramer [Fri, 22 Jul 2011 01:02:57 +0000 (01:02 +0000)]
GCC complains about the angle of this line.

Remove the escaped newline.

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

13 years agoRevert patch which broke some IfConversion tests.
Jakub Staszak [Fri, 22 Jul 2011 00:55:15 +0000 (00:55 +0000)]
Revert patch which broke some IfConversion tests.

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

13 years agoTeach tblgen to emit MCRegisterClasses.
Benjamin Kramer [Fri, 22 Jul 2011 00:44:39 +0000 (00:44 +0000)]
Teach tblgen to emit MCRegisterClasses.

- This currently introduces more instances of the static DenseSet dtor, but that should be fixable.

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

13 years agoFix typo in #include which revealed in the case-sensitive filesystem.
Jakub Staszak [Fri, 22 Jul 2011 00:39:00 +0000 (00:39 +0000)]
Fix typo in #include which revealed in the case-sensitive filesystem.

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

13 years agoRemove the 128-bit special handling from SCALAR_TO_VECTOR. This isn't
Bruno Cardoso Lopes [Fri, 22 Jul 2011 00:15:10 +0000 (00:15 +0000)]
Remove the 128-bit special handling from SCALAR_TO_VECTOR. This isn't
the way to go. Doing this here will prevent several node matches later,
and would have to force looking all the way through several
VINSERTF128/VEXTRACTF128 chains to optimize simple things.

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

13 years ago-Inspected a AVX code block added by someone in early Feb. This was never used
Bruno Cardoso Lopes [Fri, 22 Jul 2011 00:15:07 +0000 (00:15 +0000)]
-Inspected a AVX code block added by someone in early Feb. This was never used
and was actually very wrong, fix it and make it simpler. Also remove the
ConcatVectors function, which is unused now.

- Fix a introduction of useless nodes in r126664 and r126264. The
VUNPCKL* should never be introduced cause we don't want duplicate
nodes for 128 AVX and non-AVX modes, the actual instruction
difference only exists during isel, but not for target specific DAG
nodes. We only introduce V* target nodes when there is no 128-bit
version already there.

- Fix a fragile test and make it more useful.

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

13 years agoAlthough we already support this, add testcases for consistency
Bruno Cardoso Lopes [Fri, 22 Jul 2011 00:15:03 +0000 (00:15 +0000)]
Although we already support this, add testcases for consistency

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

13 years agoAdd a DAGCombine for transforming 128->256 casts into a simple
Bruno Cardoso Lopes [Fri, 22 Jul 2011 00:15:00 +0000 (00:15 +0000)]
Add a DAGCombine for transforming 128->256 casts into a simple
vxorps + vinsertf128 pair of instructions

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

13 years agoIntroduce a new function to lower 256-bit vectors which are not
Bruno Cardoso Lopes [Fri, 22 Jul 2011 00:14:56 +0000 (00:14 +0000)]
Introduce a new function to lower 256-bit vectors which are not
direclty supported and should be promoted and handled by smaller
shuffles

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

13 years agoRename function to be more specific and be more strict about its usage
Bruno Cardoso Lopes [Fri, 22 Jul 2011 00:14:53 +0000 (00:14 +0000)]
Rename function to be more specific and be more strict about its usage

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

13 years agoUse MachineBranchProbabilityInfo instead of MachineLoopInfo in IfConversion.
Jakub Staszak [Thu, 21 Jul 2011 23:48:55 +0000 (23:48 +0000)]
Use MachineBranchProbabilityInfo instead of MachineLoopInfo in IfConversion.

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

13 years agoGet rid of the extraneous GPR operand on so_reg_imm operands, which in turn necessita...
Owen Anderson [Thu, 21 Jul 2011 23:38:37 +0000 (23:38 +0000)]
Get rid of the extraneous GPR operand on so_reg_imm operands, which in turn necessitates a lot of changes to related bits.

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

13 years agoFix MergeInVectorType to check for vector types with the same alloc
Dan Gohman [Thu, 21 Jul 2011 23:30:09 +0000 (23:30 +0000)]
Fix MergeInVectorType to check for vector types with the same alloc
size but different element types, so that it filters out the cases
that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827.

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

13 years agoARM Asm parser range checking for [0,31] immediates.
Jim Grosbach [Thu, 21 Jul 2011 23:26:25 +0000 (23:26 +0000)]
ARM Asm parser range checking for [0,31] immediates.

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

13 years agoARM parsing and encoding tests for SBC instruction.
Jim Grosbach [Thu, 21 Jul 2011 23:03:59 +0000 (23:03 +0000)]
ARM parsing and encoding tests for SBC instruction.

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

13 years agoInitialize DenseSets lazily.
Benjamin Kramer [Thu, 21 Jul 2011 23:03:59 +0000 (23:03 +0000)]
Initialize DenseSets lazily.

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

13 years agoARM testcases for SADD/SASX parsing and encoding.
Jim Grosbach [Thu, 21 Jul 2011 23:00:49 +0000 (23:00 +0000)]
ARM testcases for SADD/SASX parsing and encoding.

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

13 years agoAdd missing getAnalysisUsage in MachineBlockFrequency.
Jakub Staszak [Thu, 21 Jul 2011 22:59:09 +0000 (22:59 +0000)]
Add missing getAnalysisUsage in MachineBlockFrequency.

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

13 years agoARM assembly parsing support for RSC instruction.
Jim Grosbach [Thu, 21 Jul 2011 22:56:30 +0000 (22:56 +0000)]
ARM assembly parsing support for RSC instruction.

Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.

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

13 years agoARM assembly parsing support for RSB instruction.
Jim Grosbach [Thu, 21 Jul 2011 22:37:43 +0000 (22:37 +0000)]
ARM assembly parsing support for RSB instruction.

Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.

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

13 years agoARM parsing and encoding tests for RBIT, REV, REV16 and REVSH.
Jim Grosbach [Thu, 21 Jul 2011 22:29:23 +0000 (22:29 +0000)]
ARM parsing and encoding tests for RBIT, REV, REV16 and REVSH.

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

13 years agoARM parsing and encodings tests for saturating arithmetic insns.
Jim Grosbach [Thu, 21 Jul 2011 22:18:28 +0000 (22:18 +0000)]
ARM parsing and encodings tests for saturating arithmetic insns.

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

13 years agoTidy up.
Jim Grosbach [Thu, 21 Jul 2011 21:26:05 +0000 (21:26 +0000)]
Tidy up.

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

13 years agoUpdate generated CPP code with the new API on CallInst::Create and ConstantExpr:...
Nicolas Geoffray [Thu, 21 Jul 2011 20:59:21 +0000 (20:59 +0000)]
Update generated CPP code with the new API on CallInst::Create and ConstantExpr::getGetElementPtr.

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

13 years agoARM assembly parsing POP/PUSH mnemonics.
Jim Grosbach [Thu, 21 Jul 2011 19:57:11 +0000 (19:57 +0000)]
ARM assembly parsing POP/PUSH mnemonics.

Aliases for LDM/STM. The single-register versions should encode to LDR/STR
with writeback, but we don't (yet) get that correct. Neither does Darwin's
system assembler, though, so that's not a deal-breaker of a limitation.

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

13 years agoFix CMake build
Oscar Fuentes [Thu, 21 Jul 2011 19:10:57 +0000 (19:10 +0000)]
Fix CMake build

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

13 years agoAdd tests for ARM PKH assembly parsing.
Jim Grosbach [Thu, 21 Jul 2011 19:02:03 +0000 (19:02 +0000)]
Add tests for ARM PKH assembly parsing.

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

13 years agoSplit up the ARM so_reg ComplexPattern into so_reg_reg and so_reg_imm, allowing us...
Owen Anderson [Thu, 21 Jul 2011 18:54:16 +0000 (18:54 +0000)]
Split up the ARM so_reg ComplexPattern into so_reg_reg and so_reg_imm, allowing us to distinguish the encodings that use shifted registers from those that use shifted immediates.  This is necessary to allow the fixed-length decoder to distinguish things like BICS vs LDRH.

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

13 years agoCleanup: make std::pair usage slightly less indecipherable without actually naming...
Andrew Trick [Thu, 21 Jul 2011 17:37:39 +0000 (17:37 +0000)]
Cleanup: make std::pair usage slightly less indecipherable without actually naming variables!

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

13 years agoSink parts of TargetRegisterClass into MCRegisterClass.
Benjamin Kramer [Thu, 21 Jul 2011 17:26:50 +0000 (17:26 +0000)]
Sink parts of TargetRegisterClass into MCRegisterClass.

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

13 years agoARM assembly parsing and encoding for PKHBT and PKHTB instructions.
Jim Grosbach [Thu, 21 Jul 2011 17:23:04 +0000 (17:23 +0000)]
ARM assembly parsing and encoding for PKHBT and PKHTB instructions.

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

13 years agoAdded the infrastructute necessary for MIPS JIT support. Patch by Vladimir
Bruno Cardoso Lopes [Thu, 21 Jul 2011 16:28:51 +0000 (16:28 +0000)]
Added the infrastructute necessary for MIPS JIT support. Patch by Vladimir
Stefanovic. I removed the part that actually emits the instructions cause
I want that to get in better shape first and in incremental steps. This
also makes it easier to review the upcoming parts.

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

13 years agoMake better use of ConstantExpr::getGetElementPtr's InBounds parameter.
Jay Foad [Thu, 21 Jul 2011 15:15:37 +0000 (15:15 +0000)]
Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.

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

13 years agoSort case-insensitively.
Jay Foad [Thu, 21 Jul 2011 14:42:51 +0000 (14:42 +0000)]
Sort case-insensitively.

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

13 years agoConvert ConstantExpr::getGetElementPtr and
Jay Foad [Thu, 21 Jul 2011 14:31:17 +0000 (14:31 +0000)]
Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.

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

13 years agoUpdate llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
Jay Foad [Thu, 21 Jul 2011 09:19:11 +0000 (09:19 +0000)]
Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
to use ArrayRef.

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

13 years agoConvert ConstantFolder APIs to use ArrayRef.
Jay Foad [Thu, 21 Jul 2011 07:52:17 +0000 (07:52 +0000)]
Convert ConstantFolder APIs to use ArrayRef.

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

13 years agomove tier out of an anonymous namespace, it doesn't make sense
Chris Lattner [Thu, 21 Jul 2011 06:21:31 +0000 (06:21 +0000)]
move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.

Eliminate some extraenous uses of tie.

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

13 years ago- Register v16i16 as valid VR256 register class
Bruno Cardoso Lopes [Thu, 21 Jul 2011 02:24:08 +0000 (02:24 +0000)]
- Register v16i16 as valid VR256 register class
- Add more bitcasts for v16i16
- Since 135661 and 135662 already added the splat logic,
just add one more splat test for v16i16

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

13 years agoAdd support for 256-bit versions of VPERMIL instruction. This is a new
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:47 +0000 (01:55 +0000)]
Add support for 256-bit versions of VPERMIL instruction. This is a new
instruction introduced in AVX, which can operate on 128 and 256-bit vectors.
It considers a 256-bit vector as two independent 128-bit lanes. It can permute
any 32 or 64 elements inside a lane, and restricts the second lane to
have the same permutation of the first one. With the improved splat support
introduced early today, adding codegen for this instruction enable more
efficient 256-bit code:

Instead of:
  vextractf128  $0, %ymm0, %xmm0
  punpcklbw %xmm0, %xmm0
  punpckhbw %xmm0, %xmm0
  vinsertf128 $0, %xmm0, %ymm0, %ymm1
  vinsertf128 $1, %xmm0, %ymm1, %ymm0
  vextractf128  $1, %ymm0, %xmm1
  shufps  $1, %xmm1, %xmm1
  movss %xmm1, 28(%rsp)
  movss %xmm1, 24(%rsp)
  movss %xmm1, 20(%rsp)
  movss %xmm1, 16(%rsp)
  vextractf128  $0, %ymm0, %xmm0
  shufps  $1, %xmm0, %xmm0
  movss %xmm0, 12(%rsp)
  movss %xmm0, 8(%rsp)
  movss %xmm0, 4(%rsp)
  movss %xmm0, (%rsp)
  vmovaps (%rsp), %ymm0
We get:
  vextractf128  $0, %ymm0, %xmm0
  punpcklbw %xmm0, %xmm0
  punpckhbw %xmm0, %xmm0
  vinsertf128 $0, %xmm0, %ymm0, %ymm1
  vinsertf128 $1, %xmm0, %ymm1, %ymm0
  vpermilps $85, %ymm0, %ymm0

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

13 years agoImprove splat promotion to handle AVX types: v32i8 and v16i16. Also
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:42 +0000 (01:55 +0000)]
Improve splat promotion to handle AVX types: v32i8 and v16i16. Also
refactor the code and add a bunch of comments. The final shuffle
emitted by handling 256-bit types is suitable for the VPERM shuffle
instruction which is going to be introduced in a next commit (with
a testcase which cover this commit)

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

13 years agoAdd aditional patterns for vextractf128 instruction
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:39 +0000 (01:55 +0000)]
Add aditional patterns for vextractf128 instruction

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

13 years agoAdd aditional patterns for vinsertf128 instruction
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:36 +0000 (01:55 +0000)]
Add aditional patterns for vinsertf128 instruction

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

13 years agoAdd v16i16 type to VR256 class
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:33 +0000 (01:55 +0000)]
Add v16i16 type to VR256 class

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

13 years agoMove code around. No functionality changes
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:30 +0000 (01:55 +0000)]
Move code around. No functionality changes

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

13 years agoTidy up code
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:27 +0000 (01:55 +0000)]
Tidy up code

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

13 years agoLSR, correct fix for rdar://9786536. Silly casting bug.
Andrew Trick [Thu, 21 Jul 2011 01:45:54 +0000 (01:45 +0000)]
LSR, correct fix for rdar://9786536. Silly casting bug.

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

13 years agoLSR must sometimes sign-extend before generating double constants.
Andrew Trick [Thu, 21 Jul 2011 01:05:01 +0000 (01:05 +0000)]
LSR must sometimes sign-extend before generating double constants.

rdar://9786536

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

13 years agoMark instructions which are part of the frame setup with the MachineInstr::FrameSetup...
Bill Wendling [Thu, 21 Jul 2011 00:44:56 +0000 (00:44 +0000)]
Mark instructions which are part of the frame setup with the MachineInstr::FrameSetup flag.

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

13 years agoLSR crashes on an empty IVUsers list.
Andrew Trick [Thu, 21 Jul 2011 00:40:04 +0000 (00:40 +0000)]
LSR crashes on an empty IVUsers list.

rdar://9786536

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

13 years agoX86 is the only target that uses coff format. This should fixes test failures running...
Evan Cheng [Wed, 20 Jul 2011 23:53:54 +0000 (23:53 +0000)]
X86 is the only target that uses coff format. This should fixes test failures running on Windows, Cygwin, or MingW hosts.

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

13 years agodocs/GettingStarted.html: Tweak style.
NAKAMURA Takumi [Wed, 20 Jul 2011 23:37:51 +0000 (23:37 +0000)]
docs/GettingStarted.html: Tweak style.

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

13 years agoSink ARMMCExpr and ARMAddressingModes into MC layer. First step to separate ARM MC...
Evan Cheng [Wed, 20 Jul 2011 23:34:39 +0000 (23:34 +0000)]
Sink ARMMCExpr and ARMAddressingModes into MC layer. First step to separate ARM MC code from target.

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

13 years agoRemove unused function.
Bill Wendling [Wed, 20 Jul 2011 23:07:42 +0000 (23:07 +0000)]
Remove unused function.

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

13 years agoRemove the now defunct getCompactUnwindEncoding method from the frame lowering code.
Bill Wendling [Wed, 20 Jul 2011 23:04:09 +0000 (23:04 +0000)]
Remove the now defunct getCompactUnwindEncoding method from the frame lowering code.

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

13 years agoRefactor.
Devang Patel [Wed, 20 Jul 2011 23:00:27 +0000 (23:00 +0000)]
Refactor.

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

13 years agodocs/GettingStarted.html: Fix a typo and tweak a command line.
NAKAMURA Takumi [Wed, 20 Jul 2011 22:58:28 +0000 (22:58 +0000)]
docs/GettingStarted.html: Fix a typo and tweak a command line.

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

13 years agoThere are two ways to map a variable to its lexical scope. Lexical scope information...
Devang Patel [Wed, 20 Jul 2011 22:18:50 +0000 (22:18 +0000)]
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.

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

13 years agoClean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's...
Eli Friedman [Wed, 20 Jul 2011 21:57:23 +0000 (21:57 +0000)]
Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's used and not included where it isn't.

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

13 years agoWhile emitting constant value, look through derived type and use underlying basic...
Devang Patel [Wed, 20 Jul 2011 21:57:04 +0000 (21:57 +0000)]
While emitting constant value, look through derived type and use underlying basic type to determine size and signness of the constant value.

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

13 years agoARM PKH shift ammount operand printing tweaks.
Jim Grosbach [Wed, 20 Jul 2011 21:40:26 +0000 (21:40 +0000)]
ARM PKH shift ammount operand printing tweaks.

Move the shift operator and special value (32 encoded as 0 for PKHTB) handling
into the instruction printer. This cleans up a bit of the disassembler
special casing for these instructions, more easily handles not printing the
operand at all for "lsl #0" and prepares for correct asm parsing of these
operands.

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

13 years agoBring LICM into compliance with the new "Memory Model for Concurrent Operations"...
Eli Friedman [Wed, 20 Jul 2011 21:37:47 +0000 (21:37 +0000)]
Bring LICM into compliance with the new "Memory Model for Concurrent Operations" in LangRef.

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

13 years agoCommit LangRef changes for LLVM concurrency model. Start of supporting C++0x memory...
Eli Friedman [Wed, 20 Jul 2011 21:35:53 +0000 (21:35 +0000)]
Commit LangRef changes for LLVM concurrency model.  Start of supporting C++0x memory model and atomics.  See thread on llvmdev titled "Reviving the new LLVM concurrency model".

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

13 years agoUnbreak the MSVC build. Since the "next" function already exists in the MSVC headers...
Francois Pichet [Wed, 20 Jul 2011 21:35:29 +0000 (21:35 +0000)]
Unbreak the MSVC build. Since the "next" function already exists in the MSVC headers, we need the explicit llvm:: qualifier to prevent a conflict.

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

13 years agoTidy up a bit.
Jim Grosbach [Wed, 20 Jul 2011 20:49:03 +0000 (20:49 +0000)]
Tidy up a bit.

Move common definitions for ARM and Thumb2 into ARMInstrFormats.td and rename
them to be a bit more descriptive that they're for the PKH instructions.

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

13 years agoARM: Tidy up representation of PKH instruction.
Jim Grosbach [Wed, 20 Jul 2011 20:32:09 +0000 (20:32 +0000)]
ARM: Tidy up representation of PKH instruction.

The shift type is implied by the instruction (PKHBT vs. PKHTB) and so shouldn't
be also encoded as part of the shift value immediate. Otherwise we're able to
represent invalid instructions, plus it needlessly complicates the
representation. Preparatory work for asm parsing of these instructions.

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

13 years agoFix cmake again :)
Benjamin Kramer [Wed, 20 Jul 2011 20:00:06 +0000 (20:00 +0000)]
Fix cmake again :)

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

13 years agoGoodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
Evan Cheng [Wed, 20 Jul 2011 19:50:42 +0000 (19:50 +0000)]
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.

There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.

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

13 years agoFix cmake.
Benjamin Kramer [Wed, 20 Jul 2011 19:43:38 +0000 (19:43 +0000)]
Fix cmake.

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

13 years agoSketch out an CFG reconstruction mode for llvm-objdump.
Benjamin Kramer [Wed, 20 Jul 2011 19:37:35 +0000 (19:37 +0000)]
Sketch out an CFG reconstruction mode for llvm-objdump.

- Not great yet, but it's a start.
- Requires an object file with a symbol table. (I really want to fix this, but it'll need a whole new algorithm)
- ELF and COFF won't work at the moment due to libObject shortcomings.

To try it out run
$ llvm-objdump -d --cfg foo.o

This will create a graphviz file for every symbol in the object file's text section containing a CFG.

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

13 years agoExtend the hack for _GLOBAL_OFFSET_TABLE_ slightly; PR10389.
Eli Friedman [Wed, 20 Jul 2011 19:36:11 +0000 (19:36 +0000)]
Extend the hack for _GLOBAL_OFFSET_TABLE_ slightly; PR10389.

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