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

68 Commits

Author SHA1 Message Date
Bill Wendling
2c8641d0f2 S'more small non-functional changes in comments and #includes.
llvm-svn: 173738
2013-01-29 00:48:16 +00:00
Bill Wendling
ddceb848ff Reorder some functions and add comments. No functionality change.
llvm-svn: 173733
2013-01-29 00:34:06 +00:00
Bill Wendling
a15e00ef6c Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.
llvm-svn: 173725
2013-01-28 22:33:39 +00:00
Bill Wendling
1d30e7f569 Remove the AttributeWithIndex class.
The AttributeWithIndex class exposed the interior structure of the AttributeSet
class. That was gross. Remove it and all of the code that relied upon it.

llvm-svn: 173722
2013-01-28 21:55:20 +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
Bill Wendling
5534b9814d Use proper type for the index.
llvm-svn: 173646
2013-01-28 01:30:29 +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
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
fefacc5936 Don't erase these methods. They're used during testing.
llvm-svn: 173636
2013-01-27 22:46:17 +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
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
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
d3b2ea02ca Rearrange some deckchairs. Moving the class before it's use.
llvm-svn: 173612
2013-01-27 10:00:13 +00:00
Bill Wendling
920cb6d54f Remove dead methods.
llvm-svn: 173611
2013-01-27 09:55:44 +00:00
Bill Wendling
d8d5c37332 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
David Blaikie
86f83366e8 IRBuilder: Remove redundant check around SetInstDebugLocation call.
llvm-svn: 173591
2013-01-26 21:55:19 +00:00
Bill Wendling
d5b4c9438f Convert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithIndex.
llvm-svn: 173536
2013-01-26 00:03:11 +00:00
Bill Wendling
46a6a632dc Remove dead method.
llvm-svn: 173524
2013-01-25 23:14:36 +00:00
Bill Wendling
47efd8b988 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.

llvm-svn: 173522
2013-01-25 23:09:36 +00:00
Bill Wendling
4e9de7c89b Add an accessor method to get the slot's index. This will limit the use of AttributeWithIndex.
llvm-svn: 173495
2013-01-25 21:30:53 +00:00
Bill Wendling
8e189381a8 Add a profile for uniquifying the AttributeSet with the AttributeSetNodes.
llvm-svn: 173313
2013-01-24 01:01:34 +00:00
Bill Wendling
1898f7c8a5 Create a new class: AttributeSetNode.
This is a helper class for the AttributeSetImpl class. It holds a set of
attributes that apply to a single element: function, return type, or
parameter.

These are uniqued.

llvm-svn: 173310
2013-01-24 00:06:56 +00:00
Bill Wendling
2d899a78d1 Remove dead methods.
llvm-svn: 173302
2013-01-23 22:38:33 +00:00
Bill Wendling
9ee1ad34e6 Remove unused methods and ivars.
llvm-svn: 173284
2013-01-23 19:06:01 +00:00
Bill Wendling
9e0064d80b Add the IR attribute 'sspstrong'.
SSPStrong applies a heuristic to insert stack protectors in these situations:

* A Protector is required for functions which contain an array, regardless of
  type or length.

* A Protector is required for functions which contain a structure/union which
  contains an array, regardless of type or length.  Note, there is no limit to
  the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
  based variable) is exposed. (E.g., such as through a local whose address is
  taken as part of the RHS of an assignment or a local whose address is taken as
  part of a function argument.)

This patch implements the SSPString attribute to be equivalent to
SSPRequired. This will change in a subsequent patch.

llvm-svn: 173230
2013-01-23 06:41:41 +00:00
Bill Wendling
c31f99d129 Remove the last of uses that use the Attribute object as a collection of attributes.
Collections of attributes are handled via the AttributeSet class now. This
finally frees us up to make significant changes to how attributes are structured.

llvm-svn: 173228
2013-01-23 06:14:59 +00:00
Bill Wendling
e11164c08d Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKind
when removing one attribute. This further encapsulates the use of the attributes.

llvm-svn: 173214
2013-01-23 00:45:55 +00:00
Bill Wendling
627f56935c Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.

llvm-svn: 173210
2013-01-23 00:20:53 +00:00
Bill Wendling
82711f5390 More encapsulation work.
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.

