summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* simple fix for an incorrect factoring which causes aChris Lattner2009-12-311-0/+7
| | | | | | miscompilation, PR5458. llvm-svn: 92354
* fix refactoroChris Lattner2009-12-311-1/+1
| | | | llvm-svn: 92349
* factor code out into helper functions.Chris Lattner2009-12-311-88/+109
| | | | llvm-svn: 92347
* switch some std::vector's to smallvector. Reduce nesting.Chris Lattner2009-12-311-54/+57
| | | | llvm-svn: 92346
* use more modern datastructures.Chris Lattner2009-12-311-4/+5
| | | | llvm-svn: 92344
* clean up -debug output.Chris Lattner2009-12-311-3/+4
| | | | llvm-svn: 92343
* Document the edit-distance algorithm used in StringRef, switch it overDouglas Gregor2009-12-311-5/+14
| | | | | | to SmallVector, and add a unit test. llvm-svn: 92340
* fix Analysis/DebugInfo.h to not include Metadata.h. Do thisChris Lattner2009-12-313-0/+7
| | | | | | | by moving one method out of line and eliminating redundant checks from other methods. llvm-svn: 92337
* use early exits to reduce indentation.Chris Lattner2009-12-311-15/+16
| | | | llvm-svn: 92335
* eliminate another copy of the mdnode printing logic, simplify theChris Lattner2009-12-311-32/+23
| | | | | | one that remains. llvm-svn: 92334
* random tidying for MDNode printing.Chris Lattner2009-12-311-10/+7
| | | | llvm-svn: 92333
* eliminate a bunch of useless forwarding functions with one caller.Chris Lattner2009-12-311-21/+11
| | | | llvm-svn: 92332
* make mdnMap type safe, rename accessors for consistency with the rest of llvm.Chris Lattner2009-12-311-12/+13
| | | | llvm-svn: 92331
* metadata can't be a global var initializer.Chris Lattner2009-12-311-4/+0
| | | | llvm-svn: 92330
* simplify mdnode printing logic. Now N->dump() onlyChris Lattner2009-12-311-127/+105
| | | | | | dumps one node instead of all of them. llvm-svn: 92329
* unify two copies of the NamedMDNode printing code.Chris Lattner2009-12-311-25/+22
| | | | llvm-svn: 92327
* fix printing of function-local metadata to print all the operands of theChris Lattner2009-12-311-2/+2
| | | | | | mdnode, not just operand 0 over and over. llvm-svn: 92326
* simplify printing of mdstring and Argument.Chris Lattner2009-12-311-12/+5
| | | | llvm-svn: 92325
* simplify asmprinting of NamedMDNodeChris Lattner2009-12-311-34/+4
| | | | llvm-svn: 92324
* 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-319-102/+102
| | | | | | | 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-312-36/+50
| | | | | | | | | | | | | 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
* tidyChris Lattner2009-12-311-3/+4
| | | | llvm-svn: 92320
* 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
* Implement edit distance for StringRefDouglas Gregor2009-12-301-0/+31
| | | | llvm-svn: 92309
* 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-302-10/+12
| | | | | | | 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-302-37/+46
| | | | | | handle the comma case for metadata. llvm-svn: 92301
* rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,Chris Lattner2009-12-302-20/+11
| | | | | | | 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-302-31/+24
| | | | llvm-svn: 92299
* add facilities to start factoring instruction metadata parsingChris Lattner2009-12-302-14/+33
| | | | | | 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-302-10/+35
| | | | | | 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-303-22/+24
| | | | | | of the code. llvm-svn: 92295
* rename lltok::Metadata -> lltok::exclaim. We name tokens Chris Lattner2009-12-304-19/+15
| | | | | | after their syntactic form, not their semantic form. llvm-svn: 92294
* rename MetadataCache -> NumberedMetadata to follow the conventionChris Lattner2009-12-302-17/+18
| | | | | | | 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-302-31/+40
| | | | llvm-svn: 92292
* rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as ↵Chris Lattner2009-12-302-6/+6
| | | | | | 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-302-43/+2
| | | | llvm-svn: 92288
* split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.Chris Lattner2009-12-302-24/+36
| | | | 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-292-18/+27
| | | | | | | 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-292-13/+13
| | | | | | | 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
* Do not crash when .ll printing metadata that smells like debug info, but isn't.Chris Lattner2009-12-292-49/+25
| | | | llvm-svn: 92268
OpenPOWER on IntegriCloud