summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AttributeImpl.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r194865 and r194874.Alexey Samsonov2013-11-181-0/+2
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-151-2/+0
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Revert "Give internal classes hidden visibility."Benjamin Kramer2013-09-111-6/+6
| | | | | | | It works with clang, but GCC has different rules so we can't make all of those hidden. This reverts commit r190534. llvm-svn: 190536
* Give internal classes hidden visibility.Benjamin Kramer2013-09-111-6/+6
| | | | | | Worth 100k on a linux/x86_64 Release+Asserts clang. llvm-svn: 190534
* Add a AttributeSetImpl::dump function.Peter Collingbourne2013-08-021-0/+2
| | | | | | | This is for the benefit of those of us with inferior debuggers which do not permit member function calls on value types. llvm-svn: 187685
* Make one of the AttributeSet ctors maintain the invariant that thePeter Collingbourne2013-08-021-0/+9
| | | | | | | | attribute list is ordered by index. Differential Revision: http://llvm-reviews.chandlerc.com/D1265 llvm-svn: 187682
* Reduce the number of indirections in the attributes implementation.Benjamin Kramer2013-07-111-114/+92
| | | | | | | | | | | - Coallocate entires for AttributeSetImpls and Nodes after the class itself. - Remove mutable iterators from immutable classes. - Remove unused context field from AttributeImpl. - Derive Enum/Align/String attribute implementations from AttributeImpl instead of having a whole new inheritance tree for them. - Derive AlignAttributeImpl from EnumAttributeImpl. llvm-svn: 186075
* Now that the underlying issue is fixed, revert r180750 and r180722.Rafael Espindola2013-05-011-1/+1
| | | | | | | | | | | The cause of the windows failures was fixed by r180791. Revert to the state after Sabre's original revert. Original message: revert r179735, it has no testcases, and doesn't really make sense. llvm-svn: 180844
* Change getSlotIndex to return unsigned.Rafael Espindola2013-04-301-2/+2
| | | | | | | | | | | The actual storage was already using unsigned, but the interface was using uint64_t. This is wasteful on 32 bits and looks to be the root causes of a miscompilation on Windows where a value was being sign extended to 64bits to compare with the result of getSlotIndex. Patch by Pasi Parviainen! llvm-svn: 180791
* Revert "revert r179735, it has no testcases, and doesn't really make sense."Reid Kleckner2013-04-291-1/+1
| | | | | | | | | | This un-reverts r179735 and reverts commit r180574. This fixes assertion failures for me locally and should fix the failures on Windows reported widely on llvm-dev. We should check if the bots caught this and if so why not. llvm-svn: 180722
* revert r179735, it has no testcases, and doesn't really make sense.Chris Lattner2013-04-251-1/+1
| | | | llvm-svn: 180574
* Cleanup patch:Bill Wendling2013-04-181-9/+9
| | | | | | | | | | | | | | | Semantics of parameters named Index and Idx were inconsistent between "include/llvm/IR/Attributes.h", "lib/IR/AttributeImpl.h" and "lib/IR/Attributes.cpp": sometimes these were fixed 1-based indexes of IR parameters (or AttributeSet::ReturnIndex for IR return values or AttributeSet::FunctionIndex for IR functions), other times they were the internal slot for storage in the underlying AttributeSetImpl. I renamed usage of the former to "Index" and usage of the latter to "Slot" ("Slot" was already being used consistently for the latter in a subset of cases) Patch by Stephen Lin! llvm-svn: 179791
* Add an option `-enable-old-style-attr-syntax' to print out function ↵Bill Wendling2013-04-171-1/+1
| | | | | | | | | | attributes in the "old" style. It's sometimes beneficial to emit a testcase with the old style attribute syntax. Allow someone to do this. <rdar://problem/13563209> llvm-svn: 179735
* Don't add the 'Value' string if there isn't one.Bill Wendling2013-02-281-1/+1
| | | | | | | | This was causing the folding set to fail to fold attributes, because it was being calculated in one spot without an empty values string but here with an empty values string. llvm-svn: 176301
* Add some accessor and query methods for retrieving Attribute objects and such.Bill Wendling2013-02-131-0/+4
| | | | llvm-svn: 175046
* Add support for printing out the attribute groups.Bill Wendling2013-02-111-1/+1
| | | | | | | | | | | | This emits the attribute groups that are used by the functions. (It currently doesn't print out return type or parameter attributes within attribute groups.) Note: The functions still retrieve their attributes from the "old" bitcode format (using the deprecated 'Raw()' method). This means that string attributes within an attribute group will not show up during a disassembly. This will be addressed in a future commit. llvm-svn: 174867
* Remove unused private field to suppress a build warning.Craig Topper2013-02-061-1/+0
| | | | llvm-svn: 174491
* Convert to storing the attribute's internals as enums, integers, and strings.Bill Wendling2013-02-051-21/+101
| | | | | | | | The stuff we're handing are all enums (Attribute::AttrKind), integers and strings. Don't convert them to Constants, which is an unnecessary step here. The rest of the changes are mostly mechanical. llvm-svn: 174456
* Use the AttributeSet's iterators.Bill Wendling2013-02-021-1/+0
| | | | | | | Use the AttributeSet's iterators in AttrBuilder::hasAttributes() when determining of the intersection of the AttrBuilder and AttributeSet is non-null. llvm-svn: 174250
* Change the AttributeImpl to hold a single Constant* for the values.Bill Wendling2013-02-011-12/+10
| | | | | | This Constant could be an aggregate to represent multiple values. llvm-svn: 174228
* Remove some dead code, improve some asserts, and other assorted changes. No ↵Bill Wendling2013-02-011-7/+2
| | | | | | functionality change. llvm-svn: 174132
* Remove one of the odious 'Raw' methods.Bill Wendling2013-02-011-2/+1
| | | | llvm-svn: 174130
* Remove the AttrBuilder form of the Attribute::get creators.Bill Wendling2013-01-311-0/+2
| | | | | | | | | | | | | The AttrBuilder is for building a collection of attributes. The Attribute object holds only one attribute. So it's not really useful for the Attribute object to have a creator which takes an AttrBuilder. This has two fallouts: 1. The AttrBuilder no longer holds its internal attributes in a bit-mask form. 2. The attributes are now ordered alphabetically (hence why the tests have changed). llvm-svn: 174110
* Add support for emitting a string attribute.Bill Wendling2013-01-311-3/+4
| | | | | | | | | | Attributes that are strings are typically target-dependent attributes. They are of this form in the IR: "attr" "attr" = "val" llvm-svn: 174090
* Remove the Attribute::hasAttributes() function.Bill Wendling2013-01-311-1/+0
| | | | | | | That function doesn't make sense anymore because there's only one attribute per Attribute object now. llvm-svn: 174044
* Revert r174026, "Remove Attribute::hasAttributes() and make ↵NAKAMURA Takumi2013-01-311-0/+1
| | | | | | | | Attribute::hasAttribute() private." It broke many hosts to crash. llvm-svn: 174035
* Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.Bill Wendling2013-01-311-1/+0
| | | | | | | | The Attribute::hasAttributes() is kind of meaningless since an Attribute can have only one attribute. And we would rather people use the 'operator==' instead of Attribute::hasAttribute(). llvm-svn: 174026
* s/Data/Kind/g. No functionality change.Bill Wendling2013-01-291-6/+9
| | | | llvm-svn: 173827
* Convert getAttributes() to return an AttributeSetNode.Bill Wendling2013-01-291-0/+14
| | | | | | | The AttributeSetNode contains all of the attributes. This removes one (hopefully last) use of the Attribute class as a container of multiple attributes. llvm-svn: 173761
* Reorder some functions and add comments. No functionality change.Bill Wendling2013-01-291-11/+14
| | | | llvm-svn: 173733
* Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.Bill Wendling2013-01-281-3/+3
| | | | llvm-svn: 173725
* Remove the AttributeWithIndex class.Bill Wendling2013-01-281-14/+5
| | | | | | | 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
* Remove a use of AttributeWithIndex.Bill Wendling2013-01-281-2/+18
| | | | | | | | | | 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
* Use proper return type for attribute index.Bill Wendling2013-01-271-1/+1
| | | | llvm-svn: 173638
* Push the calculation of the 'Raw' attribute mask down into the ↵Bill Wendling2013-01-271-0/+3
| | | | | | implementation. It in turn uses the correct list for calculating the 'Raw' value. llvm-svn: 173637
* Privitize some the copy c'tor and assignment operator of uniquified objects.Bill Wendling2013-01-271-0/+8
| | | | llvm-svn: 173632
* Add some helpful comments.Bill Wendling2013-01-271-6/+15
| | | | llvm-svn: 173631
* Start using more of the AttrNode in the AttributeSetImpl class.Bill Wendling2013-01-271-5/+4
| | | | | | Also add some asserts. llvm-svn: 173627
* In the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the ↵Bill Wendling2013-01-271-4/+2
| | | | | | attributes being passed in. llvm-svn: 173618
* Remove some introspection functions.Bill Wendling2013-01-251-0/+6
| | | | | | | | 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
* Add an accessor method to get the slot's index. This will limit the use of ↵Bill Wendling2013-01-251-0/+4
| | | | | | AttributeWithIndex. llvm-svn: 173495
* Add a profile for uniquifying the AttributeSet with the AttributeSetNodes.Bill Wendling2013-01-241-1/+14
| | | | llvm-svn: 173313
* Create a new class: AttributeSetNode.Bill Wendling2013-01-241-1/+34
| | | | | | | | | | 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
* Remove dead methods.Bill Wendling2013-01-231-3/+0
| | | | llvm-svn: 173302
* Make AttributeSet::getFnAttributes() return an AttributeSet instead of an ↵Bill Wendling2013-01-211-0/+2
| | | | | | | | | 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
* Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test ↵Bill Wendling2013-01-091-2/+2
| | | | | | hangings. llvm-svn: 172020
* Add the integer value of the ConstantInt instead of the Constant* value.Bill Wendling2013-01-091-6/+1
| | | | | | This is causing some problems. The root cause is unknown at this time. llvm-svn: 171923
* Rough out a new c'tor for the AttrBuilder class.Bill Wendling2013-01-071-3/+1
| | | | | | | | This c'tor takes the AttributeSet class as the parameter. It will eventually grab the attributes from the specified index and create a new attribute builder with those attributes. llvm-svn: 171712
* Add a method to create an AttributeSet from an AttrBuilder.Bill Wendling2013-01-051-0/+4
| | | | | | | | The Attribute class is eventually going to represent one attribute. So we need this class to create the set of attributes. Add some iterator methods to the builder to access its internal bits in a nice way. llvm-svn: 171586
* General cleanups.Bill Wendling2013-01-041-27/+20
| | | | | | | | | | * Remove dead methods. * Use the 'operator==' method instead of 'contains', which isn't needed. * Fix some comments. No functionality change. llvm-svn: 171523
OpenPOWER on IntegriCloud