summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove #include of metadata.h from intrinsicinst.h. The onlyChris Lattner2009-12-311-0/+8
| | | | | | | method that needs it (DbgValueInst::getValue) has been moved out of line. llvm-svn: 92323
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-314-58/+58
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Optimize MDNode to coallocate the operand list immediatelyChris Lattner2009-12-311-35/+49
| | | | | | | | | | | | | after the MDNode in memory. This eliminates the operands pointer and saves a new[] per node. Note that the code in DIDerivedType::replaceAllUsesWith is wrong and quite scary. A MDNode should not be RAUW'd with something else: this changes all uses of the mdnode, which may not be debug info related! Debug info should use something non-mdnode for declarations. llvm-svn: 92321
* do not bother reuniquing mdnodes whose operands drop to null. DoingChris Lattner2009-12-301-9/+27
| | | | | | | | | | | so can be a huge performance issue when tearing down modules and mdnodes are not guaranteed to be unique anyway. This speeds up: $ time ~/llvm/Release/bin/clang gcc.c -w -S -g from 72 to 35s, where gcc.c is from: http://people.csail.mit.edu/smcc/projects/single-file-programs/ llvm-svn: 92315
* remove some misleading comments.Chris Lattner2009-12-301-39/+6
| | | | llvm-svn: 92311
* Do not crash when .ll printing metadata that smells like debug info, but isn't.Chris Lattner2009-12-291-3/+2
| | | | llvm-svn: 92268
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-296-159/+102
| | | | | | | | 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
* privatize another interface.Chris Lattner2009-12-291-1/+4
| | | | llvm-svn: 92255
* the only call to this function (from clang) has been removed, zap it.Chris Lattner2009-12-291-22/+0
| | | | llvm-svn: 92254
* remove some unneeded Metadata interfaces.Chris Lattner2009-12-292-47/+18
| | | | llvm-svn: 92252
* tidy up debug info comments, use ->isVoidTy() where reasonable.Chris Lattner2009-12-291-25/+25
| | | | llvm-svn: 92249
* When doing v1->RAUW(v2), don't do anything to metadata. We don't knowChris Lattner2009-12-292-25/+0
| | | | | | | | why one was replaced with the other. Even in the specific case of debug information, it doesn't make sense to transfer the location over, this will just result in jumbled loc info. llvm-svn: 92241
* sink the Instruction::HasMetadata bit into SubclassData.Chris Lattner2009-12-293-16/+14
| | | | llvm-svn: 92240
* add a layer of accessors around the Value::SubClassData member, and use Chris Lattner2009-12-294-14/+19
| | | | | | | | | | | a convention (shadowing the setter with private forwarding function) to prevent subclasses from accidentally using it. This exposed some bogosity in ConstantExprs, which was propaging the opcode of the constant expr into the NUW/NSW/Exact field in the getWithOperands/getWithOperandReplaced methods. llvm-svn: 92239
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-285-162/+164
| | | | | | | | | | | | | | | | | | | | | | 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
* add IRBuilder.cpp to cmakeChris Lattner2009-12-281-0/+1
| | | | llvm-svn: 92233
* remove #include of Function.h from IRBuilderChris Lattner2009-12-281-0/+6
| | | | llvm-svn: 92231
* move debug info stuff out of line, allowing two #includesChris Lattner2009-12-281-0/+15
| | | | | | to go away from IRBuilder.h llvm-svn: 92230
* split code that doesn't need to be templated out of IRBuilder into a newChris Lattner2009-12-281-0/+31
| | | | | | | non-templated IRBuilderBase class. Move that large CreateGlobalString out of line, eliminating the need to #include GlobalVariable.h in IRBuilder.h llvm-svn: 92227
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-33/+11
| | | | | | | 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-282-22/+14
| | | | | | and simplify all the clients that use it. llvm-svn: 92224
* tidy up and delete a dead smallvector.Chris Lattner2009-12-281-10/+5
| | | | llvm-svn: 92223
* avoid a completely unneeded linear walk.Chris Lattner2009-12-281-12/+9
| | | | llvm-svn: 92221
* Eliminate two bits of ugliness in MDNode::replaceElement:Chris Lattner2009-12-281-26/+13
| | | | | | | eliminate the temporary smallvector, and only do FindNodeOrInsertPos twice if the first one succeeds and we delete a node. llvm-svn: 92220
* rearrange some methods, no functionality change.Chris Lattner2009-12-281-13/+14
| | | | llvm-svn: 92219
* avoid temporary CallbackVH's.Chris Lattner2009-12-281-4/+8
| | | | llvm-svn: 92218
* Rewrite the function-local validation logic for MDNodes (most of r91708).Chris Lattner2009-12-282-46/+39
| | | | | | | | Among other benefits, this doesn't leak the SmallPtrSet, has the verifier code in the verifier pass, actually does the verification at the end, and is considerably simpler. llvm-svn: 92217
* rename MDNode instance variables to something meaningful.Chris Lattner2009-12-281-9/+9
| | | | llvm-svn: 92216
* snip one more #include from Metadata.hChris Lattner2009-12-281-0/+4
| | | | llvm-svn: 92214
* prune some #includesChris Lattner2009-12-282-2/+2
| | | | llvm-svn: 92212
* change the strange MetadataContext::getMDs function to expose lessChris Lattner2009-12-282-5/+7
| | | | | | irrelevant internal implementation details to clients. llvm-svn: 92210
* change NamedMDNode to use a pimpl for its operand list insteadChris Lattner2009-12-281-5/+32
| | | | | | of making it a declared part of the value. llvm-svn: 92209
* move ElementVH out of the MDNode class into the MDNode.cpp file. AmongChris Lattner2009-12-281-4/+42
| | | | | | | other things, this avoids vtable and rtti data for it being splatted in every translation unit that uses it. llvm-svn: 92207
* Avoid assigning to Changed when it won't be used after the return.Bill Wendling2009-12-251-2/+2
| | | | llvm-svn: 92160
* Qualify a bunch of explicit template instantiations to satisfy clang++.John McCall2009-12-194-8/+8
| | | | llvm-svn: 91736
* Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL fromJohn McCall2009-12-191-3/+8
| | | | | | the templates in TypesContext.h can find them. Caught by clang++. llvm-svn: 91735
* Fix gcc warning.Eli Friedman2009-12-181-1/+2
| | | | llvm-svn: 91715
* Catch more cases of a pointer being marked garbage twice. This helps whenRafael Espindola2009-12-181-1/+2
| | | | | | debugging some leaks (PR5770 in particular). llvm-svn: 91713
* Formalize MDNode's function-localness:Victor Hernandez2009-12-183-11/+58
| | | | | | | | | | | - an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR - function-localness is designated via lowest bit in SubclassData - getLocalFunction() descends MDNode tree to see if it is consistently function-local Add verification of MDNodes to checks that MDNodes are consistently function-local. Update AsmWriter to use isFunctionLocal(). llvm-svn: 91708
* Add utility routines for NSW multiply.Dan Gohman2009-12-181-0/+5
| | | | llvm-svn: 91664
* Add utility routines for creating integer negation operators with NSW set.Dan Gohman2009-12-182-0/+18
| | | | | | Integer negation only overflows with INT_MIN, but that's an important case. llvm-svn: 91662
* This fixes a memory leak in OpaqueType found by Google's internal heapchecker.Jeffrey Yasskin2009-12-172-0/+28
| | | | llvm-svn: 91611
* Aggressively flip compare constant expressions where appropriate; constantEli Friedman2009-12-171-3/+5
| | | | | | folding in particular expects null to be on the RHS. llvm-svn: 91587
* Use different name for argument and fieldVictor Hernandez2009-12-161-2/+2
| | | | llvm-svn: 91524
* MDNodes that refer to an instruction are local to a function; in that case, ↵Victor Hernandez2009-12-161-3/+8
| | | | | | explicitly keep track of the function they are local to llvm-svn: 91497
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-2/+0
| | | | | | | | 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
* Move several function bodies which are rarely inlined out of line.Dan Gohman2009-12-141-0/+67
| | | | llvm-svn: 91319
* Add utility method for determining whether a function argumentDuncan Sands2009-12-111-0/+7
| | | | | | has the 'nest' attribute. llvm-svn: 91109
* Remove useless calls to c_str().Benjamin Kramer2009-12-081-4/+3
| | | | llvm-svn: 90855
* whitespace cleanupChris Lattner2009-12-081-1/+1
| | | | llvm-svn: 90834
OpenPOWER on IntegriCloud