summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the NoBuiltin attribute.Bill Wendling2013-02-221-1/+31
| | | | | | | | The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should not treat the callee function as a built-in function. I.e., it shouldn't try to replace that function with different code. llvm-svn: 175835
* Futureproof AttrBuild if we ever have more than 64 attr enum values.Benjamin Kramer2013-02-181-14/+12
| | | | | | | Currently we're at 34. Bitset should compile into virtually the same code as uint64_t here. llvm-svn: 175437
* GCC doesn't like ++ on enums.Benjamin Kramer2013-02-161-1/+1
| | | | llvm-svn: 175373
* Turn the enum attributes DenseSet in AttrBuilder into a set of bits.Benjamin Kramer2013-02-161-24/+23
| | | | | | | | Avoids malloc and is a lot denser. We lose iteration over target independent attributes, but that's a strange interface anyways and didn't have any users outside of AttrBuilder. llvm-svn: 175370
* Simplify the 'operator<' for the attribute object.Bill Wendling2013-02-151-15/+13
| | | | llvm-svn: 175252
* Revert "Simplify the attributes '<' comparison function."Anna Zaks2013-02-151-13/+15
| | | | | | This reverts commit 82c101153fe7b35bce48781fab038e1b8f31a7bd. llvm-svn: 175250
* Simplify the attributes '<' comparison function.Bill Wendling2013-02-151-15/+13
| | | | llvm-svn: 175235
* Use array_pod_sort.Bill Wendling2013-02-131-1/+1
| | | | llvm-svn: 175048
* Add some accessor and query methods for retrieving Attribute objects and such.Bill Wendling2013-02-131-0/+41
| | | | llvm-svn: 175046
* Support string attributes in the AttrBuilder.Bill Wendling2013-02-121-11/+25
| | | | llvm-svn: 174948
* Add support for printing out the attribute groups.Bill Wendling2013-02-111-12/+19
| | | | | | | | | | | | 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
* [tsan/msan] adding thread_safety and uninitialized_checks attributesKostya Serebryany2013-02-111-0/+6
| | | | llvm-svn: 174864
* The 'Raw' method cannot handle 'string' attributes. Don't even try.Bill Wendling2013-02-101-0/+4
| | | | llvm-svn: 174848
* Handle string attributes in the AttrBuilder.Bill Wendling2013-02-101-1/+5
| | | | llvm-svn: 174834
* Add accessor for the LLVMContext.Bill Wendling2013-02-101-0/+4
| | | | llvm-svn: 174824
* Add a 'StringRef' version of hasAttribute.Bill Wendling2013-02-061-4/+16
| | | | | | | Fix the 'operator==' and 'hasAttributes' queries to take into account target-dependent attributes. llvm-svn: 174481
* Add methods to merge an AttrBuilder into another builder.Bill Wendling2013-02-061-0/+17
| | | | | | | | This is useful when parsing an object that references multiple attribute groups. N.B. If both builders have alignments specified, then they should match! llvm-svn: 174480
* Add the target-dependent (string) attributes from the AttrBuilder to the ↵Bill Wendling2013-02-051-2/+13
| | | | | | AttributeSet. llvm-svn: 174467
* Convert to storing the attribute's internals as enums, integers, and strings.Bill Wendling2013-02-051-106/+150
| | | | | | | | 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
* Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder.Bill Wendling2013-02-051-1/+13
| | | | llvm-svn: 174356
* Initial cleanups of the param-attribute code in the bitcode reader/writer.Bill Wendling2013-02-041-41/+1
| | | | | | | | | Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced by another encoding. Keep around the current LLVM attribute encoder/decoder code, but move it to the bitcode directories so that no one's tempted to use them. llvm-svn: 174335
* Remove AttrBuilder::Raw().Bill Wendling2013-02-021-25/+18
| | | | llvm-svn: 174251
* Use the AttributeSet's iterators.Bill Wendling2013-02-021-4/+22
| | | | | | | 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-15/+13
| | | | | | 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-22/+11
| | | | | | functionality change. llvm-svn: 174132
* Remove one of the odious 'Raw' methods.Bill Wendling2013-02-011-11/+2
| | | | llvm-svn: 174130
* Use iterators instead of relying upon a bitmask of attributes to remove ↵Bill Wendling2013-02-011-11/+17
| | | | | | attributes from an AttrBuilder. llvm-svn: 174123
* Add iterators to the AttributeSet class so that we can access the Attributes ↵Bill Wendling2013-01-311-0/+12
| | | | | | in a nice way. llvm-svn: 174120
* s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more ↵Bill Wendling2013-01-311-15/+15
| | | | | | descriptive of what it actually is. llvm-svn: 174116
* Remove the AttrBuilder form of the Attribute::get creators.Bill Wendling2013-01-311-34/+36
| | | | | | | | | | | | | 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-42/+73
| | | | | | | | | | 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-9/+1
| | | | | | | 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-6/+14
| | | | | | | | Attribute::hasAttribute() private." It broke many hosts to crash. llvm-svn: 174035
* Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.Bill Wendling2013-01-311-14/+6
| | | | | | | | 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
* Revert for now:Bill Wendling2013-01-311-12/+19
| | | | | | | | | --- Reverse-merging r174010 into '.': U include/llvm/IR/Attributes.h U lib/IR/Verifier.cpp U lib/IR/Attributes.cpp llvm-svn: 174012
* Remove the AttrBuilder version of the Attribute::get function.Bill Wendling2013-01-311-19/+12
| | | | | | | | The AttrBuilder is there to build up multiple attributes. The Attribute class represents only one attribute at a time. So remove this unnecessary builder creator method. llvm-svn: 174010
* Make sure that the Attribute object represents one attribute only.Bill Wendling2013-01-311-0/+3
| | | | | | | | Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet to represent multiple attributes. llvm-svn: 174003
* Convert typeIncompatible to return an AttributeSet.Bill Wendling2013-01-301-10/+8
| | | | | | | There are still places which treat the Attribute object as a collection of attributes. I'm systematically removing them. llvm-svn: 173990
* Remove redundant code.Bill Wendling2013-01-301-20/+2
| | | | | | | It was creating a new AttrBuilder when we could just fill in the AttrBuilder we're building. llvm-svn: 173975
* Add a couple of accessor methods to get the kind and values of an attribute.Bill Wendling2013-01-291-0/+8
| | | | llvm-svn: 173828
* s/Data/Kind/g. No functionality change.Bill Wendling2013-01-291-24/+24
| | | | llvm-svn: 173827
* AttributeSet::get(): Fix a valgrind error. It doesn't affect actual ↵NAKAMURA Takumi2013-01-291-1/+1
| | | | | | | | behavior, though. Don't touch I->first on the end iterator, I == E! llvm-svn: 173804
* Convert getAttributes() to return an AttributeSetNode.Bill Wendling2013-01-291-62/+93
| | | | | | | 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
* Use an AttrBuilder to generate the correct AttributeSet.Bill Wendling2013-01-291-10/+14
| | | | | | | | | We no longer accept an encoded integer as representing all of the attributes. Convert this via the AttrBuilder class into an AttributeSet with the correct representation (an AttributeSetImpl that holds a list of Attribute objects). llvm-svn: 173750
* Convert the AttrBuilder into a list of Attributes instead of one Attribute ↵Bill Wendling2013-01-291-2/+15
| | | | | | object that holds all of its attributes. llvm-svn: 173742
* S'more small non-functional changes in comments and #includes.Bill Wendling2013-01-291-2/+5
| | | | llvm-svn: 173738
* Reorder some functions and add comments. No functionality change.Bill Wendling2013-01-291-331/+326
| | | | llvm-svn: 173733
* Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.Bill Wendling2013-01-281-18/+15
| | | | llvm-svn: 173725
* Remove the AttributeWithIndex class.Bill Wendling2013-01-281-78/+68
| | | | | | | 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
* Mid-air collision. reapply r173656.Bill Wendling2013-01-281-5/+5
| | | | llvm-svn: 173661
OpenPOWER on IntegriCloud