1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

224 Commits

Author SHA1 Message Date
Chris Lattner
eb7e5f6d24 Read select instrs from bytecode
llvm-svn: 12314
2004-03-12 05:51:49 +00:00
Chris Lattner
ada23acba4 This debugging hook is no longer needed.
llvm-svn: 11233
2004-02-09 17:20:52 +00:00
Chris Lattner
16690fad3d Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
a1757d1d91 Start using the new and improve interface to FunctionType arguments
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Misha Brukman
5723c64d9a Implement ModuleProvider::materializeModule() by only materializing functions
that are still left in the lazy reader map.

llvm-svn: 10944
2004-01-21 22:55:34 +00:00
Chris Lattner
858d41f7d4 Fix PR212 - Bytecode reader misreads 'long -9223372036854775808'!
Fix testcase test/Regression/Assembler/2004-01-20-MaxLongLong.llx

llvm-svn: 10928
2004-01-20 19:13:07 +00:00
Chris Lattner
a509b856f9 Fix bogus warning and simplify code
llvm-svn: 10924
2004-01-20 17:06:29 +00:00
Chris Lattner
85a8d1cc2b Bugfixes for dealing with partially compactified functions
llvm-svn: 10920
2004-01-20 00:54:06 +00:00
Chris Lattner
28e1981c25 Save another 30K from 176.gcc by encoding the compaction table a bit more
intelligently.

llvm-svn: 10918
2004-01-18 22:35:34 +00:00
Chris Lattner
5fc855775d Add support for reading bytecode files with compactiontables for bytecode files.
This shrinks the bytecode file for 176.gcc by about 200K (10%), and 254.gap by
about 167K, a 25% reduction.  There is still a lot of room for improvement in
the encoding of the compaction table.

llvm-svn: 10914
2004-01-18 21:08:15 +00:00
Chris Lattner
630c3ddea0 Bytecode format for LLVM 1.2 no longer explicitly encodes zeros in primitive
type planes.  This saves about 5k on 176.gcc, and is needed for a subsequent
patch of mine I'm working on.

llvm-svn: 10908
2004-01-17 23:25:43 +00:00
Chris Lattner
844284aabe Allow bytecode files to refer directly to global values as constants, instead
of forcing them to go through ConstantPointerRef's.  This allows bytecode
files to mirror .ll files, allows more efficient encoding, and makes it easier
to eventually eliminate CPR's.

llvm-svn: 10883
2004-01-15 18:45:25 +00:00
Chris Lattner
5aea209da6 Fix more breakage with string change.
llvm-svn: 10882
2004-01-15 18:39:06 +00:00
Chris Lattner
921cc4fd17 Fix PR73
llvm-svn: 10875
2004-01-15 17:55:01 +00:00
Chris Lattner
91f2cd914c Fix brokenness in my last checking
llvm-svn: 10874
2004-01-15 16:56:15 +00:00
Chris Lattner
ed98fd7216 Change all of the bytecode reader primitives to throw exceptions instead of
returning error codes.  Because they don't return an error code, they can
return the value read, which simplifies the code and makes the reader more
efficient (yaay!).

Also eliminate the special case code for little endian machines.

llvm-svn: 10871
2004-01-15 06:13:09 +00:00
Chris Lattner
85a0f87636 Version 1.2 now supports encoding strings as a special case, to avoid having
to emit all of those sbyte constants.

llvm-svn: 10863
2004-01-14 23:35:21 +00:00
Chris Lattner
bfd3ea609c Like output_data, it's obvious that input_data was only used with 1 character
data.

llvm-svn: 10861
2004-01-14 23:03:22 +00:00
Chris Lattner
238d130081 Remove support for the pre-1.0 bytecode version #1. This will become
the bytecode revision generated by LLVM 1.2.

llvm-svn: 10848
2004-01-14 16:44:44 +00:00
Chris Lattner
758109ce2e Don't use ConstantExpr::getShift anymore
llvm-svn: 10791
2004-01-12 19:08:43 +00:00
Chris Lattner
a6ecd35eab * finegrainify namespacification of ArchiveReader.cpp
* Refactor reader stuff out of include/llvm/Bytecode/Primitives.h.  This is
  internal implementation details for the reader, not public interfaces!

llvm-svn: 10739
2004-01-10 19:00:15 +00:00
Chris Lattner
6e130238f7 Inching our way towards fixing PR82
llvm-svn: 10721
2004-01-09 05:42:34 +00:00
Chris Lattner
5f7770c06b remove some useless #includes
llvm-svn: 10654
2003-12-30 07:55:21 +00:00
Chris Lattner
2827a074c2 Use new getFileSize function instead of sys/stat.h directly.
llvm-svn: 10650
2003-12-30 07:40:35 +00:00
Chris Lattner
6317315a2f Factor FDHandle out of the bytecode reader into the FileUtilities.h support
routines.

llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Chris Lattner
5ad07a3fbf minor cleanups
llvm-svn: 10612
2003-12-26 06:16:00 +00:00
John Criswell
8740fbd052 Reverted back to revision 1.11. The previous fix doesn't really fix
anything; it just causes the bug to go dormant.

