oota-llvm.git
12 years agoBuilds llvmc and its examples with CMake.
Oscar Fuentes [Mon, 25 Jul 2011 17:25:10 +0000 (17:25 +0000)]
Builds llvmc and its examples with CMake.

Patch by arrowdodger!

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

12 years agoFixes VS support for llvmc mcc16 llvmc example.
Oscar Fuentes [Mon, 25 Jul 2011 17:24:54 +0000 (17:24 +0000)]
Fixes VS support for llvmc mcc16 llvmc example.

Patch by arrowdodger!

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

12 years agoTidy up. 80 columns.
Jim Grosbach [Mon, 25 Jul 2011 17:11:29 +0000 (17:11 +0000)]
Tidy up. 80 columns.

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

12 years agoAdd uwtable to the langref.
Rafael Espindola [Mon, 25 Jul 2011 15:27:59 +0000 (15:27 +0000)]
Add uwtable to the langref.

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

12 years agoAdd an RS_Split2 stage used for loop prevention.
Jakob Stoklund Olesen [Mon, 25 Jul 2011 15:25:43 +0000 (15:25 +0000)]
Add an RS_Split2 stage used for loop prevention.

This mechanism already exists, but the RS_Split2 stage makes it clearer.

When live range splitting creates ranges that may not be making
progress, they are marked RS_Split2 instead of RS_New. These ranges may
be split again, but only in a way that can be proven to make progress.

For local ranges, that means they must be split into ranges used by
strictly fewer instructions.

For global ranges, region splitting is bypassed and the RS_Split2
ranges go straight to per-block splitting.

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

12 years agoRename live range stages to better reflect how they are used.
Jakob Stoklund Olesen [Mon, 25 Jul 2011 15:25:41 +0000 (15:25 +0000)]
Rename live range stages to better reflect how they are used.

The stage is used to control where a live range is going, not where it
is coming from. Live ranges created by splitting will usually be marked
RS_New, but some are marked RS_Spill to avoid wasting time trying to
split them again.

The old RS_Global and RS_Local stages are merged - they are really the
same thing for local and global live ranges.

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

12 years agoShorten some expressions by using ArrayRef::slice().
Frits van Bommel [Mon, 25 Jul 2011 15:13:01 +0000 (15:13 +0000)]
Shorten some expressions by using ArrayRef::slice().

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

12 years agoCMake: generalize the system that creates custom targets for
Oscar Fuentes [Mon, 25 Jul 2011 14:11:55 +0000 (14:11 +0000)]
CMake: generalize the system that creates custom targets for
tablegenning to all libraries and executables.

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

12 years agoRemove uses of std::vector from TypeBuilder.
Jay Foad [Mon, 25 Jul 2011 10:32:27 +0000 (10:32 +0000)]
Remove uses of std::vector from TypeBuilder.

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

12 years agoUse ArrayRef in the (protected) constructors of ConstantArray, ConstantStruct and...
Jay Foad [Mon, 25 Jul 2011 10:14:44 +0000 (10:14 +0000)]
Use ArrayRef in the (protected) constructors of ConstantArray, ConstantStruct and ConstantVector.

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

12 years agoConvert GetElementPtrInst to use ArrayRef.
Jay Foad [Mon, 25 Jul 2011 09:48:08 +0000 (09:48 +0000)]
Convert GetElementPtrInst to use ArrayRef.

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

12 years agoswitch Triple to take twines instead of stringrefs.
Chris Lattner [Sun, 24 Jul 2011 20:45:08 +0000 (20:45 +0000)]
switch Triple to take twines instead of stringrefs.

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

12 years agoAdd Twine support for characters, and switch twine to use a union internally
Chris Lattner [Sun, 24 Jul 2011 20:44:30 +0000 (20:44 +0000)]
Add Twine support for characters, and switch twine to use a union internally
to eliminate some casting.

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

12 years agoNever extend live ranges for <undef> uses.
Jakob Stoklund Olesen [Sun, 24 Jul 2011 20:33:23 +0000 (20:33 +0000)]
Never extend live ranges for <undef> uses.

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

12 years agoCorrectly handle <undef> tied uses when rewriting after a split.
Jakob Stoklund Olesen [Sun, 24 Jul 2011 20:23:50 +0000 (20:23 +0000)]
Correctly handle <undef> tied uses when rewriting after a split.

