Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXX | Chris Lattner | 2010-04-07 | 2 | -3/+5 |
| | | | | | | | | 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 | ||||
* | enhance SMDiagnostic to also maintain a pointer to the SourceMgr. | Chris Lattner | 2010-04-06 | 1 | -2/+2 |
| | | | | | | | Add a simplified constructor for clients that don't have locations like "file not found" errors. llvm-svn: 100538 | ||||
* | Give llvm::SourceMgr the ability to have a client-specified | Chris Lattner | 2010-04-06 | 1 | -1/+1 |
| | | | | | | diagnostic handler. llvm-svn: 100503 | ||||
* | stringref-ize the MemoryBuffer::get apis. This requires | Chris Lattner | 2010-04-05 | 1 | -1/+1 |
| | | | | | | a co-committed clang patch. llvm-svn: 100485 | ||||
* | include header. | Chris Lattner | 2010-04-01 | 1 | -0/+1 |
| | | | | llvm-svn: 100087 | ||||
* | rewrite handling of forward ref'd instruction metadata | Chris Lattner | 2010-04-01 | 2 | -9/+60 |
| | | | | | | | | 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 | ||||
* | no really, we don't need to copy strings around in the accessor. | Chris Lattner | 2010-04-01 | 1 | -1/+1 |
| | | | | llvm-svn: 100083 | ||||
* | eliminate a temporary smallvector | Chris Lattner | 2010-04-01 | 2 | -13/+5 |
| | | | | llvm-svn: 100082 | ||||
* | Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some | Duncan Sands | 2010-02-16 | 1 | -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 Sands | 2010-02-16 | 1 | -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 and | Duncan Sands | 2010-02-15 | 1 | -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 Lattner | 2010-02-12 | 4 | -9/+77 |
| | | | | llvm-svn: 96011 | ||||
* | Add a new function attribute, 'alignstack'. It will indicate (when the backends | Charles Davis | 2010-02-12 | 2 | -0/+29 |
| | | | | | | | 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 Olesen | 2010-02-06 | 3 | -0/+3 |
| | | | | | | | | | | | | 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 between | Jeffrey Yasskin | 2010-01-27 | 1 | -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 | ||||
* | make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. | Chris Lattner | 2010-01-24 | 1 | -1/+0 |
| | | | | llvm-svn: 94378 | ||||
* | Remove MetadataBase class because it is not adding significant value. | Devang Patel | 2010-01-22 | 1 | -1/+0 |
| | | | | llvm-svn: 94243 | ||||
* | Stop building RTTI information for *most* llvm libraries. Notable | Chris Lattner | 2010-01-22 | 1 | -0/+1 |
| | | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164 | ||||
* | Make the parser include the lower level error message in its own error | Dan Gohman | 2010-01-21 | 1 | -1/+2 |
| | | | | | | message, to be more informative. llvm-svn: 94072 | ||||
* | Remove the InlineHint attribute. There are no current or planned | Eric Christopher | 2010-01-15 | 3 | -3/+0 |
| | | | | | | users. llvm-svn: 93558 | ||||
* | Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, ↵ | Victor Hernandez | 2010-01-11 | 2 | -111/+74 |
| | | | | | | 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 Hernandez | 2010-01-10 | 2 | -18/+17 |
| | | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108 | ||||
* | fix PR5983, reject function bodies with no blocks per the grammar. | Chris Lattner | 2010-01-09 | 1 | -0/+4 |
| | | | | llvm-svn: 93067 | ||||
* | When parsing function-local metadata, create a function-local MDNode | Victor Hernandez | 2010-01-06 | 2 | -10/+16 |
| | | | | llvm-svn: 92838 | ||||
* | Re-add parsing of function-local metadata; this time with testcase. | Victor Hernandez | 2010-01-05 | 2 | -21/+28 |
| | | | | llvm-svn: 92793 | ||||
* | Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null} | Devang Patel | 2010-01-05 | 1 | -0/+6 |
| | | | | llvm-svn: 92783 | ||||
* | Move remaining stuff to the isInteger predicate. | Benjamin Kramer | 2010-01-05 | 1 | -1/+1 |
| | | | | llvm-svn: 92771 | ||||
* | NamedMDNode is a collection MDNodes. | Devang Patel | 2010-01-05 | 1 | -2/+1 |
| | | | | llvm-svn: 92761 | ||||
* | Avoid going through the LLVMContext for type equality where it's safe to ↵ | Benjamin Kramer | 2010-01-05 | 1 | -6/+3 |
| | | | | | | dereference the type pointer. llvm-svn: 92726 | ||||
* | remove some fixme's | Chris Lattner | 2009-12-30 | 1 | -2/+0 |
| | | | | llvm-svn: 92304 | ||||
* | now that instruction metadata is only parsed in one place, eliminate the | Chris Lattner | 2009-12-30 | 2 | -10/+12 |
| | | | | | | | parser-global MDsOnInst vector and make ParseInstructionMetadata return its result by-ref through an argument like the entire rest of the parser. llvm-svn: 92302 | ||||
* | reimplement ParseOptionalInfo as ParseOptionalCommaAlign, correctly | Chris Lattner | 2009-12-30 | 2 | -37/+46 |
| | | | | | | handle the comma case for metadata. llvm-svn: 92301 | ||||
* | rename ParseOptionalCustomMetadata -> ParseInstructionMetadata, | Chris Lattner | 2009-12-30 | 2 | -20/+11 |
| | | | | | | | and make it non-optional. This fixes the bug where we'd accept and ignore a spurious comma after some instructions. llvm-svn: 92300 | ||||
* | convert 4 more instructions over. | Chris Lattner | 2009-12-30 | 2 | -31/+24 |
| | | | | llvm-svn: 92299 | ||||
* | add facilities to start factoring instruction metadata parsing | Chris Lattner | 2009-12-30 | 2 | -14/+33 |
| | | | | | | out of each opcode's handler. Change ret over so far. llvm-svn: 92298 | ||||
* | reimplement insertvalue/extractvalue metadata handling to not blindly | Chris Lattner | 2009-12-30 | 2 | -10/+35 |
| | | | | | | accept invalid input. Actually add a testcase. llvm-svn: 92297 | ||||
* | remove two bogus calls that accepted metadata in the middle of ↵ | Chris Lattner | 2009-12-30 | 1 | -5/+0 |
| | | | | | | | | insert/extract value *constant exprs*. llvm-svn: 92296 | ||||
* | rename NamedOrCustomMD -> MetadataVar to follow conventions of all the rest ↵ | Chris Lattner | 2009-12-30 | 3 | -22/+24 |
| | | | | | | of the code. llvm-svn: 92295 | ||||
* | rename lltok::Metadata -> lltok::exclaim. We name tokens | Chris Lattner | 2009-12-30 | 4 | -19/+15 |
| | | | | | | after their syntactic form, not their semantic form. llvm-svn: 92294 | ||||
* | rename MetadataCache -> NumberedMetadata to follow the convention | Chris Lattner | 2009-12-30 | 2 | -17/+18 |
| | | | | | | | used by other things. Convert it to a vector since it is a dense numbering. llvm-svn: 92293 | ||||
* | rewrite ParseMDNodeVector to follow the normal patter used in the .ll parser. | Chris Lattner | 2009-12-30 | 2 | -31/+40 |
| | | | | llvm-svn: 92292 | ||||
* | rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as ↵ | Chris Lattner | 2009-12-30 | 2 | -6/+6 |
| | | | | | | you'd expect. llvm-svn: 92291 | ||||
* | fix parsing of mdstring values. | Chris Lattner | 2009-12-30 | 1 | -7/+4 |
| | | | | llvm-svn: 92290 | ||||
* | remove the code added in r90497. It has several major issues and no tests. | Chris Lattner | 2009-12-30 | 2 | -43/+2 |
| | | | | llvm-svn: 92288 | ||||
* | split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting. | Chris Lattner | 2009-12-30 | 2 | -24/+36 |
| | | | | llvm-svn: 92287 | ||||
* | factor code even more. | Chris Lattner | 2009-12-29 | 1 | -26/+14 |
| | | | | llvm-svn: 92280 | ||||
* | simplify some code and unbreak the build by not consuming an | Chris Lattner | 2009-12-29 | 1 | -10/+4 |
| | | | | | | extra token. llvm-svn: 92279 | ||||
* | remove a really wrong parenthesis. | Benjamin Kramer | 2009-12-29 | 1 | -1/+1 |
| | | | | llvm-svn: 92277 | ||||
* | clean up some really strange code. | Chris Lattner | 2009-12-29 | 1 | -8/+8 |
| | | | | llvm-svn: 92275 | ||||
* | change ParseMDString and ParseMDNode to take arguments of the right type. | Chris Lattner | 2009-12-29 | 2 | -18/+27 |
| | | | | | | | This exposed a raft of other problems, which I'll deal with in subsequent patches. llvm-svn: 92273 |