llvm-svn: 173196
2013-01-22 21:15:51 +00:00
Tim Northover
52ba1e77cb Make APFloat constructor require explicit semantics.
Previously we tried to infer it from the bit width size, with an added
IsIEEE argument for the PPC/IEEE 128-bit case, which had a default
value. This default value allowed bugs to creep in, where it was
inappropriate.

llvm-svn: 173138
2013-01-22 09:46:31 +00:00
Bill Wendling
695b24a4e3 Add a new method that adds the AttributeSet at the given index. No functional change.
llvm-svn: 173109
2013-01-22 00:53:12 +00:00
Bill Wendling
78170daa47 Remove unused method.
llvm-svn: 173106
2013-01-21 23:41:50 +00:00
Bill Wendling
f8c0d4f9cd Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.
This further restricts the use of the Attribute class to the Attribute family of
classes.

llvm-svn: 173098
2013-01-21 22:44:49 +00:00
Bill Wendling
991cef6573 Make AttributeSet::getFnAttributes() return an AttributeSet instead of an Attribute.
This is more code to isolate the use of the Attribute class to that of just
holding one attribute instead of a collection of attributes.

llvm-svn: 173094
2013-01-21 21:57:28 +00:00
Michael Gottesman
9d9d4177c8 Changed IRBuilder::CreateZExtOrTrunc and IRBuilder::CreateSExtOrTrunc so they also work with vectors.
I also changed the name of a variable in IRBuilder::CreateFPExtOrFPTrunc to
match the names used in its two matching brethern as well.

llvm-svn: 172967
2013-01-20 07:33:26 +00:00
Michael Gottesman
267605ce40 More copy editing.
llvm-svn: 172962
2013-01-20 05:12:35 +00:00
Michael Gottesman
dbf99c2186 Doxygenified and copy edited BasicBlock.h.
llvm-svn: 172961
2013-01-20 05:03:42 +00:00
Michael Gottesman
e10d38568b Doxygenified Argument.h and performed some copy editing of the documentation.
llvm-svn: 172960
2013-01-20 05:03:39 +00:00
Michael Gottesman
227fb44dae Converted all method comments in IRBuilder.h to use doxygen style comments.
This implies changing method documentation from the following style:

/// MethodName - Method description...

to

/// \brief Method description...

ala the LLVM Style Guide.

llvm-svn: 172959
2013-01-20 05:03:37 +00:00
Michael Gottesman
5716eb1faa Corrected assert messages for CreateZExtOrTrunc/CreateSExtOrTrunc.
llvm-svn: 172958
2013-01-20 04:19:39 +00:00
Michael Gottesman
613607db03 Added IRBuilder::CreateFPExtOrFPTrunc.
This method serves an analogous purpose to CreateZExtOrTrunc/CreateSExtOrTrunc
but for floating point types.

In detail, it provides a manner when one is handling conversions of floating
point types of automatically selecting fpext, fptrunc, or identity depending on
the relative bitsize of the source and destination types.

llvm-svn: 172957
2013-01-20 03:56:31 +00:00
Bill Wendling
7777bbbbf3 Use AttributeSet accessor methods instead of Attribute accessor methods.
Further encapsulation of the Attribute object. Don't allow direct access to the
Attribute object as an aggregate.

llvm-svn: 172853
2013-01-18 21:53:16 +00:00
Bill Wendling
b5ddc9a5f8 Push some more methods down to hide the use of the Attribute class.
Because the Attribute class is going to stop representing a collection of
attributes, limit the use of it as an aggregate in favor of using AttributeSet.
This replaces some of the uses for querying the function attributes.

llvm-svn: 172844
2013-01-18 21:11:39 +00:00
Daniel Dunbar
677520900d [IR] Add 'Append' and 'AppendUnique' module flag behaviors.
llvm-svn: 172659
2013-01-16 21:38:56 +00:00
Evgeniy Stepanov
a263f1e883 Fix operand type conditions in one of ICmpInst constructors.
It was out of sync with the conditions in the other two constructors.

llvm-svn: 172535
2013-01-15 15:30:33 +00:00
Michael Ilseman
d8715c1e7a Support for half intrinsics. Pushes MMX into slower encoding path.
llvm-svn: 172159
2013-01-11 01:45:05 +00:00
Jakub Staszak
73b0ab1917 Remove trailing spaces.
llvm-svn: 172125
2013-01-10 22:14:33 +00:00