Commit Graph

88796 Commits

Author SHA1 Message Date
Craig Topper 71d99ffe4a Add missing break in 256-bit palignr comment printing. No test case yet because the comment itself is still wrong.
llvm-svn: 173669
2013-01-28 07:19:11 +00:00
Craig Topper 8fb09f0abb Fix inconsistent usage of PALIGN and PALIGNR when referring to the same instruction.
llvm-svn: 173667
2013-01-28 06:48:25 +00:00
Michael Gottesman 5ed40afe17 Created ObjCARCUtil.cpp for functions which in my humble opinion are too large to static inline and place in a header file such as ObjCARC.h.
llvm-svn: 173666
2013-01-28 06:39:31 +00:00
Craig Topper b3ede5e3b1 Remove addToNoHelperNeeded function that was left unused after r173649. Fixes a -Wunused warning.
llvm-svn: 173664
2013-01-28 06:09:24 +00:00
Michael Gottesman 9bfcf28d88 Cleaned up includes in various ObjCARC files and removed some whitespace violations.
llvm-svn: 173663
2013-01-28 05:51:58 +00:00
Michael Gottesman 294e7daaac Refactor ObjCARCAliasAnalysis into its own file.
llvm-svn: 173662
2013-01-28 05:51:54 +00:00
Bill Wendling 892711b0db Mid-air collision. reapply r173656.
llvm-svn: 173661
2013-01-28 05:51:40 +00:00
Bill Wendling 8e31efdbbf Rewrite the removeAttr() method.
This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset (with the requested attributes removed). And then adds the
rest of the subsets.

llvm-svn: 173660
2013-01-28 05:44:14 +00:00
Bill Wendling 1aa9d9e260 Rewrite the addAttr() method.
This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset. And then adds the rest of the subsets.

llvm-svn: 173659
2013-01-28 05:23:28 +00:00
NAKAMURA Takumi 55ec92004f Revert r173646, "Use proper type for the index."
Unfortunately, msvc miscompiles it. Investigating.

llvm-svn: 173656
2013-01-28 04:29:01 +00:00
Michael Gottesman fa0939f790 Refactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.
llvm-svn: 173654
2013-01-28 04:12:07 +00:00
Michael Gottesman 283e079fa6 Fixed case insensitive issue.
llvm-svn: 173653
2013-01-28 03:35:20 +00:00
Michael Gottesman 0d90b12acc Removed extraneous doxygen end module statement.
llvm-svn: 173652
2013-01-28 03:30:34 +00:00
Michael Gottesman 08904e3ba4 Extracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.
I also added the local header ObjCARC.h for common functions used by the
various passes.

llvm-svn: 173651
2013-01-28 03:28:38 +00:00
Edwin Vane 1290640392 Improved svn repo searching for 'make update'
Use a simple recursive bash function to search for svn repos for the 'make
update' target thus including projects like clang-tools-extra.

Reviewers: bkramer, echristo
llvm-svn: 173650
2013-01-28 03:19:57 +00:00
Reed Kotler 97f8e2fa8f Make some code a little simpler.
llvm-svn: 173649
2013-01-28 02:46:49 +00:00
Michael Gottesman 79d8d81226 Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.
llvm-svn: 173647
2013-01-28 01:35:51 +00:00
Bill Wendling 63ab99829a Use proper type for the index.
llvm-svn: 173646
2013-01-28 01:30:29 +00:00
Bill Wendling 2b173121fe Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
llvm-svn: 173644
2013-01-28 01:11:42 +00:00
Bill Wendling 73fe152cd8 Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
llvm-svn: 173642
2013-01-28 00:46:02 +00:00
Bill Wendling 9eb689cf1c Remove a use of AttributeWithIndex.
We want to remove AttributeWithIndex because it provides a non-encapsulated view
of the AttributeSetImpl object. Instead, use accessor methods and iterators.

Eventually, this code can be simplified because the Attribute object will hold
only one attribute instead of multiple attributes.