This fixes PR10463. A two-address instruction with an <undef> use
operand was incorrectly rewritten so the def and use no longer used the
same register, violating the tie constraint.

Fix this by always rewriting <undef> operands with the register a def
operand would use.

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

12 years agoOmit explicit length here, now that I've had a chance to test this with gcc.
Frits van Bommel [Sun, 24 Jul 2011 09:53:46 +0000 (09:53 +0000)]
Omit explicit length here, now that I've had a chance to test this with gcc.

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

12 years agoSet PPCII::MO_DARWIN_STUB only on MacOSX < 10.5.
Roman Divacky [Sun, 24 Jul 2011 08:22:56 +0000 (08:22 +0000)]
Set PPCII::MO_DARWIN_STUB only on MacOSX < 10.5.

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

12 years agoclarify that opaque is actually a struct type, PR10430
Chris Lattner [Sat, 23 Jul 2011 19:59:08 +0000 (19:59 +0000)]
clarify that opaque is actually a struct type, PR10430

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

12 years agohow about that, StringRef doesn't allow any mutation, thanks to
Chris Lattner [Sat, 23 Jul 2011 17:18:57 +0000 (17:18 +0000)]
how about that, StringRef doesn't allow any mutation, thanks to
Frits for straightening me out.

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

12 years agoAdd RAGreedy::calcCompactRegion.
Jakob Stoklund Olesen [Sat, 23 Jul 2011 03:41:57 +0000 (03:41 +0000)]
Add RAGreedy::calcCompactRegion.

This method computes the edge bundles that should be live when splitting
around a compact region. This is independent of interference.

The function returns false if the live range was already a compact
region, or the compact region doesn't have any live bundles - it would
be the same as splitting around basic blocks.

Compact regions are computed using the normal spill placement code. We
pretend there is interference in all live-through blocks that don't use
the live range. This removes all edges from the Hopfield network used
for spill placement, so it converges instantly.

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

12 years agoFix bug in SplitEditor::splitLiveThroughBlock when switching registers.
Jakob Stoklund Olesen [Sat, 23 Jul 2011 03:32:26 +0000 (03:32 +0000)]
Fix bug in SplitEditor::splitLiveThroughBlock when switching registers.

If there is no interference and no last split point, we cannot
enterIntvBefore(Stop) - that function needs a real instruction.

Use enterIntvAtEnd instead for that very easy case.

This code doesn't currently run, it is needed by multi-way splitting.

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

12 years agoPrepare RAGreedy::growRegion for compact regions.
Jakob Stoklund Olesen [Sat, 23 Jul 2011 03:22:33 +0000 (03:22 +0000)]
Prepare RAGreedy::growRegion for compact regions.

A split candidate can have a null PhysReg which means that it doesn't
map to a real interference pattern. Instead, pretend that all through
blocks have interference.

This makes it possible to generate compact regions where the live range
doesn't go through blocks that don't use it. The live range will still
be live between directly connected blocks with uses.

Splitting around a compact region tends to produce a live range with a
high spill weight, so it may evict a less dense live range.

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

12 years agoAdd a simple method for marking blocks with interference in and out.
Jakob Stoklund Olesen [Sat, 23 Jul 2011 03:10:19 +0000 (03:10 +0000)]
Add a simple method for marking blocks with interference in and out.

This method matches addLinks - All the listed blocks are considered to
have interference, so they add a negative bias to their bundles.

This could also be done by addConstraints, but that requires building a
separate BlockConstraint array.

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

12 years agoAllow null interference cursors to be queried.
Jakob Stoklund Olesen [Sat, 23 Jul 2011 03:10:17 +0000 (03:10 +0000)]
Allow null interference cursors to be queried.

They always report 'no interference'.

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

12 years agoFix a silly off by one.
Benjamin Kramer [Sat, 23 Jul 2011 03:04:46 +0000 (03:04 +0000)]
Fix a silly off by one.

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

12 years agoWe always bounds check the bit set, there is no need to emit zero bytes at the end.
Benjamin Kramer [Sat, 23 Jul 2011 02:49:37 +0000 (02:49 +0000)]
We always bounds check the bit set, there is no need to emit zero bytes at the end.

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

