summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-141-1/+1
| | | | | | idiom. Change various clients to simplify their code. llvm-svn: 125487
* implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-071-44/+30
| | | | | | Factor some code better. llvm-svn: 125006
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-061-4/+4
| | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 llvm-svn: 124992
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-4/+4
| | | | llvm-svn: 124209
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-151-6/+0
| | | | llvm-svn: 123529
* Reject uses of unnamed_addr in declarations.Rafael Espindola2011-01-131-2/+12
| | | | llvm-svn: 123358
* First step in fixing PR8927:Rafael Espindola2011-01-081-5/+11
| | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. llvm-svn: 123063
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-071-1/+1
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
* Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-opCharles Davis2010-10-251-0/+1
| | | | | | | instruction at the beginning of each function that has the attribute, allowing the function to be easily hooked and/or patched. llvm-svn: 117264
* AlignLoc is never used for anything - zap it (gcc-4.6 warning).Duncan Sands2010-10-211-2/+1
| | | | llvm-svn: 117025
* Eliminate some calls to Value::getNameStr.Benjamin Kramer2010-10-161-3/+3
| | | | llvm-svn: 116670
* Pacify a noisy compiler, and sink this variable declaration closer to its uses.Nick Lewycky2010-09-301-1/+1
| | | | llvm-svn: 115206
* Silence compiler warning.Nick Lewycky2010-09-291-1/+1
| | | | llvm-svn: 115107
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-271-16/+15
| | | | llvm-svn: 114847
* Add ret instruction to PTX backendChe-Liang Chiou2010-09-251-0/+4
| | | | llvm-svn: 114788
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-281-62/+1
| | | | | | being actively maintained, improved, or extended. llvm-svn: 112356
* Add a comment explaining why this code doesn't just callDan Gohman2010-08-241-0/+4
| | | | | | ParseMetadataValue. llvm-svn: 111914
* Extend function-local metadata to be usable as attachments.Dan Gohman2010-08-241-19/+35
| | | | llvm-svn: 111895
* Give ParseInstructionMetadata access to the PerFunctionState object.Dan Gohman2010-08-241-3/+4
| | | | | | | This is in preparation for generalizing its parsing of function-local values. llvm-svn: 111893
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-201-1/+8
| | | | | | | | | | | It's similar to "linker_private_weak", but it's known that the address of the object is not taken. For instance, functions that had an inline definition, but the compiler decided not to inline it. Note, unlike linker_private and linker_private_weak, linker_private_weak_def_auto may have only default visibility. The symbols are removed by the linker from the final linked image (executable or dynamic library). llvm-svn: 111684
* Introduce a new temporary MDNode concept. Temporary MDNodes areDan Gohman2010-08-201-6/+4
| | | | | | | | not part of the IR, are not uniqued, and may be safely RAUW'd. This replaces a variety of alternate mechanisms for achieving the same effect. llvm-svn: 111681
* Move MaximumAlignment to be a member of the Value class.Dan Gohman2010-07-301-1/+1
| | | | llvm-svn: 109891
* Define a maximum supported alignment value for load, store, andDan Gohman2010-07-281-0/+3
| | | | | | | | | alloca instructions (constrained by their internal encoding), and add error checking for it. Fix an instcombine bug which generated huge alignment values (null is infinitely aligned). This fixes undefined behavior noticed by John Regehr. llvm-svn: 109643
* Revert r109361; it's impossible to write a call with an argument with anEli Friedman2010-07-241-6/+2
| | | | | | invalid type. llvm-svn: 109365
* Minor simplification.Eli Friedman2010-07-241-1/+1
| | | | llvm-svn: 109362
* Make the ll parser check that arguments have valid types.Eli Friedman2010-07-241-1/+5
| | | | llvm-svn: 109361
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-3/+2
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Disallow null as a named metadata operand.Dan Gohman2010-07-211-6/+0
| | | | | | | | | | | Make MDNode::destroy private. Fix the one thing that used MDNode::destroy, outside of MDNode itself. One should never delete or destroy an MDNode explicitly. MDNodes implicitly go away when there are no references to them (implementation details aside). llvm-svn: 109028
* Factor out metadata parsing into a separate function.Dan Gohman2010-07-141-27/+38
| | | | llvm-svn: 108343
* Add support for empty named metadata too. This isn't particularlyDan Gohman2010-07-131-12/+13
| | | | | | useful, but it is nice for consistency. llvm-svn: 108262
* Add support for empty metadata nodes: !{}.Dan Gohman2010-07-131-0/+4
| | | | llvm-svn: 108259
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-14/+22
| | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". Currently only supported on Darwin platforms. llvm-svn: 107433
* Revert r107205 and r107207.Bill Wendling2010-06-291-6/+1
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-1/+6
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* Eliminate the restriction that the array size in an alloca must be i32.Dan Gohman2010-05-281-2/+4
| | | | | | This will help reduce the amount of casting required on 64-bit targets. llvm-svn: 104911
* Add support for thiscall calling convention.Anton Korobeynikov2010-05-161-0/+2
| | | | | | Patch by Charles Davis and Steven Watanabe! llvm-svn: 103902
* Remove the API compatibility layer which converted add, sub, and mulDan Gohman2010-05-031-7/+23
| | | | | | | | to fadd, fsub, and fmul, when used with a floating-point type. LLVM has supported the new instructions since 2.6, so it's time to get on board. llvm-svn: 102971
* reject invalid comma stuff with a message. We reject the case inChris Lattner2010-04-231-4/+4
| | | | | | | | | | | | | | | | PR6888 with: $ llvm-as t.ll llvm-as: t.ll:2:29: error: expected metadata or 'align' store <3 x i32> %x, i32 1, i32 1>, <3 x i32>* %p ^ instead of: $ llvm-as t.ll llvm-as: llvm-svn: 102154
* reapply 'reject forward references to functions whose type don't match'Chris Lattner2010-04-201-0/+4
| | | | | | now that the testsuite has been updated. llvm-svn: 101866
* Revert "reject forward references to functions whose type don't match", ↵Daniel Dunbar2010-04-171-4/+0
| | | | | | because DJG told me to! llvm-svn: 101675
* reject forward references to functions whose type don't matchChris Lattner2010-04-171-0/+4
| | | | | | up with the definition (and fix a broken testcase). PR6491. llvm-svn: 101670
* turn an assert into a proper check, fixing crash on invalid here:Chris Lattner2010-04-101-2/+1
| | | | | | | | | | | $ llvm-as t.ll llvm-as: t.ll:1:6: error: expected 'type' after '=' %0 = = type { i32, float, float, double } ^ PR6810. llvm-svn: 100934
* fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXXChris Lattner2010-04-071-2/+4
| | | | | | | | We would return the error without inserting the new instruction into the program, so it wouldn't get deallocated, and an abort would trigger when the module was deleted. llvm-svn: 100602
* rewrite handling of forward ref'd instruction metadata Chris Lattner2010-04-011-9/+51
| | | | | | | | to used deferred resolution instead of creating a temporary node + rauw. There is no reason to create the temporary mdnode, then do rauw, then destroy it. llvm-svn: 100086
* eliminate a temporary smallvectorChris Lattner2010-04-011-11/+4
| | | | llvm-svn: 100082
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-161-7/+7
| | | | | | methods to try to have the type predicates be more logically positioned. llvm-svn: 96349
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-17/+17
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-18/+18
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-121-9/+71
| | | | llvm-svn: 96011
* Add a new function attribute, 'alignstack'. It will indicate (when the backendsCharles Davis2010-02-121-0/+28
| | | | | | | implement support for it) that the stack should be forcibly realigned in the prologue (and the process reversed in the epilogue). llvm-svn: 95945
OpenPOWER on IntegriCloud