1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

55445 Commits

Author SHA1 Message Date
Benjamin Kramer
9e60957f54 Silence compiler warning.
warning: comparison between signed and unsigned integer expressions
llvm-svn: 92359
2009-12-31 16:27:13 +00:00
Chris Lattner
4870f6a384 simple fix for an incorrect factoring which causes a
miscompilation, PR5458.

llvm-svn: 92354
2009-12-31 08:33:49 +00:00
Chris Lattner
d9ed31f6d0 merge some more tests in.
llvm-svn: 92353
2009-12-31 08:32:22 +00:00
Chris Lattner
67d96ee04c filecheckize
llvm-svn: 92352
2009-12-31 08:29:56 +00:00
Chris Lattner
af22bc2328 fix refactoro
llvm-svn: 92349
2009-12-31 08:23:09 +00:00
Chris Lattner
d8516bddb2 factor code out into helper functions.
llvm-svn: 92347
2009-12-31 07:59:34 +00:00
Chris Lattner
b4d616f2d4 switch some std::vector's to smallvector. Reduce nesting.
llvm-svn: 92346
2009-12-31 07:48:51 +00:00
Chris Lattner
fe111bf087 use more modern datastructures.
llvm-svn: 92344
2009-12-31 07:33:14 +00:00
Chris Lattner
3ebdd96db7 clean up -debug output.
llvm-svn: 92343
2009-12-31 07:17:37 +00:00
Douglas Gregor
c4174c69ea Document the edit-distance algorithm used in StringRef, switch it over
to SmallVector, and add a unit test.

llvm-svn: 92340
2009-12-31 04:24:34 +00:00
Chris Lattner
918e70e140 this #include is ok.
llvm-svn: 92338
2009-12-31 03:02:42 +00:00
Chris Lattner
ecba817b0e fix Analysis/DebugInfo.h to not include Metadata.h. Do this
by moving one method out of line and eliminating redundant checks
from other methods.

llvm-svn: 92337
2009-12-31 03:02:08 +00:00
Chris Lattner
70788c5e57 add some basic named MD tests.
llvm-svn: 92336
2009-12-31 03:00:49 +00:00
Chris Lattner
f9012cc497 use early exits to reduce indentation.
llvm-svn: 92335
2009-12-31 02:33:14 +00:00
Chris Lattner
db243bdde8 eliminate another copy of the mdnode printing logic, simplify the
one that remains.

llvm-svn: 92334
2009-12-31 02:31:59 +00:00
Chris Lattner
81c909630f random tidying for MDNode printing.
llvm-svn: 92333
2009-12-31 02:27:30 +00:00
Chris Lattner
4776298748 eliminate a bunch of useless forwarding functions with one caller.
llvm-svn: 92332
2009-12-31 02:23:35 +00:00
Chris Lattner
ffb8ade190 make mdnMap type safe, rename accessors for consistency with the rest of llvm.
llvm-svn: 92331
2009-12-31 02:20:11 +00:00
Chris Lattner
2e52832769 metadata can't be a global var initializer.
llvm-svn: 92330
2009-12-31 02:15:45 +00:00
Chris Lattner
0017de9a80 simplify mdnode printing logic. Now N->dump() only
dumps one node instead of all of them.

llvm-svn: 92329
2009-12-31 02:13:35 +00:00
Chris Lattner
b3ba32fa35 don't unittest mdnode printing, we have disassembler tests for this.
llvm-svn: 92328
2009-12-31 02:12:13 +00:00
Chris Lattner
63181672c5 unify two copies of the NamedMDNode printing code.
llvm-svn: 92327
2009-12-31 01:54:05 +00:00
Chris Lattner
d40fbce519 fix printing of function-local metadata to print all the operands of the
mdnode, not just operand 0 over and over.

llvm-svn: 92326
2009-12-31 01:44:44 +00:00
Chris Lattner
5922bf638c simplify printing of mdstring and Argument.
llvm-svn: 92325
2009-12-31 01:41:14 +00:00
Chris Lattner
a3660e707c simplify asmprinting of NamedMDNode
llvm-svn: 92324
2009-12-31 01:36:50 +00:00
Chris Lattner
8e4ab636ed Remove #include of metadata.h from intrinsicinst.h. The only
method that needs it (DbgValueInst::getValue) has been moved out
of line.

