1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Chris Lattner
76e0063529 Encoding calling conv info in call/invoke instrs, tree add now round trips completely
llvm-svn: 36707
2007-05-03 22:34:03 +00:00
Chris Lattner
96aa97284a the type field for a store is the type of the pointer, not the value.
With this fix I can round trip treeaadd, only losing calling conv info.

llvm-svn: 36706
2007-05-03 22:21:59 +00:00
Chris Lattner
888ca49f41 fix encoding of BB names in the symtab
llvm-svn: 36704
2007-05-03 22:18:21 +00:00
Chris Lattner
e144600a5b bug fixes
llvm-svn: 36701
2007-05-03 22:09:51 +00:00
Chris Lattner
a09bba3302 implement the rest of the instructions
llvm-svn: 36699
2007-05-03 22:04:19 +00:00
Chris Lattner
09cc7ca696 add a few more instructions, getting close
llvm-svn: 36688
2007-05-03 18:58:09 +00:00
Chris Lattner
972e049d0d add reader logic for terminator instrs.
llvm-svn: 36642
2007-05-02 05:46:45 +00:00
Chris Lattner
10c4095f00 add reader support for a bunch of new instructions
llvm-svn: 36641
2007-05-02 05:16:49 +00:00
Chris Lattner
df04f1b80e read a few instructions, fix some bugs. This is enough to be able to round
trip function bodies like this:

define <2 x i64> @foo(<2 x i64> %x, <2 x i64> %y) {
        %tmp4 = bitcast <2 x i64> %y to <8 x i16>               ; <<8 x i16>> [#uses=1]
        %tmp5 = bitcast <2 x i64> %x to <8 x i16>               ; <<8 x i16>> [#uses=1]
        %tmp = add <8 x i16> %tmp5, %tmp4               ; <<8 x i16>> [#uses=1]
        %tmp6 = bitcast <8 x i16> %tmp to <2 x i64>             ; <<2 x i64>> [#uses=1]
        ret <2 x i64> %tmp6
}

llvm-svn: 36640
2007-05-02 04:27:25 +00:00
Chris Lattner
4795aed9ec handle function-level forward references, read binops.
llvm-svn: 36620
2007-05-01 07:01:57 +00:00
Chris Lattner
6528334ab7 implement materializeModule, force deallocation of vector memory when we
are done with them, start implementing ParseFunctionBody

llvm-svn: 36617
2007-05-01 05:52:21 +00:00
Chris Lattner
7544cfb05c The stream to read from is now an ivar
llvm-svn: 36615
2007-05-01 05:01:34 +00:00
Chris Lattner
cfd5b13e25 implement scafolding for lazy deserialization of function bodies
llvm-svn: 36614
2007-05-01 04:59:48 +00:00
Anton Korobeynikov
081d3bdd9f Implement visibility checking during linking. Also implement protected
visibility support for bitcode.

llvm-svn: 36577
2007-04-29 20:56:48 +00:00
Chris Lattner
eee1022086 Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
anything about disk I/O itself.  This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.

This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode.  Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.

I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.

llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Anton Korobeynikov
07528e335c This is not "FIXME" anymore
llvm-svn: 36541
2007-04-28 14:57:59 +00:00
Chris Lattner
726ec35588 move some code around, fix a bug in the reader reading globalinits (which
I just introduced), stub out function reading, purge aggregate values from
the value table before reading functions.

llvm-svn: 36463
2007-04-26 03:27:58 +00:00
Chris Lattner
c5a4c7c69a add bitcode alias support
llvm-svn: 36461
2007-04-26 02:46:40 +00:00
Chris Lattner
2d9d9a4bcf ensure that every error return sets a message (and goes through Error, for
easy breakpointing).

Fix bugs reading constantexpr geps.  We now can disassemble kc++ global
initializers.

llvm-svn: 36398
2007-04-24 18:15:21 +00:00
Chris Lattner
107680bd42 fix memory leak
llvm-svn: 36397
2007-04-24 17:22:05 +00:00
Chris Lattner
30fd018c93 implement reading and writing of constant exprs.
llvm-svn: 36394
2007-04-24 07:07:11 +00:00
Chris Lattner
ce97f22311 implement support for reading aggregate constants, including handling forward
constant references, etc.

llvm-svn: 36391
2007-04-24 05:48:56 +00:00
Chris Lattner
77c83b943d add supprot for FP constants, wide integers, and fix the encoding of MININT
llvm-svn: 36390
2007-04-24 04:04:35 +00:00
Chris Lattner
eff23e347b read basic constants: null, undef, integers <= 64bits
llvm-svn: 36389
2007-04-24 03:30:34 +00:00
Chris Lattner
67dedcbc58 move check to the right place :)
llvm-svn: 36386
2007-04-24 00:21:45 +00:00
Chris Lattner
e1a864cccf track global inits
llvm-svn: 36385
2007-04-24 00:18:21 +00:00
Chris Lattner
5e06e0faf4 Read global symtab
llvm-svn: 36378
2007-04-23 21:26:05 +00:00
Chris Lattner
f384c24a4d implement reading of abbrevs, and writing of abbreviated global varrs.
llvm-svn: 36367
2007-04-23 18:58:34 +00:00
Chris Lattner
5510ac5a56 first part of implementation of abbrevs. The writer isn't fully there yet and the
reader doesn't handle them at all yet.

llvm-svn: 36363
2007-04-23 16:04:05 +00:00
Chris Lattner
54e48ee45c Initial support for reading bitcode files. They currently only read types,
the type symtab, and global/function protos, and are missing the important
size optimization, but it is a place to start.

llvm-svn: 36330
2007-04-22 06:23:29 +00:00