llvm-svn: 10585
2003-12-22 16:22:49 +00:00
John Criswell
80daeb4cdb Fix PR#193.
Modified ReadArchiveBuffer() so that it dynamically allocates the
std::string object used to hold the bytecode object file's name.  This is
necessary because it is passed by reference to the new Module that is
allocated to represent the bytecode object, and previously we were
using a std::string that disappeared on function exit.

llvm-svn: 10565
2003-12-20 22:37:29 +00:00
Brian Gaeke
81d68517ea Make getObjectType() smarter about ranlibbed Mac OS X archives.
llvm-svn: 10493
2003-12-17 00:18:18 +00:00
Brian Gaeke
94157211b6 Throw better error messages, by calling strerror(errno) when we
get an error inside the bytecode reader.

llvm-svn: 10415
2003-12-12 00:47:44 +00:00
Brian Gaeke
e962a55ac5 In getObjectType(), doxygenify comment, and take a pointer to the
beginning of the archive member data as an argument.

Get rid of ParseLongFilenameSection(), which is dead.

In ReadArchiveBuffer(), implement support for 4.4BSD/MacOSX long filenames.
This is kind of invasive, because they prepend the long filename to the archive
member data, and then lie about the size. So we have to keep track of the real
size.

llvm-svn: 10392
2003-12-11 00:38:04 +00:00
Chris Lattner
a2ac517a20 Emit & read more compressed bytecode by not emitting a bytecodeblock for
each basic block in function.  Instead, just emit a stream of instructions,
chopping up basic blocks based on when we find terminator instructions.  This
saves a fairly substantial chunk of bytecode space.  In stripped, sample
cases, for example, we get this reduction in size:

197.parser: 163036 -> 137180:  18.8% reduction
254.gap   : 844936 -> 689392:  22.6%
255.vortex: 621724 -> 528444:  17.7%

...

Not bad for something this simple.  :)  Note that this doesn't require a new
bytecode version number at all, though version 1.1 should not need to support
the old format.

llvm-svn: 10280
2003-12-01 07:05:31 +00:00
Chris Lattner
60d2a51347 * Finegrainify namespacification
* Strength reduce several data structures which were left over from the
  "bad old days"
* Minor efficiency improvements
* Major efficiency improvement: In BytecodeParser::insertValue, do not allocate
  a new ValueTab entry just because some value exists with a large type.  This
  dramatically reduces the number of allocations/deallocations performed by the
  bytecode reader, and speeds up parsing of Kimwitu++ from 34s to 17s.  This is
  to help address PR127

llvm-svn: 10085
2003-11-19 17:27:18 +00:00
Chris Lattner
4bb9013bb6 Minor efficiency improvements, finegrainify namespacification
llvm-svn: 10084
2003-11-19 17:21:11 +00:00
Chris Lattner
af14b55e1b In the future, these slabs can be null...
llvm-svn: 10083
2003-11-19 17:20:42 +00:00
Chris Lattner
417f92b621 Minor efficiency improvements all over. Finegrainify Namespacification
llvm-svn: 10082
2003-11-19 17:17:36 +00:00
Chris Lattner
4c0e027b28 Fine grainify namespacification, #include file that defines the interface!
llvm-svn: 10081
2003-11-19 16:06:55 +00:00
Chris Lattner
e5b1d0a66d Minor speedup to do less linear time searches of information we already have.
speeds up disassembly of kc++ by .6s

llvm-svn: 10079
2003-11-19 06:01:12 +00:00
Brian Gaeke
e2e424701a Implement skeletal support for __.SYMDEF (ranlib) sections in archives.
Correctly parse the Long Filename section of the archive.
When reading in archive members, set their ModuleIDs to
 "ARCHIVENAME(MEMBERNAME)", as is traditional.

llvm-svn: 10043
2003-11-16 23:08:48 +00:00
Chris Lattner
ccac6e36fb I can't believe the incompetence of the people I have to deal with around here.
These fools don't even wrap code at 80 columns.

Oh wait, _I_ wrote that.  That explains a lot!!

llvm-svn: 9999
2003-11-14 16:34:25 +00:00
Chris Lattner
0ba2cec700 Fix PR 110: the constant folding code assumes that if something is not a
constant expression, but is of (for example) ubyte type, then it is a
ConstantUInt.  This was not true for placeholders.

llvm-svn: 9994
2003-11-14 06:38:46 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
2df84a62cd no need for endl
llvm-svn: 9736
2003-11-05 19:53:32 +00:00
Chris Lattner
352ad83271 Add support for constant expr shifts
llvm-svn: 9735
2003-11-05 19:53:03 +00:00
Alkis Evlogimenos
9430d79c1f Put DEBUG_OUTPUT at the top along with TRACE_LEVEL. Also fix the code
inside DEBUG_OUTPUT so that it compiles.

llvm-svn: 9614
2003-10-30 18:33:58 +00:00
John Criswell
de34542f41 Added LLVM copyright header.
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
87843f87b8 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
620cb7e35a Fix warning
llvm-svn: 9236
2003-10-18 19:48:10 +00:00