llvm-svn: 92323
2009-12-31 01:32:41 +00:00
Chris Lattner
c12382b7c8 rename "elements" of metadata to "operands". "Elements" are
things that occur in types.  "operands" are things that occur
in values.

llvm-svn: 92322
2009-12-31 01:22:29 +00:00
Chris Lattner
9afb6e9c27 Optimize MDNode to coallocate the operand list immediately
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
2009-12-31 01:05:46 +00:00
Chris Lattner
6108ad9dd5 tidy
llvm-svn: 92320
2009-12-31 00:51:46 +00:00
Chris Lattner
b2de9bbb5e do not bother reuniquing mdnodes whose operands drop to null. Doing
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
2009-12-30 21:42:11 +00:00
Chris Lattner
f3520d2c35 remove some misleading comments.
llvm-svn: 92311
2009-12-30 20:25:09 +00:00
Douglas Gregor
301af636d3 Implement edit distance for StringRef
llvm-svn: 92309
2009-12-30 17:23:44 +00:00
Chris Lattner
740252f319 remove some fixme's
llvm-svn: 92304
2009-12-30 06:00:36 +00:00
Chris Lattner
83d5230121 fix two bogus tests that the asmparser now rejects.
llvm-svn: 92303
2009-12-30 05:54:51 +00:00
Chris Lattner
c3422a8190 now that instruction metadata is only parsed in one place, eliminate the
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
2009-12-30 05:48:36 +00:00
Chris Lattner
fb3b372e6d reimplement ParseOptionalInfo as ParseOptionalCommaAlign, correctly
handle the comma case for metadata.

llvm-svn: 92301
2009-12-30 05:44:30 +00:00
Chris Lattner
f7b95d1fbc rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,
and make it non-optional.  This fixes the bug where we'd accept
and ignore a spurious comma after some instructions.

llvm-svn: 92300
2009-12-30 05:31:19 +00:00
Chris Lattner
89aae53e72 convert 4 more instructions over.
llvm-svn: 92299
2009-12-30 05:27:33 +00:00
Chris Lattner
2aaf4a0490 add facilities to start factoring instruction metadata parsing
out of each opcode's handler.  Change ret over so far.

llvm-svn: 92298
2009-12-30 05:23:43 +00:00
Chris Lattner
03a91d987f reimplement insertvalue/extractvalue metadata handling to not blindly
accept invalid input.  Actually add a testcase.

llvm-svn: 92297
2009-12-30 05:14:00 +00:00
Chris Lattner
2ed8fad119 remove two bogus calls that accepted metadata in the middle of insert/extract value
*constant exprs*.

llvm-svn: 92296
2009-12-30 05:04:46 +00:00
Chris Lattner
63289c0f1e rename NamedOrCustomMD -> MetadataVar to follow conventions of all the rest of the code.
llvm-svn: 92295
2009-12-30 05:02:06 +00:00
Chris Lattner
2e5b6d96ac rename lltok::Metadata -> lltok::exclaim. We name tokens
after their syntactic form, not their semantic form.

llvm-svn: 92294
2009-12-30 04:56:59 +00:00
Chris Lattner
6664b8bd4d rename MetadataCache -> NumberedMetadata to follow the convention
used by other things.  Convert it to a vector since it is a dense 
numbering.

llvm-svn: 92293
2009-12-30 04:51:58 +00:00
Chris Lattner
bc506fa595 rewrite ParseMDNodeVector to follow the normal patter used in the .ll parser.
llvm-svn: 92292
2009-12-30 04:42:57 +00:00
Chris Lattner
9583b65fb9 rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as you'd expect.
llvm-svn: 92291
2009-12-30 04:15:23 +00:00
Chris Lattner
c42b8ff24e fix parsing of mdstring values.
llvm-svn: 92290
2009-12-30 04:13:37 +00:00
Chris Lattner
41a3666fc1 remove the code added in r90497. It has several major issues and no tests.
llvm-svn: 92288
2009-12-30 02:20:07 +00:00
Chris Lattner
4f406c8c74 split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.
llvm-svn: 92287
2009-12-30 02:11:14 +00:00
Chris Lattner
c549263f8a factor code even more.
llvm-svn: 92280
2009-12-29 22:40:21 +00:00