llvm-svn: 173641
2013-01-28 00:21:34 +00:00
Bill Wendling ad6217c76f Improve the debug output a bit.
llvm-svn: 173640
2013-01-27 23:53:56 +00:00
Bill Wendling 3217eb652b Use proper return type for attribute index.
llvm-svn: 173639
2013-01-27 23:50:44 +00:00
Bill Wendling dbbe7fe865 Use proper return type for attribute index.
llvm-svn: 173638
2013-01-27 23:49:44 +00:00
Bill Wendling 1f786a7371 Push the calculation of the 'Raw' attribute mask down into the implementation. It in turn uses the correct list for calculating the 'Raw' value.
llvm-svn: 173637
2013-01-27 23:41:29 +00:00
Bill Wendling 71ead26439 Don't erase these methods. They're used during testing.
llvm-svn: 173636
2013-01-27 22:46:17 +00:00
Bill Wendling 4bbe9db48f Add special 'get' methods to create an Attribute with an alignment. Also do some random cleanup. No functionality change.
llvm-svn: 173635
2013-01-27 22:43:04 +00:00
Richard Osborne 038d24f90c [XCore] Add missing l2rus instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173634
2013-01-27 22:28:30 +00:00
Bill Wendling 97b4f70b2e Privitize some the copy c'tor and assignment operator of uniquified objects.
llvm-svn: 173632
2013-01-27 21:38:03 +00:00
Bill Wendling 5c8b2dff4d Add some helpful comments.
llvm-svn: 173631
2013-01-27 21:32:11 +00:00
Richard Osborne f2ecd40929 [XCore] Add missing l2r instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173629
2013-01-27 21:26:02 +00:00
Bill Wendling 56b0b2a8e4 s/AttrList/pImpl/g in AttributeSet. No functionality change.
llvm-svn: 173628
2013-01-27 21:23:46 +00:00
Bill Wendling 72223f2959 Start using more of the AttrNode in the AttributeSetImpl class.
Also add some asserts.

llvm-svn: 173627
2013-01-27 21:20:06 +00:00
Benjamin Kramer cf9dae17b7 Legalizer: Reword comment again, per Duncan's suggestion.
llvm-svn: 173625
2013-01-27 21:02:52 +00:00
Richard Osborne 7fe8f63544 [XCore] Add missing 1r instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173624
2013-01-27 20:46:21 +00:00
Richard Osborne 8f56317287 [XCore] Add missing 0r instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173623
2013-01-27 20:42:57 +00:00
Hal Finkel 293a41d14f 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.

llvm-svn: 173621
2013-01-27 20:07:01 +00:00
Benjamin Kramer 084e675e17 Legalizer: Add an assert and tweak a comment to clarify the assumptions this code makes.
llvm-svn: 173620
2013-01-27 15:04:43 +00:00
Bill Wendling 152289ce16 In the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attributes being passed in.
llvm-svn: 173618
2013-01-27 12:50:02 +00:00
NAKAMURA Takumi c42bdfcc05 [CMake][Lit][unittests] Cleanup in AddLLVM.cmake.
llvm-svn: 173617
2013-01-27 12:46:53 +00:00
NAKAMURA Takumi 61a8f974a7 [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.

llvm-svn: 173616
2013-01-27 12:20:50 +00:00
Benjamin Kramer 05cc93964a 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.

llvm-svn: 173615
2013-01-27 11:19:11 +00:00
Bill Wendling f5c1f555cb Fix miscompile. Add back the use of the ArrayRef version of the ::get method.
llvm-svn: 173613
2013-01-27 10:28:39 +00:00
Bill Wendling a05f97c6e5 Rearrange some deckchairs. Moving the class before it's use.
llvm-svn: 173612
2013-01-27 10:00:13 +00:00
Bill Wendling 993604c747 Remove dead methods.
llvm-svn: 173611
2013-01-27 09:55:44 +00:00
Chandler Carruth 329b590e6e Re-revert r173342, without losing the compile time improvements, flat
out bug fixes, or functionality preserving refactorings.

llvm-svn: 173610
2013-01-27 06:42:03 +00:00
Michael Gottesman 5300cdd8f2 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.

llvm-svn: 173609
2013-01-27 06:19:48 +00:00
Bill Wendling a7a55ee2fc Fix test to not use the AttributeSet's AttributeWithIndex creation method.
llvm-svn: 173608
2013-01-27 03:39:10 +00:00
Bill Wendling 53e191b2bc 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.

llvm-svn: 173607
2013-01-27 03:35:32 +00:00
Bill Wendling 4d3491cbea 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.

llvm-svn: 173606
2013-01-27 03:25:05 +00:00