oota-llvm.git
11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:50:44 +0000 (23:50 +0000)]
Use proper return type for attribute index.

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

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:49:44 +0000 (23:49 +0000)]
Use proper return type for attribute index.

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

11 years agoPush the calculation of the 'Raw' attribute mask down into the implementation. It...
Bill Wendling [Sun, 27 Jan 2013 23:41:29 +0000 (23:41 +0000)]
Push the calculation of the 'Raw' attribute mask down into the implementation. It in turn uses the correct list for calculating the 'Raw' value.

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

11 years agoDon't erase these methods. They're used during testing.
Bill Wendling [Sun, 27 Jan 2013 22:46:17 +0000 (22:46 +0000)]
Don't erase these methods. They're used during testing.

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

11 years agoAdd special 'get' methods to create an Attribute with an alignment. Also do some...
Bill Wendling [Sun, 27 Jan 2013 22:43:04 +0000 (22:43 +0000)]
Add special 'get' methods to create an Attribute with an alignment. Also do some random cleanup. No functionality change.

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

11 years ago[XCore] Add missing l2rus instructions.
Richard Osborne [Sun, 27 Jan 2013 22:28:30 +0000 (22:28 +0000)]
[XCore] Add missing l2rus instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years agoPrivitize some the copy c'tor and assignment operator of uniquified objects.
Bill Wendling [Sun, 27 Jan 2013 21:38:03 +0000 (21:38 +0000)]
Privitize some the copy c'tor and assignment operator of uniquified objects.

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

11 years agoAdd some helpful comments.
Bill Wendling [Sun, 27 Jan 2013 21:32:11 +0000 (21:32 +0000)]
Add some helpful comments.

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

11 years ago[XCore] Add missing l2r instructions.
Richard Osborne [Sun, 27 Jan 2013 21:26:02 +0000 (21:26 +0000)]
[XCore] Add missing l2r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years agos/AttrList/pImpl/g in AttributeSet. No functionality change.
Bill Wendling [Sun, 27 Jan 2013 21:23:46 +0000 (21:23 +0000)]
s/AttrList/pImpl/g in AttributeSet. No functionality change.

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

11 years agoStart using more of the AttrNode in the AttributeSetImpl class.
Bill Wendling [Sun, 27 Jan 2013 21:20:06 +0000 (21:20 +0000)]
Start using more of the AttrNode in the AttributeSetImpl class.

Also add some asserts.

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

11 years agoLegalizer: Reword comment again, per Duncan's suggestion.
Benjamin Kramer [Sun, 27 Jan 2013 21:02:52 +0000 (21:02 +0000)]
Legalizer: Reword comment again, per Duncan's suggestion.

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

11 years ago[XCore] Add missing 1r instructions.
Richard Osborne [Sun, 27 Jan 2013 20:46:21 +0000 (20:46 +0000)]
[XCore] Add missing 1r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years ago[XCore] Add missing 0r instructions.
Richard Osborne [Sun, 27 Jan 2013 20:42:57 +0000 (20:42 +0000)]
[XCore] Add missing 0r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years agoBBVectorize: Better use of TTI->getShuffleCost
Hal Finkel [Sun, 27 Jan 2013 20:07:01 +0000 (20:07 +0000)]
BBVectorize: Better use of TTI->getShuffleCost

When flipping the pair of subvectors that form a vector, if the
vector length is 2, we can use the SK_Reverse shuffle kind to get
more-accurate cost information. Also we can use the SK_ExtractSubvector
shuffle kind to get accurate subvector extraction costs.

The current cost model implementations don't yet seem complex enough
for this to make a difference (thus, there are no test cases with this
commit), but it should help in future.

Depending on how the various targets optimize and combine shuffles in
practice, we might be able to get more-accurate costs by combining the
costs of multiple shuffle kinds. For example, the cost of flipping the
subvector pairs could be modeled as two extractions and two subvector
insertions. These changes, however, should probably be motivated
by specific test cases.

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

