summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-192-49/+49
| | | | | | single attribute in the future. llvm-svn: 170502
* Reorganize FastMathFlags to be a wrapper around unsigned, and streamline ↵Michael Ilseman2012-12-091-5/+5
| | | | | | some interfaces. llvm-svn: 169712
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-9/+9
| | | | | | in the near future. llvm-svn: 169651
* Split up the ParseOptionalAttrs method into three different methods for eachBill Wendling2012-12-042-81/+122
| | | | | | | class of attributes. This makes it much easier to check for errors and to reuse the code. llvm-svn: 169336
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-042-4/+4
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-033-7/+7
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Add back support for reading and parsing 'deplibs'.Bill Wendling2012-11-284-0/+26
| | | | | | | This is for backwards compatibility for pre-3.x bc files. The code reads the code, but does nothing with it. llvm-svn: 168779
* Remove the dependent libraries feature.Bill Wendling2012-11-274-29/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Fast-math flags for LLVM IR parsing and printingMichael Ilseman2012-11-274-4/+38
| | | | | | Added in the ability to read LLVM IR text that contains fast-math flags as a sequence of capital letters separated by spaces in any order. Added in the printing of the fast-math flags in a canonical order, and don't print the other flags when 'fast' is specified, as 'fast' implies all the others. llvm-svn: 168645
* Make the AttrListPtr object a part of the LLVMContext.Bill Wendling2012-11-201-3/+3
| | | | | | | | | When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. llvm-svn: 168354
* Preserve address space of forward-referenced global variables in the LL parserJustin Holewinski2012-11-161-1/+3
| | | | | | | | | | | | Before, the parser would assert on the following code: @a2 = global i8 addrspace(1)* @a @a = addrspace(1) global i8 0 because the type of @a was "i8*" instead of "i8 addrspace(1)*" when parsing the initializer for @a2. llvm-svn: 168197
* Fix typo in a comment.Craig Topper2012-11-161-1/+1
| | | | llvm-svn: 168138
* Remove trailing whitespaceMichael Ilseman2012-11-152-77/+77
| | | | llvm-svn: 168103
* Relax the restrictions on vector of pointer types, and vector getelementptr.Duncan Sands2012-11-131-5/+1
| | | | | | | | | | | | | | | Previously in a vector of pointers, the pointer couldn't be any pointer type, it had to be a pointer to an integer or floating point type. This is a hassle for dragonegg because the GCC vectorizer happily produces vectors of pointers where the pointer is a pointer to a struct or whatever. Vector getelementptr was restricted to just one index, but now that vectors of pointers can have any pointer type it is more natural to allow arbitrary vector getelementptrs. There is however the issue of struct GEPs, where if each lane chose different struct fields then from that point on each lane will be working down into unrelated types. This seems like too much pain for too little gain, so when you have a vector struct index all the elements are required to be the same. llvm-svn: 167828
* Change ForceSizeOpt attribute into MinSize attributeQuentin Colombet2012-10-303-4/+4
| | | | llvm-svn: 167020
* Special calling conventions for Intel OpenCL built-in library.Elena Demikhovsky2012-10-243-0/+4
| | | | llvm-svn: 166566
* Add the "ForceSizeOpt" attribute.Nadav Rotem2012-10-223-0/+4
| | | | | | | | | | | | Patch by Quentin Colombet <qcolombet@apple.com> Original description: """ The attached patch is the first step to have a better control on Oz related optimizations. The Oz optimization level focuses on code size, thus I propose to add an attribute called ForceSizeOpt. """ llvm-svn: 166422
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-152-8/+8
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165960
* Add an enum for the return and function indexes into the AttrListPtr object. ↵Bill Wendling2012-10-151-18/+24
| | | | | | This gets rid of some magic numbers. llvm-svn: 165924
* Attributes RewriteBill Wendling2012-10-151-9/+26
| | | | | | | | | | Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. llvm-svn: 165917
* Remove operator cast method in favor of querying with the correct method.Bill Wendling2012-10-141-1/+1
| | | | llvm-svn: 165899
* Don't crash if a .ll file contains a forward-reference that looks like a globalNick Lewycky2012-10-111-0/+3
| | | | | | | | | value but later turns out to be a function. Unfortunately, we can't fold tests into a single file because we only get one error out of llvm-as. llvm-svn: 165680
* Use the enum value of the attributes when removing them from the attributes ↵Bill Wendling2012-10-091-1/+1
| | | | | | builder. llvm-svn: 165495
* Use the enum value of the attributes when adding them to the attributes builder.Bill Wendling2012-10-091-26/+26
| | | | llvm-svn: 165494
* Create enums for the different attributes.Bill Wendling2012-10-091-1/+2
| | | | | | | We use the enums to query whether an Attributes object has that attribute. The opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165488
* Convert to using the Attributes::Builder interface.Bill Wendling2012-10-091-1/+1
| | | | llvm-svn: 165465
* Use the Attributes::Builder to build the attributes in the parser.Bill Wendling2012-10-082-21/+21
| | | | llvm-svn: 165458
* Convert the LLVM parser over to using the new Attributes::Builder to build itsBill Wendling2012-10-081-33/+33
| | | | | | attributes objects. llvm-svn: 165436
* Add in support for SPIR to LLVM core. This adds a new target and two new ↵Micah Villmow2012-10-013-0/+7
| | | | | | calling conventions. llvm-svn: 164948
* Don't use bit-wise operations to query for inclusion/exclusion of attributes.Bill Wendling2012-09-281-14/+49
| | | | llvm-svn: 164860
* Encapsulate the "construct*AlignmentFromInt" functions.Bill Wendling2012-09-211-2/+2
| | | | llvm-svn: 164373
* Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling2012-09-211-1/+1
| | | | | | Attributes class. Now with fix. llvm-svn: 164370
* Revert r164308 to fix buildbots.Bill Wendling2012-09-201-1/+1
| | | | llvm-svn: 164309
* Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling2012-09-201-1/+1
| | | | | | Attributes class. llvm-svn: 164308
* Convert some attribute existence queries over to use the predicate methods.Bill Wendling2012-09-191-9/+9
| | | | llvm-svn: 164268
* [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect toChad Rosier2012-09-053-6/+6
| | | | | | inteldialect. llvm-svn: 163231
* [ms-inline asm] Add the nsdialect keyword to the lexer.Chad Rosier2012-09-051-0/+1
| | | | llvm-svn: 163184
* [ms-inline asm] Emit the (new) inline asm Non-Standard Dialect attribute.Chad Rosier2012-09-052-3/+7
| | | | llvm-svn: 163181
* [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. ThisChad Rosier2012-09-043-3/+0
| | | | | | | implementation does not co-exist well with how the sideeffect and alignstack attributes are handled. The reverts r161641. llvm-svn: 163174
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-173-11/+15
| | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> llvm-svn: 162114
* [ms-inline asm] Add a new Inline Asm Non-Standard Dialect attribute.Chad Rosier2012-08-103-0/+3
| | | | | | | | | | | | | | This new attribute is intended to be used by the backend to determine how the inline asm string should be parsed/printed. This patch adds the ia_nsdialect attribute and also adds a test case to ensure the IR is correctly parsed, but there is no functional change at this time. The standard dialect is assumed to be AT&T. Therefore, this attribute should only be added to MS-style inline assembly statements, which use the Intel dialect. If we ever support more dialects we'll need to add additional state to the attribute. llvm-svn: 161641
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-234-5/+54
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner2012-05-281-3/+3
| | | | llvm-svn: 157556
* Silence Clang's -Wlogical-op-parentheses warning.David Blaikie2012-05-241-1/+1
| | | | | | I'm not sure it's really worth expressing this as a range rather than 3 specific equalities, but it doesn't seem fundamentally wrong either. llvm-svn: 157398
* Add half support to LLVM (for OpenCL)Tobias Grosser2012-05-241-1/+5
| | | | | | | | | | Submitted by: Anton Lokhmotov <Anton.Lokhmotov@arm.com> Approved by: o Anton Korobeynikov o Micah Villmow o David Neto llvm-svn: 157393
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-1/+1
| | | | llvm-svn: 149967
* 'unwind' is a keyword, not an instruction.Bill Wendling2012-02-062-2/+3
| | | | llvm-svn: 149898
* [unwind removal] Remove the 'unwind' instruction parsing bits.Bill Wendling2012-02-061-1/+0
| | | | llvm-svn: 149897
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-051-1/+2
| | | | | | | | | but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800
* TypoPete Cooper2012-02-011-1/+1
| | | | llvm-svn: 149562
OpenPOWER on IntegriCloud