summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the "ForceSizeOpt" attribute.Nadav Rotem2012-10-221-0/+2
| | | | | | | | | | | | 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-151-7/+7
| | | | | | 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-081-20/+20
| | | | 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-011-0/+4
| | | | | | 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-051-4/+4
| | | | | | inteldialect. llvm-svn: 163231
* [ms-inline asm] Emit the (new) inline asm Non-Standard Dialect attribute.Chad Rosier2012-09-051-3/+6
| | | | llvm-svn: 163181
* [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. ThisChad Rosier2012-09-041-1/+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-171-8/+9
| | | | | | | | | | | | | | | | | | | | 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-101-0/+1
| | | | | | | | | | | | | | 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-231-4/+46
| | | | | | | | | | | | | | | 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
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-1/+1
| | | | llvm-svn: 149967
* [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
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-2/+1
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* eliminate the "string" form of ConstantArray::get, usingChris Lattner2012-01-311-1/+2
| | | | | | ConstantDataArray::getString instead. llvm-svn: 149365
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-5/+3
| | | | llvm-svn: 148578
* Extend Attributes to 64 bitsKostya Serebryany2012-01-201-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
* Add 'llvm_unreachable' to passify GCC's understanding of the constraintsChandler Carruth2012-01-101-0/+1
| | | | | | | | of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, and we should assume as much. llvm-svn: 147861
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-1/+0
| | | | llvm-svn: 147855
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-171-6/+9
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* Push StringRefs through the metadata interface.Benjamin Kramer2011-12-061-1/+1
| | | | llvm-svn: 145934
* Add support for vectors of pointers.Nadav Rotem2011-12-051-9/+26
| | | | llvm-svn: 145801
* remove asmparsing and documentation support for "volatile load", which was ↵Chris Lattner2011-11-271-26/+6
| | | | | | only produced by LLVM 2.9 and earlier. LLVM 3.0 and later prefers "load volatile". llvm-svn: 145172
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-271-2/+0
| | | | | | | I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? llvm-svn: 145169
* remove autoupgrade support for LLVM 2.9 exception stuff. Mainline supportsChris Lattner2011-11-271-3/+0
| | | | | | LLVM 3.0 and later. llvm-svn: 145165
* Backing out patch. Will refactor to remove the AsmParser dependency on Target.Lang Hames2011-10-181-6/+0
| | | | llvm-svn: 142323
* Re-applying the target data layout verification patch from r142288, plus ↵Lang Hames2011-10-171-0/+6
| | | | | | | | appropriate CMake dependencies. Thanks to Raphael Espindola for tracking down the CMake issues. llvm-svn: 142306
* 142288 broke the build:Rafael Espindola2011-10-171-6/+0
| | | | | | | | | | | | Linking CXX executable ../../bin/llvm-as ../../lib/libLLVMAsmParser.a(LLParser.cpp.o):/home/espindola/llvm/llvm/lib/AsmParser/LLParser.cpp:function llvm::LLParser::ParseTargetDefinition(): error: undefined reference to 'llvm::TargetData::parseSpecifier(llvm::StringRef, llvm::TargetData*)' clang-3: error: linker command failed with exit code 1 (use -v to see invocation) Revert "Validate target data layout strings." This reverts commit 599d2d4c25d3aee63a21d9c67a88cd43bd971b7e. llvm-svn: 142296
* Validate target data layout strings.Lang Hames2011-10-171-0/+6
| | | | | | Invalid strings in asm files will result in parse errors. Invalid string literals passed to TargetData constructors will result in an assertion. llvm-svn: 142288
* Add the returns_twice attribute to LLVM.Rafael Espindola2011-10-031-1/+1
| | | | llvm-svn: 141001
* Auto upgrade the old EH scheme to use the new one. This is on a trial basis. IfBill Wendling2011-08-271-0/+3
| | | | | | things to disasterously over night, this can be reverted. llvm-svn: 138702
* Remove unused variable.Duncan Sands2011-08-181-1/+0
| | | | llvm-svn: 137933
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-121-32/+67
| | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. llvm-svn: 137527
OpenPOWER on IntegriCloud