11 years agoLegalizer: Add an assert and tweak a comment to clarify the assumptions this code...
Benjamin Kramer [Sun, 27 Jan 2013 15:04:43 +0000 (15:04 +0000)]
Legalizer: Add an assert and tweak a comment to clarify the assumptions this code makes.

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

11 years agoIn the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attribut...
Bill Wendling [Sun, 27 Jan 2013 12:50:02 +0000 (12:50 +0000)]
In the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attributes being passed in.

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

11 years ago[CMake][Lit][unittests] Cleanup in AddLLVM.cmake.
NAKAMURA Takumi [Sun, 27 Jan 2013 12:46:53 +0000 (12:46 +0000)]
[CMake][Lit][unittests] Cleanup in AddLLVM.cmake.

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

11 years ago[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
NAKAMURA Takumi [Sun, 27 Jan 2013 12:20:50 +0000 (12:20 +0000)]
[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.

For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

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

11 years agoWhen the legalizer is splitting vector shifts, the result may not have the right...
Benjamin Kramer [Sun, 27 Jan 2013 11:19:11 +0000 (11:19 +0000)]
When the legalizer is splitting vector shifts, the result may not have the right shift amount type.

Fix that by adding a cast to the shift expander. This came up with vector shifts
on sse-less X86 CPUs.

   <2 x i64>       = shl <2 x i64> <2 x i64>
-> i64,i64         = shl i64 i64; shl i64 i64
-> i32,i32,i32,i32 = shl_parts i32 i32 i64; shl_parts i32 i32 i64

Now we cast the last two i64s to the right type. Fixes the crash in PR14668.

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

11 years agoFix miscompile. Add back the use of the ArrayRef version of the ::get method.
Bill Wendling [Sun, 27 Jan 2013 10:28:39 +0000 (10:28 +0000)]
Fix miscompile. Add back the use of the ArrayRef version of the ::get method.

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

11 years agoRearrange some deckchairs. Moving the class before it's use.
Bill Wendling [Sun, 27 Jan 2013 10:00:13 +0000 (10:00 +0000)]
Rearrange some deckchairs. Moving the class before it's use.

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

11 years agoRemove dead methods.
Bill Wendling [Sun, 27 Jan 2013 09:55:44 +0000 (09:55 +0000)]
Remove dead methods.

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

11 years agoRe-revert r173342, without losing the compile time improvements, flat
Chandler Carruth [Sun, 27 Jan 2013 06:42:03 +0000 (06:42 +0000)]
Re-revert r173342, without losing the compile time improvements, flat
out bug fixes, or functionality preserving refactorings.

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

11 years agoRenamed function IsPotentialUse to IsPotentialRetainableObjPtr.
Michael Gottesman [Sun, 27 Jan 2013 06:19:48 +0000 (06:19 +0000)]
Renamed function IsPotentialUse to IsPotentialRetainableObjPtr.

This name change does the following:

1. Causes the function name to use proper ARC terminology.
2. Makes it clear what the function truly does.

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

11 years agoFix test to not use the AttributeSet's AttributeWithIndex creation method.
Bill Wendling [Sun, 27 Jan 2013 03:39:10 +0000 (03:39 +0000)]
Fix test to not use the AttributeSet's AttributeWithIndex creation method.

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

11 years agoHide the method that creates an AttributeSet with AttributeWithIndexes.
Bill Wendling [Sun, 27 Jan 2013 03:35:32 +0000 (03:35 +0000)]
Hide the method that creates an AttributeSet with AttributeWithIndexes.

This method will go away once AttributeWithIndex goes away. In the meantime,
hide it from general use.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 03:25:05 +0000 (03:25 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:24:02 +0000 (02:24 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:08:22 +0000 (02:08 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:57:28 +0000 (01:57 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:44:34 +0000 (01:44 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoConvert the CPP backend to use the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:22:51 +0000 (01:22 +0000)]
Convert the CPP backend to use the AttributeSet instead of AttributeWithIndex.

Further removal of the introspective AttributeWithIndex thing. Also fix the #includes.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex object.
Bill Wendling [Sun, 27 Jan 2013 00:36:48 +0000 (00:36 +0000)]
Use the AttributeSet instead of AttributeWithIndex object.

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

11 years agoPR14566: Debug Info: Removing top level lexical blocks
David Blaikie [Sat, 26 Jan 2013 21:55:23 +0000 (21:55 +0000)]
PR14566: Debug Info: Removing top level lexical blocks

This adds support for LLVM to accept metadata that doesn't include a top level
lexical block in a function. Specifically LLVM couldn't handle this when there
were file changes relating to these blocks. I've updated a few test cases to
ensure other functionality (such as inlining) isn't affected by this change, but
haven't pervasively updated all the test cases.

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

11 years agoIRBuilder: Remove redundant check around SetInstDebugLocation call.
David Blaikie [Sat, 26 Jan 2013 21:55:19 +0000 (21:55 +0000)]
IRBuilder: Remove redundant check around SetInstDebugLocation call.

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

11 years agoBBVectorize: Add a additional comment about the cost computation
Hal Finkel [Sat, 26 Jan 2013 16:49:04 +0000 (16:49 +0000)]
BBVectorize: Add a additional comment about the cost computation

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

11 years agoBBVectorize: Fix anomalous capital letter in comment
Hal Finkel [Sat, 26 Jan 2013 16:49:03 +0000 (16:49 +0000)]
BBVectorize: Fix anomalous capital letter in comment

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

11 years agoX86: Decode PALIGN operands so I don't have to do it in my head.
Benjamin Kramer [Sat, 26 Jan 2013 13:31:37 +0000 (13:31 +0000)]
X86: Decode PALIGN operands so I don't have to do it in my head.

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

11 years agoDocumentation: fix syntax error
Dmitri Gribenko [Sat, 26 Jan 2013 13:30:13 +0000 (13:30 +0000)]
Documentation: fix syntax error

Patch by David Waggoner

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

11 years agoX86: Do splat promotion later, so the optimizer can chew on it first.
Benjamin Kramer [Sat, 26 Jan 2013 11:44:21 +0000 (11:44 +0000)]
X86: Do splat promotion later, so the optimizer can chew on it first.

This catches many cases where we can emit a more efficient shuffle for a
specific mask or when the mask contains undefs. Once the splat is lowered to
unpacks we can't do that anymore.

There is a possibility of moving the promotion after pshufb matching, but I'm
not sure if pshufb with a mask loaded from memory is faster than 3 shuffles, so
I avoided that for now.

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

11 years agoFileCheckize and merge some tests.
Benjamin Kramer [Sat, 26 Jan 2013 11:14:32 +0000 (11:14 +0000)]
FileCheckize and merge some tests.

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

11 years agoObject/RelocVisitor: Add minimal support, R_MIPS_32, for mips.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:36 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_MIPS_32, for mips.

It fixes llvm-dwarfdump for mips and mipsel.

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

11 years agoObject/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:29 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.

It fixes llvm-dwarfdump for ppc64-elf.

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

11 years agoRelocVisitor::visit(): Set hasError in the default path.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:23 +0000 (08:27 +0000)]
RelocVisitor::visit(): Set hasError in the default path.

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

11 years agofix use of std::std. it's ordered set.
Reed Kotler [Sat, 26 Jan 2013 06:58:35 +0000 (06:58 +0000)]
fix use of std::std. it's ordered set.

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

11 years agoDWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?
NAKAMURA Takumi [Sat, 26 Jan 2013 01:45:06 +0000 (01:45 +0000)]
DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?

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

11 years agoAdd DIContext::getLineInfoForAddressRange() function and test. This function allows...
Andrew Kaylor [Sat, 26 Jan 2013 00:28:05 +0000 (00:28 +0000)]
Add DIContext::getLineInfoForAddressRange() function and test.  This function allows a caller to obtain a table of line information for a function using the function's address and size.

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

11 years agoConvert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithI...
Bill Wendling [Sat, 26 Jan 2013 00:03:11 +0000 (00:03 +0000)]
Convert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithIndex.

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

11 years agoA port of the Visual Studio 2012 debugger visualizers for common LLVM and clang datat...
Aaron Ballman [Fri, 25 Jan 2013 23:37:25 +0000 (23:37 +0000)]
A port of the Visual Studio 2012 debugger visualizers for common LLVM and clang datatypes.  Patch thanks to Nico Rieck!

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

11 years agollvm/test/CMakeLists.txt: Add a dependency to llvm-rtdyld in check-llvm.
NAKAMURA Takumi [Fri, 25 Jan 2013 23:24:07 +0000 (23:24 +0000)]
llvm/test/CMakeLists.txt: Add a dependency to llvm-rtdyld in check-llvm.

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

11 years agoRemove unused variables, silences -Wunused-variable
Dmitri Gribenko [Fri, 25 Jan 2013 23:17:21 +0000 (23:17 +0000)]
Remove unused variables, silences -Wunused-variable

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

11 years agoRemove dead method.
Bill Wendling [Fri, 25 Jan 2013 23:14:36 +0000 (23:14 +0000)]
Remove dead method.

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

11 years agoRemove some introspection functions.
Bill Wendling [Fri, 25 Jan 2013 23:09:36 +0000 (23:09 +0000)]
Remove some introspection functions.

The 'getSlot' function and its ilk allow introspection into the AttributeSet
class. However, that class should be opaque. Allow access through accessor
methods instead.

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

11 years agoInitial implementation of PPCTargetTransformInfo
Hal Finkel [Fri, 25 Jan 2013 23:05:59 +0000 (23:05 +0000)]
Initial implementation of PPCTargetTransformInfo

This provides a place to add customized operation cost information and
control some other target-specific IR-level transformations.

The only non-trivial logic in this checkin assigns a higher cost to
unaligned loads and stores (covered by the included test case).

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

11 years agoFix a warning in the new DWARFheader. Add a new line at the end of the file.
Nadav Rotem [Fri, 25 Jan 2013 22:57:05 +0000 (22:57 +0000)]
Fix a warning in the new DWARFheader. Add a new line at the end of the file.

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

11 years agoAdd support for applying in-memory relocations to the .debug_line section and, in...
Andrew Kaylor [Fri, 25 Jan 2013 22:50:58 +0000 (22:50 +0000)]
Add support for applying in-memory relocations to the .debug_line section and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section.  Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes.

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

11 years agoAdd file to CMakeLists (file added in r173505)
Dmitri Gribenko [Fri, 25 Jan 2013 22:29:23 +0000 (22:29 +0000)]
Add file to CMakeLists (file added in r173505)

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

11 years agoXFAIL close-stderr on win32
Reid Kleckner [Fri, 25 Jan 2013 22:12:54 +0000 (22:12 +0000)]
XFAIL close-stderr on win32

The test runner does not rewrite instances of /dev/null inside the
quoted sh command.  /dev/null does not exist, so opt will fail to open
it, and return a non-zero exit code.

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

11 years agoSet the +x bit on two batch scripts
Reid Kleckner [Fri, 25 Jan 2013 22:12:50 +0000 (22:12 +0000)]
Set the +x bit on two batch scripts

Cygwin git-svn will faithfully forward the svn properties all the way
down to the NTFS executable permission.  Without the +x bit, tests using
these scripts fail with "Access Denied".

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

11 years agoAdd parens to suppress an MSVC 2012 << precedence warning
Reid Kleckner [Fri, 25 Jan 2013 22:12:45 +0000 (22:12 +0000)]
Add parens to suppress an MSVC 2012 << precedence warning

It doesn't seem to like instantiating the isUInt<unsigned N> template
with 6+3, and then doing <<N.

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

11 years agoFileCheck-ify some grep tests
Reid Kleckner [Fri, 25 Jan 2013 22:11:46 +0000 (22:11 +0000)]
FileCheck-ify some grep tests

These tests in particular try to use escaped square brackets as an
argument to grep, which is failing for me with native win32 python.  It
appears the backslash is being lost near the CreateProcess*() call.

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

11 years agoAdd an insert() method to MapVector. Adds the first MapVector unit test.
Nick Lewycky [Fri, 25 Jan 2013 22:11:02 +0000 (22:11 +0000)]
Add an insert() method to MapVector. Adds the first MapVector unit test.

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

11 years agoIn this patch, we teach X86_64TargetMachine that it has a ILP32
Eli Bendersky [Fri, 25 Jan 2013 22:07:43 +0000 (22:07 +0000)]
In this patch, we teach X86_64TargetMachine that it has a ILP32
(defined by the x32 ABI) mode, in which case its pointers are 32-bits
in size. This knowledge is also added to X86RegisterInfo that now
returns the appropriate registers in getPointerRegClass.

There are many outcomes to this change. In order to keep the patches
separate and manageable, we start by focusing on some simple testable
cases. The patch adds a test with passing a pointer to a function -
focusing on the difference between the two data models for x86-64.
Another test is added for handling of 'sret' arguments (and
functionality is added in X86ISelLowering to make it work).

A note on naming: the "x32 ABI" document refers to the AMD64
architecture (in LLVM it's distinguished by being is64Bits() in the
x86 subtarget) with two variations: the LP64 (default) data model, and
the ILP32 data model. This patch adds predicates to the subtarget
which are consistent with this naming scheme.

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

11 years agoAdd back a RUN line removed by mistake by a previous commit
Eli Bendersky [Fri, 25 Jan 2013 21:58:09 +0000 (21:58 +0000)]
Add back a RUN line removed by mistake by a previous commit

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

11 years agoAdd instruction encodings / disassembly support for l4r instructions.
Richard Osborne [Fri, 25 Jan 2013 21:55:32 +0000 (21:55 +0000)]
Add instruction encodings / disassembly support for l4r instructions.

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

11 years agoLoopVectorize: Refactor the code that vectorizes loads/stores to remove duplication.
Nadav Rotem [Fri, 25 Jan 2013 21:47:42 +0000 (21:47 +0000)]
LoopVectorize: Refactor the code that vectorizes loads/stores to remove duplication.

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

11 years agoUse the new 'getSlotIndex' method to retrieve the attribute's slot index.
Bill Wendling [Fri, 25 Jan 2013 21:46:52 +0000 (21:46 +0000)]
Use the new 'getSlotIndex' method to retrieve the attribute's slot index.

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

11 years agoNow that llvm-dwarfdump supports flags to specify which DWARF section to dump,
Eli Bendersky [Fri, 25 Jan 2013 21:44:53 +0000 (21:44 +0000)]
Now that llvm-dwarfdump supports flags to specify which DWARF section to dump,
use them in tests that run llvm-dwarfdump. This is in order to make tests as
specific as possible.

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

11 years agoUse const reference instead of vector copying.
Jakub Staszak [Fri, 25 Jan 2013 21:44:27 +0000 (21:44 +0000)]
Use const reference instead of vector copying.

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

11 years agoAdd an accessor method to get the slot's index. This will limit the use of AttributeW...
Bill Wendling [Fri, 25 Jan 2013 21:30:53 +0000 (21:30 +0000)]
Add an accessor method to get the slot's index. This will limit the use of AttributeWithIndex.

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

11 years agoUse the correct format in the STW / SETPSC instruction names.
Richard Osborne [Fri, 25 Jan 2013 21:25:12 +0000 (21:25 +0000)]
Use the correct format in the STW / SETPSC instruction names.

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

11 years agoFix order of operands for crc8_l4r
Richard Osborne [Fri, 25 Jan 2013 21:20:28 +0000 (21:20 +0000)]
Fix order of operands for crc8_l4r

The order in which operands appear in the encoded instruction is different
to order in which they appear in assembly. This changes the XCore backend to
use the instruction encoding order.

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

11 years agoWhen encountering an unknown file format, ObjectFile::createObjectFile should
Eli Bendersky [Fri, 25 Jan 2013 20:53:41 +0000 (20:53 +0000)]
When encountering an unknown file format, ObjectFile::createObjectFile should
politely report it instead of running into llvm_unreachable.

Also patch llvm-dwarfdump to actually check whether the file it's attempting to
dump is a valid object file.

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

11 years agoThis is no trule.
David Blaikie [Fri, 25 Jan 2013 20:47:58 +0000 (20:47 +0000)]
This is no trule.

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

11 years agoImprove the !add TableGen test case.
Hal Finkel [Fri, 25 Jan 2013 20:29:25 +0000 (20:29 +0000)]
Improve the !add TableGen test case.

Suggested by Sean Silva.

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

11 years agoAdd command-line flags for DWARF dumping.
Eli Bendersky [Fri, 25 Jan 2013 20:26:43 +0000 (20:26 +0000)]
Add command-line flags for DWARF dumping.

Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.

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

11 years agoAdd instruction encodings / disassembly support for l5r instructions.
Richard Osborne [Fri, 25 Jan 2013 20:20:07 +0000 (20:20 +0000)]
Add instruction encodings / disassembly support for l5r instructions.

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

11 years agoFixed typo.
Michael Gottesman [Fri, 25 Jan 2013 20:20:00 +0000 (20:20 +0000)]
Fixed typo.

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

11 years agoFix order of operands for l5r instructions.
Richard Osborne [Fri, 25 Jan 2013 20:16:00 +0000 (20:16 +0000)]
Fix order of operands for l5r instructions.

With this change the operands order matches the order in which the operands
are encoded in the instruction.

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

11 years agoUse correct mnemonic / instruction name for ldivu.
Richard Osborne [Fri, 25 Jan 2013 20:11:26 +0000 (20:11 +0000)]
Use correct mnemonic / instruction name for ldivu.

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

11 years agoLoopVectorize: Simplify code. No functionality change.
Benjamin Kramer [Fri, 25 Jan 2013 19:43:15 +0000 (19:43 +0000)]
LoopVectorize: Simplify code. No functionality change.

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

11 years agoadded ability to dynamically change the ExportList of an already
Pedro Artigas [Fri, 25 Jan 2013 19:41:03 +0000 (19:41 +0000)]
added ability to dynamically change the ExportList of an already
created InternalizePass (useful for pass reuse)

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

11 years agoAdded new section to the git-svn getting started section that provides a
Michael Gottesman [Fri, 25 Jan 2013 19:31:09 +0000 (19:31 +0000)]
Added new section to the git-svn getting started section that provides a
custom git script called git-svnup which handles all of the work of
using the git-mirrors/keeping the git-svn numbers in sync.

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

11 years agoLoopVectorizer: Refactor more code to use the IRBuilder.
Nadav Rotem [Fri, 25 Jan 2013 19:26:23 +0000 (19:26 +0000)]
LoopVectorizer: Refactor more code to use the IRBuilder.

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

11 years agoUse xcrun to find the right compiler when building llvmCore. <rdar://12801151>
Bob Wilson [Fri, 25 Jan 2013 18:40:25 +0000 (18:40 +0000)]
Use xcrun to find the right compiler when building llvmCore. <rdar://12801151>

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

11 years agoRefactor some code to use the IRBuilder.
Nadav Rotem [Fri, 25 Jan 2013 18:34:09 +0000 (18:34 +0000)]
Refactor some code to use the IRBuilder.

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

11 years agoRename variable to be more comprehensible and follow naming convention
Eli Bendersky [Fri, 25 Jan 2013 17:06:42 +0000 (17:06 +0000)]
Rename variable to be more comprehensible and follow naming convention

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

11 years agoAPFloat: Make sure that we get a well-formed x87 NaN when converting from a smaller...
Benjamin Kramer [Fri, 25 Jan 2013 17:01:00 +0000 (17:01 +0000)]
APFloat: Make sure that we get a well-formed x87 NaN when converting from a smaller type.

Fixes PR15054.

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

11 years agoDisable MSVC's warning about noreturn destructors
Reid Kleckner [Fri, 25 Jan 2013 15:36:13 +0000 (15:36 +0000)]
Disable MSVC's warning about noreturn destructors

This warning fires on:
  Operator::~Operator() {
    llvm_unreachable("should never destroy an Operator");
  }

That seems like a false positive.  I don't see any good way to silence
the warning here, so I'm disabling it.

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

11 years agoFix MSVC 2012 warning about a 32-bit shift that should be 64-bit
Reid Kleckner [Fri, 25 Jan 2013 15:35:56 +0000 (15:35 +0000)]
Fix MSVC 2012 warning about a 32-bit shift that should be 64-bit

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

11 years ago[msan] A comment on ICmp handling logic.
Evgeniy Stepanov [Fri, 25 Jan 2013 15:35:29 +0000 (15:35 +0000)]
[msan] A comment on ICmp handling logic.

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

11 years ago[msan] Implement exact shadow propagation for relational ICmp.
Evgeniy Stepanov [Fri, 25 Jan 2013 15:31:10 +0000 (15:31 +0000)]
[msan] Implement exact shadow propagation for relational ICmp.

Only for integers, pointers, and vectors of those. No floats.
Instrumentation seems very heavy, and may need to be replaced
with some approximation in the future.

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

11 years agoThis patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap,
Preston Gurd [Fri, 25 Jan 2013 15:18:54 +0000 (15:18 +0000)]
This patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap,
with an initial number of elements,  instead of DenseMap, which has
zero initial elements, in order to avoid the copying of elements
when the size changes and to avoid allocating space every time
LegalizeTypes is run. This patch will not affect the memory footprint,
because DenseMap will increase the element size to 64
when the first element is added.

Patch by Wan Xiaofei.

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

11 years agoMore cleanup of PPC register definitions.
Hal Finkel [Fri, 25 Jan 2013 14:49:10 +0000 (14:49 +0000)]
More cleanup of PPC register definitions.

Uses the new !add TableGen operator to do more cleanup of the
PPC register definitions.

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

11 years agoAdd an addition operator to TableGen
Hal Finkel [Fri, 25 Jan 2013 14:49:08 +0000 (14:49 +0000)]
Add an addition operator to TableGen

This adds an !add(a, b) operator to tablegen; this will be used
to cleanup the PPC register definitions.

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

11 years agoFixed the condition codes for the atomic64 min/umin code generation on ARM. If the...
Silviu Baranga [Fri, 25 Jan 2013 10:39:49 +0000 (10:39 +0000)]
Fixed the condition codes for the atomic64 min/umin code generation on ARM. If the sutraction of the higher 32 bit parts gives a 0 result, we need to do the store operation.

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

11 years agoUse the AttributeSet query instead of the Attribute query.
Bill Wendling [Fri, 25 Jan 2013 08:08:54 +0000 (08:08 +0000)]
Use the AttributeSet query instead of the Attribute query.

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

11 years agoMIsched: Print block name. No functionality.
Andrew Trick [Fri, 25 Jan 2013 07:45:31 +0000 (07:45 +0000)]
MIsched: Print block name. No functionality.

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

11 years agoMachineScheduler support for viewGraph.
Andrew Trick [Fri, 25 Jan 2013 07:45:29 +0000 (07:45 +0000)]
MachineScheduler support for viewGraph.

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