12 years agoAdd more constness.
Benjamin Kramer [Sat, 23 Jul 2011 01:40:15 +0000 (01:40 +0000)]
Add more constness.

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

12 years agoARMMCTargetDesc.h: Fixup to add DataTypes.h, or uint32_t would be unavailable.
NAKAMURA Takumi [Sat, 23 Jul 2011 01:16:22 +0000 (01:16 +0000)]
ARMMCTargetDesc.h: Fixup to add DataTypes.h, or uint32_t would be unavailable.

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

12 years agoTurn the DenseSet in MCRegisterClass into a tblgenerated bit field. This should be...
Benjamin Kramer [Sat, 23 Jul 2011 00:47:49 +0000 (00:47 +0000)]
Turn the DenseSet in MCRegisterClass into a tblgenerated bit field. This should be faster and smaller.

Goodbye static ctors and dtors!

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

12 years agoGive TargetRegisterClass a pointer to the MCRegisterClass and use it to access its...
Benjamin Kramer [Sat, 23 Jul 2011 00:47:46 +0000 (00:47 +0000)]
Give TargetRegisterClass a pointer to the MCRegisterClass and use it to access its data.

This makes TargetRegisterClass slightly slower. Next step will be making contains faster.
Eventually TargetRegisterClass will be killed entirely.

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

12 years agoMove TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
Evan Cheng [Sat, 23 Jul 2011 00:45:41 +0000 (00:45 +0000)]
Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.

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

12 years agoCMake: Fix LLVM_NATIVE_TARGETMC in config.h.cmake.
NAKAMURA Takumi [Sat, 23 Jul 2011 00:45:23 +0000 (00:45 +0000)]
CMake: Fix LLVM_NATIVE_TARGETMC in config.h.cmake.

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

12 years agoconfig.h.cmake: Reorder along config.h.in.
NAKAMURA Takumi [Sat, 23 Jul 2011 00:45:16 +0000 (00:45 +0000)]
config.h.cmake: Reorder along config.h.in.

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

12 years agoMove trip count discovery outside of the generic LoopUnroll helper. This
Andrew Trick [Sat, 23 Jul 2011 00:33:05 +0000 (00:33 +0000)]
Move trip count discovery outside of the generic LoopUnroll helper. This
removes its dependence on canonical induction variables.

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

12 years agowhitespace
Andrew Trick [Sat, 23 Jul 2011 00:29:16 +0000 (00:29 +0000)]
whitespace

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

12 years agocreateXXXMCCodeGenInfo should be static.
Evan Cheng [Sat, 23 Jul 2011 00:01:04 +0000 (00:01 +0000)]
createXXXMCCodeGenInfo should be static.

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

12 years agoSink ARM mc routines into MCTargetDesc.
Evan Cheng [Sat, 23 Jul 2011 00:00:19 +0000 (00:00 +0000)]
Sink ARM mc routines into MCTargetDesc.

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

12 years agoARM SSAT instruction 5-bit immediate handling.
Jim Grosbach [Fri, 22 Jul 2011 23:16:18 +0000 (23:16 +0000)]
ARM SSAT instruction 5-bit immediate handling.

The immediate is in the range 1-32, but is encoded as 0-31 in a 5-bit bitfield.
Update the representation such that we store the operand as 0-31, allowing us
to remove the encoder method and the special case handling in the disassembler.
Update the assembly parser and the instruction printer accordingly.

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

12 years agoMove the last uses of RetainFunc etc. over to using getRetainCallee() etc.
Dan Gohman [Fri, 22 Jul 2011 22:29:21 +0000 (22:29 +0000)]
Move the last uses of RetainFunc etc. over to using getRetainCallee() etc.
so that a declaration for objc_retain is created when needed if it doesn't
already exist. rdar://9825114.

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

12 years agoTeach cmake configured headers about LLVM_NATIVE_TARGETMC
Oscar Fuentes [Fri, 22 Jul 2011 22:21:47 +0000 (22:21 +0000)]
Teach cmake configured headers about LLVM_NATIVE_TARGETMC

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

12 years agoAdd FIXME
Jim Grosbach [Fri, 22 Jul 2011 22:15:38 +0000 (22:15 +0000)]
Add FIXME

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

