summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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
OpenPOWER on IntegriCloud