summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
...
* s/NextValueNo/NextMDValueNo while processing metadata.Devang Patel2010-01-111-5/+4
| | | | llvm-svn: 93165
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-102-2/+10
| | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-091-13/+14
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* clean up this code, add a fixme.Chris Lattner2010-01-091-7/+7
| | | | llvm-svn: 93042
* NamedMDNode is never used so there is no need to enumerate it here.Devang Patel2010-01-091-1/+1
| | | | llvm-svn: 93039
* NamedMDNode element is either null or MDNode. Otherwise this is a malformed ↵Devang Patel2010-01-091-1/+3
| | | | | | NamedMDNode record. llvm-svn: 93037
* Derive NamedMDNode from Value.Devang Patel2010-01-092-10/+24
| | | | llvm-svn: 93032
* Use separate namespace for named metadata.Devang Patel2010-01-073-6/+16
| | | | llvm-svn: 92931
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-053-5/+10
| | | | llvm-svn: 92783
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-051-3/+3
| | | | llvm-svn: 92761
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-052-3/+3
| | | | | | dereference the type pointer. llvm-svn: 92726
* Remove derelict serialization code. Ted Kremenek2009-12-318-681/+1
| | | | llvm-svn: 92374
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-312-14/+14
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* tidyChris Lattner2009-12-311-3/+4
| | | | llvm-svn: 92320
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-293-7/+3
| | | | | | | | 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-283-33/+23
| | | | | | | | | | | | | | | | | | | | | | 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-11/+4
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* rename getHandlerNames to getMDKindNames, simplify its interfaceChris Lattner2009-12-281-21/+16
| | | | | | and simplify all the clients that use it. llvm-svn: 92224
* change the strange MetadataContext::getMDs function to expose lessChris Lattner2009-12-282-2/+2
| | | | | | irrelevant internal implementation details to clients. llvm-svn: 92210
* eliminate the elem_* iterator stuff from NamedMDNode.Chris Lattner2009-12-281-5/+2
| | | | llvm-svn: 92208
* Change errs() to dbgs().David Greene2009-12-241-1/+1
| | | | llvm-svn: 92092
* Change errs() to dbgs().David Greene2009-12-231-3/+3
| | | | llvm-svn: 92091
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-1/+1
| | | | | | | | isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91421
* 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
* 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
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-013-10/+6
| | | | | | | 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-313-6/+10
| | | | | | | | | | | | 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
* add bitcode reader support for blockaddress. We can now fullyChris Lattner2009-10-282-2/+45
| | | | | | | | | | round trip blockaddress through .ll and .bc files, so add a testcase. There are still a bunch of places in the optimizer and other places that need to be updated to work with these constructs, but at least the basics are in now. llvm-svn: 85377
* bitcode writer support for blockaddress.Chris Lattner2009-10-283-8/+52
| | | | llvm-svn: 85376
* Previously, all operands to Constant were themselves constant.Chris Lattner2009-10-281-3/+4
| | | | | | | | | In the new world order, BlockAddress can have a BasicBlock operand. This doesn't permute much, because if you have a ConstantExpr (or anything more specific than Constant) we still know the operand has to be a Constant. llvm-svn: 85375
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-282-7/+7
| | | | llvm-svn: 85351
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-272-3/+31
| | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-272-0/+2
| | | | llvm-svn: 85254
* Remove FreeInst.Victor Hernandez2009-10-261-5/+0
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Suppress -Asserts warning.Daniel Dunbar2009-10-251-0/+2
| | | | llvm-svn: 85078
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-1/+2
| | | | | | | 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
* Hide MetadataContext implementation details.Devang Patel2009-10-221-1/+9
| | | | llvm-svn: 84886
* Fix getMDs() interface such that it does not expose implementation details.Devang Patel2009-10-222-9/+13
| | | | llvm-svn: 84885
* Using TrackingVH instead of WeakVH or WeakMetadataVH.Devang Patel2009-10-222-9/+6
| | | | llvm-svn: 84884
* Fix getHandlerNames() interface. Now it populate clinet supplied small ↵Devang Patel2009-10-221-5/+7
| | | | | | vector with handler names. llvm-svn: 84820
* Rename msasm to alignstack per review.Dale Johannesen2009-10-212-3/+3
| | | | llvm-svn: 84795
* Do not use SmallVector to store MDNode elements.Devang Patel2009-10-211-4/+3
| | | | llvm-svn: 84784
* Make changes to rev 84292 as requested by Chris Lattner.Victor Hernandez2009-10-211-7/+4
| | | | | | | Most changes are cleanup, but there is 1 correctness fix: I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects). llvm-svn: 84772
* simplify.Chris Lattner2009-10-191-3/+1
| | | | llvm-svn: 84465
* Remove MallocInst from LLVM Instructions.Victor Hernandez2009-10-171-7/+0
| | | | llvm-svn: 84299
* Autoupgrade malloc insts to malloc calls.Victor Hernandez2009-10-171-2/+9
| | | | | | | | Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. llvm-svn: 84292
* Add an "msasm" flag to inline asm as suggested in PR 5125.Dale Johannesen2009-10-132-3/+5
| | | | | | | A little ugliness is accepted to keep the binary file format compatible. No functional change yet. llvm-svn: 84020
* Do not write empty METADATA_ATTACHMENT record.Devang Patel2009-10-131-5/+7
| | | | llvm-svn: 84006
* Remove unnecessary assert.Devang Patel2009-10-131-3/+0
| | | | llvm-svn: 84004
OpenPOWER on IntegriCloud