12 years agoARM encoding and assembly parsing tests for SMULWB, SMULWT, SMUSD and SMUSDX.
Jim Grosbach [Fri, 22 Jul 2011 22:13:00 +0000 (22:13 +0000)]
ARM encoding and assembly parsing tests for SMULWB, SMULWT, SMUSD and SMUSDX.

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

12 years agoARM assembly parsing and encoding updates.
Jim Grosbach [Fri, 22 Jul 2011 22:06:05 +0000 (22:06 +0000)]
ARM assembly parsing and encoding updates.

Tests for SMULBB, SMLALBT, SMLALTB, SMLALTT, and SMULL. Fix parsing of SMULLS.

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

12 years agoUse the enum value for RegClassIDs.
Benjamin Kramer [Fri, 22 Jul 2011 22:01:58 +0000 (22:01 +0000)]
Use the enum value for RegClassIDs.

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

12 years agoCombine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
Evan Cheng [Fri, 22 Jul 2011 21:58:54 +0000 (21:58 +0000)]
Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.

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

12 years agoadd section to ToC
Chris Lattner [Fri, 22 Jul 2011 21:36:29 +0000 (21:36 +0000)]
add section to ToC

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

12 years agoARM assembly parsing and encoding tests.
Jim Grosbach [Fri, 22 Jul 2011 21:34:56 +0000 (21:34 +0000)]
ARM assembly parsing and encoding tests.

Add tests for SMLSD, SMLSDX, SMLSLD, SMLSLDX, SMMLA, SMMLAR, SMMLS, SMMLSR,
SMMUL, SMMULR, SMUAD and SMUADX.

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

12 years agowrite the long-overdue strings section of the data structure guide.
Chris Lattner [Fri, 22 Jul 2011 21:34:12 +0000 (21:34 +0000)]
write the long-overdue strings section of the data structure guide.

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

12 years agoEmit the __compact_unwind section first. If there are any frames which weren't
Bill Wendling [Fri, 22 Jul 2011 21:18:59 +0000 (21:18 +0000)]
Emit the __compact_unwind section first. If there are any frames which weren't
emitted, emit them next as CIE/FDEs.

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

12 years agoAdd a method to set the compact unwind info.
Bill Wendling [Fri, 22 Jul 2011 21:17:05 +0000 (21:17 +0000)]
Add a method to set the compact unwind info.

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

12 years agoAdd a method to get the list of FrameInfos.
Bill Wendling [Fri, 22 Jul 2011 21:16:32 +0000 (21:16 +0000)]
Add a method to get the list of FrameInfos.

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

12 years agoFix test check!
Bruno Cardoso Lopes [Fri, 22 Jul 2011 20:55:28 +0000 (20:55 +0000)]
Fix test check!

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

12 years agoFix PR10422 by adding the necessary AVX UCOMISD memory versions to
Bruno Cardoso Lopes [Fri, 22 Jul 2011 20:53:20 +0000 (20:53 +0000)]
Fix PR10422 by adding the necessary AVX UCOMISD memory versions to
load folding logic

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

12 years agoARM assembly parsing and encoding tests for SMLAWB/SMLAWT.
Jim Grosbach [Fri, 22 Jul 2011 20:51:24 +0000 (20:51 +0000)]
ARM assembly parsing and encoding tests for SMLAWB/SMLAWT.

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

12 years agomove the section for string-like containers to follow the section for sequential...
Chris Lattner [Fri, 22 Jul 2011 20:46:49 +0000 (20:46 +0000)]
move the section for string-like containers to follow the section for sequential containers.

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

12 years agoARM assembly parsing and encoding tests.
Jim Grosbach [Fri, 22 Jul 2011 20:30:40 +0000 (20:30 +0000)]
ARM assembly parsing and encoding tests.

Tests for SMLAL, SMLALBB, SMLALBT, SMLALTB, SMLALTT, SMLALD, and SMLALDX
instructions.

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

12 years agoARM assembly parsing and encoding of SMLAL instruction.
Jim Grosbach [Fri, 22 Jul 2011 20:18:21 +0000 (20:18 +0000)]
ARM assembly parsing and encoding of SMLAL instruction.

Fix parsing of carry-setting variant SMLALS and add tests.

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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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