summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAge
* Remove the InlineHint attribute. There are no current or plannedEric Christopher2010-01-15
| | | | | | | users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93558 91177308-0d34-0410-b5e6-96231b3b80d8
* Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, ↵Victor Hernandez2010-01-11
| | | | | | and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93197 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-10
| | | | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93108 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5983, reject function bodies with no blocks per the grammar.Chris Lattner2010-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93067 91177308-0d34-0410-b5e6-96231b3b80d8
* When parsing function-local metadata, create a function-local MDNodeVictor Hernandez2010-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92838 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-add parsing of function-local metadata; this time with testcase.Victor Hernandez2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92793 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92783 91177308-0d34-0410-b5e6-96231b3b80d8
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92761 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-05
| | | | | | dereference the type pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some fixme'sChris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92304 91177308-0d34-0410-b5e6-96231b3b80d8
* now that instruction metadata is only parsed in one place, eliminate theChris Lattner2009-12-30
| | | | | | | | parser-global MDsOnInst vector and make ParseInstructionMetadata return its result by-ref through an argument like the entire rest of the parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92302 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement ParseOptionalInfo as ParseOptionalCommaAlign, correctlyChris Lattner2009-12-30
| | | | | | | handle the comma case for metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92301 91177308-0d34-0410-b5e6-96231b3b80d8
* rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,Chris Lattner2009-12-30
| | | | | | | | and make it non-optional. This fixes the bug where we'd accept and ignore a spurious comma after some instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92300 91177308-0d34-0410-b5e6-96231b3b80d8
* convert 4 more instructions over.Chris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92299 91177308-0d34-0410-b5e6-96231b3b80d8
* add facilities to start factoring instruction metadata parsingChris Lattner2009-12-30
| | | | | | | out of each opcode's handler. Change ret over so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92298 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement insertvalue/extractvalue metadata handling to not blindly Chris Lattner2009-12-30
| | | | | | | accept invalid input. Actually add a testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92297 91177308-0d34-0410-b5e6-96231b3b80d8
* remove two bogus calls that accepted metadata in the middle of ↵Chris Lattner2009-12-30
| | | | | | | | | insert/extract value *constant exprs*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92296 91177308-0d34-0410-b5e6-96231b3b80d8
* rename NamedOrCustomMD -> MetadataVar to follow conventions of all the rest ↵Chris Lattner2009-12-30
| | | | | | of the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92295 91177308-0d34-0410-b5e6-96231b3b80d8
* rename lltok::Metadata -> lltok::exclaim. We name tokens Chris Lattner2009-12-30
| | | | | | | after their syntactic form, not their semantic form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92294 91177308-0d34-0410-b5e6-96231b3b80d8
* rename MetadataCache -> NumberedMetadata to follow the conventionChris Lattner2009-12-30
| | | | | | | | used by other things. Convert it to a vector since it is a dense numbering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92293 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite ParseMDNodeVector to follow the normal patter used in the .ll parser.Chris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92292 91177308-0d34-0410-b5e6-96231b3b80d8
* rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as ↵Chris Lattner2009-12-30
| | | | | | you'd expect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92291 91177308-0d34-0410-b5e6-96231b3b80d8
* fix parsing of mdstring values.Chris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92290 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the code added in r90497. It has several major issues and no tests.Chris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92288 91177308-0d34-0410-b5e6-96231b3b80d8
* split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.Chris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92287 91177308-0d34-0410-b5e6-96231b3b80d8
* factor code even more.Chris Lattner2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92280 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some code and unbreak the build by not consuming anChris Lattner2009-12-29
| | | | | | | extra token. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92279 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a really wrong parenthesis.Benjamin Kramer2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92277 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up some really strange code.Chris Lattner2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92275 91177308-0d34-0410-b5e6-96231b3b80d8
* change ParseMDString and ParseMDNode to take arguments of the right type.Chris Lattner2009-12-29
| | | | | | | | This exposed a raft of other problems, which I'll deal with in subsequent patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92273 91177308-0d34-0410-b5e6-96231b3b80d8
* switch to TrackingVH instead of WeakVH, since these can neverChris Lattner2009-12-29
| | | | | | | | be RAUW'd and go to null. This also gets us some sorely lacking type safety. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92272 91177308-0d34-0410-b5e6-96231b3b80d8
* Each instruction is allowed to have *multiple* different Chris Lattner2009-12-29
| | | | | | | | metadata objects on them. Though the entire compiler supports this, the asmparser didn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92270 91177308-0d34-0410-b5e6-96231b3b80d8
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-29
| | | | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-28
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92235 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-28
| | | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92225 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2009-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92088 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MSP430 interrupt calling conv. No functionality change yet.Anton Korobeynikov2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90738 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ParseInlineMetadata() which can parses metadata that refers to an ↵Victor Hernandez2009-12-03
| | | | | | instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90497 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a hack for PR5601, a crash on obsolete syntax that we plan toChris Lattner2009-11-26
| | | | | | | remove in LLVM 3.0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89973 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MSVC warning ( | with bool and unsigned int).Daniel Dunbar2009-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86417 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.Victor Hernandez2009-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86311 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r86077 because it caused crashes in 179.art and 175.vpr on ARMVictor Hernandez2009-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86213 91177308-0d34-0410-b5e6-96231b3b80d8
* Use WeakVH while storing metadata in containers.Devang Patel2009-11-05
| | | | | | | This fixes PR5393. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86091 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez2009-11-05
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse debug info attached with insertvalue and extractvalue instructions.Devang Patel2009-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85921 91177308-0d34-0410-b5e6-96231b3b80d8
* typoChris Lattner2009-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85812 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-01
| | | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
* Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner2009-10-31
| | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678 91177308-0d34-0410-b5e6-96231b3b80d8
* full asmparser support for blockaddress. We can now do:Chris Lattner2009-10-28
| | | | | | | | | | | $ 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85368 91177308-0d34-0410-b5e6-96231b3b80d8