summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Clear FunctionLocalMDs in purgeFunction along with the rest of theDan Gohman2010-08-251-1/+1
| | | | | | function-specific state. llvm-svn: 112058
* Fix whitespace.Dan Gohman2010-08-251-1/+1
| | | | llvm-svn: 112056
* Eliminate an unnecessary cast.Dan Gohman2010-08-251-1/+1
| | | | llvm-svn: 112055
* Add braces to fix dangling else.Dan Gohman2010-08-241-2/+2
| | | | llvm-svn: 111896
* Extend function-local metadata to be usable as attachments.Dan Gohman2010-08-241-20/+77
| | | | llvm-svn: 111895
* When we know we have an MDValue or MDString, call EnumerateMetadataDan Gohman2010-08-241-1/+1
| | | | | | directly instead of going through EnumerateValue. llvm-svn: 111894
* Simplify this code. NamedMDNode operands are MDNodes.Dan Gohman2010-08-241-2/+1
| | | | llvm-svn: 111892
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-22/+7
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Fix whitespace.Dan Gohman2010-07-161-2/+2
| | | | llvm-svn: 108569
* Tidy.Bob Wilson2010-06-191-1/+1
| | | | llvm-svn: 106383
* Speedup bitcode writer. Do not walk all values for all functions to emit ↵Devang Patel2010-06-021-4/+7
| | | | | | function local metadata. In one testcase, probably worst case scenario, the 70x speed up is seen. llvm-svn: 105360
* Add special case bitcode support for DebugLoc. This avoidsChris Lattner2010-04-031-1/+8
| | | | | | | | | | | | having the bitcode writer materialize mdnodes for all the debug location tuples when writing out the bc file and stores the information in a more compact form. For example, the -O0 -g bc file for combine.c in 176.gcc shrinks from 739392 to 512096 bytes. This concludes my planned short-term debug info work. llvm-svn: 100261
* Make the side-numbering of instructions used by metadata (which is needed toNick Lewycky2010-02-251-2/+1
| | | | | | | | | keep track of instructions that return void) per-function. This fixes PR5278. This breaks backwards compatibility with the metadata format. That's okay because we haven't released the metadata bitcode yet. llvm-svn: 97132
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-1/+1
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Function-local metadata whose operands had been optimized to no longer refer ↵Victor Hernandez2010-02-061-2/+2
| | | | | | to function-local IR were not getting written by BitcodeWriter; solution is for these metadata to be enumerated just like global metadata. llvm-svn: 95467
* Fix (and test) function-local metadata that occurs before the instruction ↵Victor Hernandez2010-02-041-4/+8
| | | | | | that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated llvm-svn: 95269
* Respect operator precedence (and silence a gcc 4.3 warning).Benjamin Kramer2010-01-231-1/+1
| | | | llvm-svn: 94304
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-221-4/+5
| | | | llvm-svn: 94243
* Simplify code that chooses when to enumerate function-local metadata operandsVictor Hernandez2010-01-141-26/+28
| | | | llvm-svn: 93446
* Clean up unnecessary return and bracketsVictor Hernandez2010-01-141-3/+1
| | | | llvm-svn: 93401
* Enumerate function-local metadata (and its types and operands) only during ↵Victor Hernandez2010-01-131-17/+31
| | | | | | function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator llvm-svn: 93338
* NamedMDNode is never used so there is no need to enumerate it here.Devang Patel2010-01-091-1/+1
| | | | llvm-svn: 93039
* Derive NamedMDNode from Value.Devang Patel2010-01-091-10/+22
| | | | llvm-svn: 93032
* Use separate namespace for named metadata.Devang Patel2010-01-071-2/+11
| | | | llvm-svn: 92931
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-051-1/+2
| | | | llvm-svn: 92783
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-1/+1
| | | | | | dereference the type pointer. llvm-svn: 92726
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-6/+6
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* tidyChris Lattner2009-12-311-3/+4
| | | | llvm-svn: 92320
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-9/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* change the strange MetadataContext::getMDs function to expose lessChris Lattner2009-12-281-1/+1
| | | | | | 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
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-5/+3
| | | | | | | 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-3/+5
| | | | | | | | | | | | 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
* bitcode writer support for blockaddress.Chris Lattner2009-10-281-8/+36
| | | | llvm-svn: 85376
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-0/+1
| | | | llvm-svn: 85254
* Fix getMDs() interface such that it does not expose implementation details.Devang Patel2009-10-221-5/+7
| | | | llvm-svn: 84885
* Using TrackingVH instead of WeakVH or WeakMetadataVH.Devang Patel2009-10-221-2/+1
| | | | llvm-svn: 84884
* Do not use SmallVector to store MDNode elements.Devang Patel2009-10-211-4/+3
| | | | llvm-svn: 84784
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-3/+3
| | | | llvm-svn: 83019
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-40/+39
| | | | llvm-svn: 82355
* Write and read metadata attachments.Devang Patel2009-09-181-1/+22
| | | | llvm-svn: 82259
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-3/+4
| | | | llvm-svn: 78948
* Use separate ValueList for metadata.Devang Patel2009-08-041-26/+55
| | | | | | This fixes PR4666. llvm-svn: 78056
* Work around a dangling pointer dereference when enumerating NamedMDNodes.Benjamin Kramer2009-07-311-0/+3
| | | | llvm-svn: 77675
* Enumerate NamedMDNode elements first.Devang Patel2009-07-301-4/+0
| | | | llvm-svn: 77636
* Read and write NamedMDNode.Devang Patel2009-07-291-0/+12
| | | | llvm-svn: 77517
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-281-1/+1
| | | | | | New name is Metadata.h. llvm-svn: 77370
* Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel2009-07-231-13/+15
| | | | | | METADATA_BLOCK in bitcode file. llvm-svn: 76834
* Use isa<> instead of dyn_cast<>.Devang Patel2009-07-221-1/+1
| | | | llvm-svn: 76767
* Fixed build warning. No functionality change.Sanjiv Gupta2009-07-221-1/+1
| | | | llvm-svn: 76761
OpenPOWER on IntegriCloud