summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-add parsing of function-local metadata; this time with testcase.Victor Hernandez2010-01-051-10/+18
| | | | llvm-svn: 92793
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-051-0/+6
| | | | llvm-svn: 92783
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92771
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-051-2/+1
| | | | llvm-svn: 92761
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-6/+3
| | | | | | dereference the type pointer. llvm-svn: 92726
* remove some fixme'sChris Lattner2009-12-301-2/+0
| | | | llvm-svn: 92304
* now that instruction metadata is only parsed in one place, eliminate theChris Lattner2009-12-301-8/+10
| | | | | | | 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, correctlyChris Lattner2009-12-301-33/+42
| | | | | | handle the comma case for metadata. llvm-svn: 92301
* rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,Chris Lattner2009-12-301-19/+10
| | | | | | | 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 Lattner2009-12-301-27/+20
| | | | llvm-svn: 92299
* add facilities to start factoring instruction metadata parsingChris Lattner2009-12-301-10/+27
| | | | | | out of each opcode's handler. Change ret over so far. llvm-svn: 92298
* reimplement insertvalue/extractvalue metadata handling to not blindly Chris Lattner2009-12-301-9/+27
| | | | | | accept invalid input. Actually add a testcase. llvm-svn: 92297
* remove two bogus calls that accepted metadata in the middle of ↵Chris Lattner2009-12-301-5/+0
| | | | | | | | insert/extract value *constant exprs*. llvm-svn: 92296
* rename NamedOrCustomMD -> MetadataVar to follow conventions of all the rest ↵Chris Lattner2009-12-301-18/+20
| | | | | | of the code. llvm-svn: 92295
* rename lltok::Metadata -> lltok::exclaim. We name tokens Chris Lattner2009-12-301-11/+9
| | | | | | after their syntactic form, not their semantic form. llvm-svn: 92294
* rename MetadataCache -> NumberedMetadata to follow the conventionChris Lattner2009-12-301-15/+17
| | | | | | | 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 Lattner2009-12-301-31/+38
| | | | llvm-svn: 92292
* rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as ↵Chris Lattner2009-12-301-5/+5
| | | | | | you'd expect. llvm-svn: 92291
* fix parsing of mdstring values.Chris Lattner2009-12-301-7/+4
| | | | llvm-svn: 92290
* remove the code added in r90497. It has several major issues and no tests.Chris Lattner2009-12-301-41/+2
| | | | llvm-svn: 92288
* split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.Chris Lattner2009-12-301-22/+32
| | | | llvm-svn: 92287
* factor code even more.Chris Lattner2009-12-291-26/+14
| | | | llvm-svn: 92280
* simplify some code and unbreak the build by not consuming anChris Lattner2009-12-291-10/+4
| | | | | | extra token. llvm-svn: 92279
* remove a really wrong parenthesis.Benjamin Kramer2009-12-291-1/+1
| | | | llvm-svn: 92277
* clean up some really strange code.Chris Lattner2009-12-291-8/+8
| | | | llvm-svn: 92275
* change ParseMDString and ParseMDNode to take arguments of the right type.Chris Lattner2009-12-291-16/+25
| | | | | | | This exposed a raft of other problems, which I'll deal with in subsequent patches. llvm-svn: 92273
* switch to TrackingVH instead of WeakVH, since these can neverChris Lattner2009-12-291-10/+10
| | | | | | | be RAUW'd and go to null. This also gets us some sorely lacking type safety. llvm-svn: 92272
* Each instruction is allowed to have *multiple* different Chris Lattner2009-12-291-16/+25
| | | | | | | metadata objects on them. Though the entire compiler supports this, the asmparser didn't. llvm-svn: 92270
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-4/+1
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-4/+1
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* Change errs() to dbgs().David Greene2009-12-231-3/+3
| | | | llvm-svn: 92088
* Add MSP430 interrupt calling conv. No functionality change yet.Anton Korobeynikov2009-12-071-0/+2
| | | | llvm-svn: 90738
* Add ParseInlineMetadata() which can parses metadata that refers to an ↵Victor Hernandez2009-12-031-7/+46
| | | | | | instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata llvm-svn: 90497
* Add a hack for PR5601, a crash on obsolete syntax that we plan toChris Lattner2009-11-261-0/+4
| | | | | | remove in LLVM 3.0 llvm-svn: 89973
* Fix MSVC warning ( | with bool and unsigned int).Daniel Dunbar2009-11-071-1/+1
| | | | llvm-svn: 86417
* Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.Victor Hernandez2009-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Here is the original commit message: This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments. Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. llvm-svn: 86311
* Revert r86077 because it caused crashes in 179.art and 175.vpr on ARMVictor Hernandez2009-11-061-3/+1
| | | | llvm-svn: 86213
* Use WeakVH while storing metadata in containers.Devang Patel2009-11-051-5/+5
| | | | | | This fixes PR5393. llvm-svn: 86091
* Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez2009-11-051-1/+3
| | | | | | | | | | | | | | | | | | MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. llvm-svn: 86077
* Parse debug info attached with insertvalue and extractvalue instructions.Devang Patel2009-11-031-0/+11
| | | | llvm-svn: 85921
* typoChris Lattner2009-11-021-1/+1
| | | | llvm-svn: 85812
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-11/+5
| | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
* Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner2009-10-311-5/+11
| | | | | | | | | | | | block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). llvm-svn: 85678
* full asmparser support for blockaddress. We can now do:Chris Lattner2009-10-281-35/+119
| | | | | | | | | $ llvm-as foo.ll -d -disable-output which reads and prints the .ll file. BC encoding is the next project. Testcase will go in once that works. llvm-svn: 85368
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-281-8/+8
| | | | llvm-svn: 85351
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-271-32/+72
| | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
* fix PR5295 where the .ll parser didn't reject a function after a globalChris Lattner2009-10-251-5/+8
| | | | | | | or global after a function with conflicting names. Update some testcases that were accidentally depending on this behavior. llvm-svn: 85081
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-3/+4
| | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
* Minor code cleanup.Victor Hernandez2009-10-231-3/+2
| | | | llvm-svn: 84919
OpenPOWER on IntegriCloud