1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

58940 Commits

Author SHA1 Message Date
Craig Topper
493bcfb933 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
ad3bed037a 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
86d4759cc7 Refactor ObjCARCAliasAnalysis into its own file.
llvm-svn: 173662
2013-01-28 05:51:54 +00:00
Bill Wendling
fbc4fffb48 Mid-air collision. reapply r173656.
llvm-svn: 173661
2013-01-28 05:51:40 +00:00
Bill Wendling
29a48a09e5 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
bc011af4a0 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
e02fd3448b 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
a9c5dbd2a3 Refactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.
llvm-svn: 173654
2013-01-28 04:12:07 +00:00
Michael Gottesman
a793d420e6 Fixed case insensitive issue.
llvm-svn: 173653
2013-01-28 03:35:20 +00:00
Michael Gottesman
bddf287573 Removed extraneous doxygen end module statement.
llvm-svn: 173652
2013-01-28 03:30:34 +00:00
Michael Gottesman
4dcab23d5a 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
Reed Kotler
99a57ba847 Make some code a little simpler.
llvm-svn: 173649
2013-01-28 02:46:49 +00:00
Michael Gottesman
3d8ed99b1f 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
5534b9814d Use proper type for the index.
llvm-svn: 173646
2013-01-28 01:30:29 +00:00
Bill Wendling
d3dbdfbd8e Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
llvm-svn: 173644
2013-01-28 01:11:42 +00:00
Bill Wendling
46c2463ec4 Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
llvm-svn: 173642
2013-01-28 00:46:02 +00:00
Bill Wendling
7de8bf67ce 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
ebbee6a7f6 Improve the debug output a bit.
llvm-svn: 173640
2013-01-27 23:53:56 +00:00
Bill Wendling
5783e1e4be Use proper return type for attribute index.
llvm-svn: 173639
2013-01-27 23:50:44 +00:00
Bill Wendling
e21ffcc86f Use proper return type for attribute index.
llvm-svn: 173638
2013-01-27 23:49:44 +00:00
Bill Wendling
dd604e3b22 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
89179c02f8 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
373bdcfeb5 [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
c1f9afeb84 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
4f0a1bba14 Add some helpful comments.
llvm-svn: 173631
2013-01-27 21:32:11 +00:00
Richard Osborne
72f31f9da6 [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
bc0a92c4bd s/AttrList/pImpl/g in AttributeSet. No functionality change.
llvm-svn: 173628
2013-01-27 21:23:46 +00:00
Bill Wendling
2b431a6fb5 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
6107b802a9 Legalizer: Reword comment again, per Duncan's suggestion.
llvm-svn: 173625
2013-01-27 21:02:52 +00:00
Richard Osborne
70183ce54a [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
be996a5261 [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
115cffae92 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
1e8d008612 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
a298631a83 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
Benjamin Kramer
a19aee8b53 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
8e66ee6471 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
920cb6d54f Remove dead methods.
llvm-svn: 173611
2013-01-27 09:55:44 +00:00
Chandler Carruth
ce01d44307 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
307107e1ea 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
44dbdbefec 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: 173603
2013-01-27 02:24:02 +00:00
Bill Wendling
e901c4cf0a 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: 173602
2013-01-27 02:08:22 +00:00
Bill Wendling
4e3857f416 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: 173601
2013-01-27 01:57:28 +00:00
Bill Wendling
2fc9ade11d 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: 173600
2013-01-27 01:44:34 +00:00
Bill Wendling
3900a8b876 Convert the CPP backend to use the AttributeSet instead of AttributeWithIndex.
Further removal of the introspective AttributeWithIndex thing. Also fix the #includes.

llvm-svn: 173599
2013-01-27 01:22:51 +00:00
Bill Wendling
dcb8db2b6a Use the AttributeSet instead of AttributeWithIndex object.
llvm-svn: 173598
2013-01-27 00:36:48 +00:00
Hal Finkel
9882e8c083 BBVectorize: Add a additional comment about the cost computation
llvm-svn: 173580
2013-01-26 16:49:04 +00:00
Hal Finkel
2d9bc41033 BBVectorize: Fix anomalous capital letter in comment
llvm-svn: 173579
2013-01-26 16:49:03 +00:00
Benjamin Kramer
b7b4734d8b X86: Decode PALIGN operands so I don't have to do it in my head.
llvm-svn: 173572
2013-01-26 13:31:37 +00:00
Benjamin Kramer
f6126f19f4 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.

llvm-svn: 173569
2013-01-26 11:44:21 +00:00
Reed Kotler
bcf0501249 fix use of std::std. it's ordered set.
llvm-svn: 173563
2013-01-26 06:58:35 +00:00