summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Reintroduce the InlineHint function attribute.Jakob Stoklund Olesen2010-02-061-0/+1
| | | | | | | | | | | | This time it's for real! I am going to hook this up in the frontends as well. The inliner has some experimental heuristics for dealing with the inline hint. When given a -respect-inlinehint option, functions marked with the inline keyword are given a threshold just above the default for -O3. We need some experiments to determine if that is the right thing to do. llvm-svn: 95466
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-1/+0
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Remove the InlineHint attribute. There are no current or plannedEric Christopher2010-01-151-1/+0
| | | | | | users. llvm-svn: 93558
* Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, ↵Victor Hernandez2010-01-111-107/+73
| | | | | | and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work llvm-svn: 93197
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-101-14/+15
| | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108
* fix PR5983, reject function bodies with no blocks per the grammar.Chris Lattner2010-01-091-0/+4
| | | | llvm-svn: 93067
* When parsing function-local metadata, create a function-local MDNodeVictor Hernandez2010-01-061-8/+12
| | | | llvm-svn: 92838
OpenPOWER on IntegriCloud