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

235 Commits

Author SHA1 Message Date
Reid Spencer
b339652b44 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass

llvm-svn: 14942
2004-07-18 00:18:30 +00:00
Reid Spencer
f460e10236 bug 122:
- Correct ordering of tests because for GlobalValue isa Constant

llvm-svn: 14941
2004-07-18 00:16:21 +00:00
Chris Lattner
47c6a06211 Fix for PR341
llvm-svn: 14845
2004-07-15 02:40:04 +00:00
Chris Lattner
9fc90f37fd Fix unused var warning
llvm-svn: 14775
2004-07-12 20:29:52 +00:00
Reid Spencer
af6625347f Remove tabs.
llvm-svn: 14763
2004-07-11 17:22:51 +00:00
Reid Spencer
1a22913bac Prepare the writer for a non-broken implementation of writing floating
point values. This will be fixed when I figure out how to do it correctly
without depending on knowing the endianess of a platform.

llvm-svn: 14762
2004-07-11 17:22:07 +00:00
Reid Spencer
373ae97a58 Implementation of SlotTable went into header file. Note that this header
is currently not being used but is retained because it will be the basis
for a clean up of the SlotCalculator class.

llvm-svn: 14612
2004-07-04 11:47:22 +00:00
Reid Spencer
3c5a47177e Remove Tabs.
llvm-svn: 14611
2004-07-04 11:46:15 +00:00
Reid Spencer
bd058052d9 Implement new output functions for types and compacted type planes. Also
remove use of Type::TypeTyID and Type::TypeTy since Type no longer inherits
Value.

llvm-svn: 14610
2004-07-04 11:45:47 +00:00
Reid Spencer
ae9ac3dcc5 Add new methods outputTypes and outputCompactionTypes for handling Types
separately from Values. This needed for bug 122.

llvm-svn: 14609
2004-07-04 11:44:27 +00:00
Reid Spencer
f15d7739d1 For bug 122:
Separate Types from Values because Type no longer inherits from Value. The
changes for this are too numerous to list. In essence, any data structure
that contained a Value was doubled so that Types could be contained
similarly. New members include Types, TypeMap, CompactionTypes, and
CompactionTypeMap. Functions taking a Value* were overloaded with a variant
that takes a Type* that acts on the new data structures.

llvm-svn: 14608
2004-07-04 11:42:49 +00:00
Reid Spencer
50fc2ffa25 - Type::TypeTyID doesn't exist any more (bug 122)
- Types don't have names any more, just write them on ostream directly

llvm-svn: 14606
2004-07-04 11:37:54 +00:00
Reid Spencer
37b31cbcba Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
that needs it after the Type != Value changes (bug 122).

llvm-svn: 14605
2004-07-04 11:36:31 +00:00
Chris Lattner
2c7b54fea3 No functionality changes here:
* Some warning fixes for MSVC
  * Minor simplification to the deque scanning code

llvm-svn: 14417
2004-06-25 20:52:10 +00:00
Chris Lattner
33ebfe4339 Fix more warnings building with VC++
llvm-svn: 14391
2004-06-25 00:35:55 +00:00
Chris Lattner
6198a05b01 fix warnings
llvm-svn: 14388
2004-06-25 00:11:25 +00:00
Chris Lattner
0cd29ae2cd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Reid Spencer
323cc6283d Cleaned up a dead header file to prevent duplicate definition warnings
in doxygen.

llvm-svn: 14084
2004-06-09 04:38:34 +00:00
Reid Spencer
00aca582a2 Moved this file to lib/Bytecode/Writer because its used there only.
llvm-svn: 13900
2004-05-30 00:09:32 +00:00
Reid Spencer
b2939fc651 Use the SymbolTable::isEmpty() method instead of checking for no value
planes. A SymbolTable could still have types in it! This fixes problems
with two regression tests that failed because a symbol table that only
contained types was being omitted from bytecode files. Thanks to Chris
for the reduced test case that helped find this immediately.

llvm-svn: 13842
2004-05-27 20:18:51 +00:00
Reid Spencer
dccf1747a1 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).

llvm-svn: 13785
2004-05-26 07:37:11 +00:00
Reid Spencer
96fe333298 Put SlotTable.h inclusion back at front of list to be coding standards
compliant. Thanks, Chris.

llvm-svn: 13771
2004-05-25 20:09:05 +00:00
Reid Spencer
8e6d7148c1 Make the constructor explicit so we can't implicitly convert bool to
SlotTable.

llvm-svn: 13766
2004-05-25 19:09:25 +00:00
Reid Spencer
dc5f9c805c Make some improvements suggested by Chris.
llvm-svn: 13765
2004-05-25 19:03:21 +00:00
Reid Spencer
92adcaf58c Adding the initial implementation of the SlotTable class. This class is
the Abstract Data Type that holds slot number values and associates them
with Type* and Value*. The SlotTable is simply the holder of the slot
numbers and provides a controlled interface for building the table. It does
not enforce any particular idiom or functionality for manipulating the slot
numbers.

This is part of bug_122. The SlotCalculator and SlotMachine classes will
follow.

llvm-svn: 13764
2004-05-25 18:44:51 +00:00
Reid Spencer
0e78929263 Changed to use SymbolTable's new iteration interfaces.
llvm-svn: 13759
2004-05-25 17:29:59 +00:00
Chris Lattner
ada730740b Implement support for a new LLVM 1.3 bytecode format, which uses uint's
to index into structure types and allows arbitrary 32- and 64-bit integer
types to index into sequential types.

llvm-svn: 12651
2004-04-05 01:27:26 +00:00
Chris Lattner
c90b157c66 Write select instructions to bytecode
llvm-svn: 12315
2004-03-12 05:52:01 +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
Chris Lattner
3818f475de Remove all of the annoying statistics now that I'm finished (for the near
term) working on bytecode size stuff.

llvm-svn: 11046
2004-02-01 01:50:31 +00:00
Chris Lattner
781ed02fce SlotCalculator.h moved
llvm-svn: 10931
2004-01-20 19:50:34 +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
e29a22a76a Remove -debug output
llvm-svn: 10917
2004-01-18 22:26:53 +00:00
Chris Lattner
2258355dda Add support for writing 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: 10915
2004-01-18 21:08:52 +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
cce1db873e If these blocks are empty, there is no reason to even emit the bytecode blocks.
This saves about 15K in 176.gcc, coupled with another patch that I'm working on.

llvm-svn: 10889
2004-01-15 21:06:57 +00:00
Chris Lattner
44232deeda ConstantPointerRef's are no longer emitted. This saves 20028 bytes in the
bytecode files when compiling 176.gcc, but more importantly will make it
easier to eliminate CPR's in the future (no new .bc revision will be
required to support them)

llvm-svn: 10884
2004-01-15 18:46:56 +00:00
Chris Lattner
04fe1058c2 Fix PR73: bytecode format inconsistent
llvm-svn: 10876
2004-01-15 17:55:09 +00:00
Chris Lattner
4d2cf11dbb Remove the optimization that depends on ENDIAN_LITTLE: it's not worth it.
llvm-svn: 10870
2004-01-15 06:11:30 +00:00
Chris Lattner
106bba1e9b The new bytecode format supports emitting strings a special case. This is
intended to save size (and does on small programs), but on big programs it
actually increases the size of the program slightly.  The deal is that many
functions end up using the characters that the string contained, and the
characters are no longer in the global constant table, so they have to be
emitted in function specific constant pools.

This pessimization will be fixed in subsequent patches.

llvm-svn: 10864
2004-01-14 23:36:54 +00:00
Chris Lattner
b2f01f6c70 It is obvious that this has never been used for outputing more than a single
byte, it's totally endian incorrect!

llvm-svn: 10857
2004-01-14 18:50:28 +00:00
Chris Lattner
78ad123c78 Be const correct
llvm-svn: 10856
2004-01-14 18:41:38 +00:00
Chris Lattner
9e65e9b460 Ok, I can't handle it. This is a temporary checkin of a ton of statistics that
i'm using in my work to reduce the bytecode file sizes.  These will eventually
be removed.

llvm-svn: 10849
2004-01-14 16:54:21 +00:00
Chris Lattner
7cba50960d Toggle sense of flag
llvm-svn: 10838
2004-01-14 02:50:16 +00:00
Chris Lattner
accd21042c Do not bother to emit a BytecodeBlock for an empty symbol table. This commonly
occurs when the symbol table for a module has been stripped, making all of the
function local symbols go away.

This saves 6728 bytes in the stripped bytecode file of 254.gap (which obviously
has 841 functions), which isn't a ton, but helps and was easy.

llvm-svn: 10750
2004-01-10 19:56:59 +00:00
Chris Lattner
7318f16390 Err, we don't need Config/*.h files for things that are standard C++
llvm-svn: 10742
2004-01-10 19:10:01 +00:00
Chris Lattner
e069cb1c80 minor comment tweaks
llvm-svn: 10741
2004-01-10 19:07:06 +00:00
Chris Lattner
b9c0efb378 Refactor writer stuff out of include/llvm/Bytecode/Primitives.h. This is
internal implementation details for the writer, not public interfaces!

llvm-svn: 10738
2004-01-10 18:56:59 +00:00
Chris Lattner
231965667f Finegrainify namespacification
llvm-svn: 10737
2004-01-10 18:49:43 +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
b660dfb79a Remove usage of ConstantPointer
llvm-svn: 10051
2003-11-17 17:28:29 +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
Brian Gaeke
ee245ddcdf Explicitly cast type, so we aren't passing output_vbr a size_t.
llvm-svn: 9590
2003-10-29 20:09:01 +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
3ff64cf568 add support for new linkage types
llvm-svn: 9228
2003-10-18 06:30:21 +00:00
Chris Lattner
e4fc9caea1 Updated to emit the final 1.0 bytecode format. This supports weak linkage,
more efficient encoding of varargs calls, and the new varargs intrinsics.

llvm-svn: 9221
2003-10-18 05:54:48 +00:00
Alkis Evlogimenos
5a1f705c88 Eliminate some extraneous code in SlotCalculator::insertVal().
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
       SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
       SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
       SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().

llvm-svn: 9190
2003-10-17 02:02:40 +00:00
Chris Lattner
2bdaaa4e08 Add support for 'weak' linkage.
For now, we translate linkonce into weak linkage in the bytecode format because
we don't have enough bits to represent it.  We will rev the bytecode version
soon anyways, so this will be fixed in the near future.

llvm-svn: 9170
2003-10-16 18:28:50 +00:00
Chris Lattner
b6c8569f05 Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
64791df910 Fix a spello Misha made while fixing one of my appostrifications
llvm-svn: 8510
2003-09-15 00:33:20 +00:00
Misha Brukman
629711a7c3 Fixed spelling and grammar.
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner
bc7004d26a Add support for writing volatile load/stores
llvm-svn: 8394
2003-09-08 17:58:37 +00:00
Chris Lattner
03980a2b30 Allow modules to have 'any' pointer size and endianness. Luckily, we had
some space for extra flags, so we don't need to bump the revision number.

llvm-svn: 8118
2003-08-24 13:47:36 +00:00
Chris Lattner
63ea851f94 Remove explicit const qualifiers
llvm-svn: 7245
2003-07-23 14:54:33 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
0b18a0d886 Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llx
by emitting the type planes before any constants (which could be constant
expressions involving undefined types!)

llvm-svn: 6285
2003-05-22 18:35:38 +00:00
Chris Lattner
e1faff42f4 Add support for the new va_arg instruction
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner
08a79481cd Add support for reading and writing pointersize/endianness to and from bytecode
llvm-svn: 5839
2003-04-22 18:15:10 +00:00
Chris Lattner
545bebf00c Add support to the bytecode reader/writer for the new linkage types
llvm-svn: 5790
2003-04-16 21:16:05 +00:00
Chris Lattner
839f5a9077 Changes to the V2 bytecode format:
- Null values are implicitly encoded instead of explicitly, this makes
    things more compact!
  - More compactly represent ConstantPointerRefs
  - Bytecode files are represented as:
      Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
    instead of
      Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
    which makes a lot of things simpler.

Writer changes:
  - We now explictly encode versioning information in the bytecode files.
  - This allows new code to read bytecode files produced by old code, but
    new bytecode files can have enhancements such as the above.  Although this
    makes the reader a bit more complex (having to deal with old formats), the
    writer only needs to be able to produce the most recent version.

llvm-svn: 5749
2003-03-19 20:56:46 +00:00
Chris Lattner
5282326985 Don't keep track of # big vs #small instructions seperately
llvm-svn: 5385
2003-01-21 20:13:49 +00:00
Chris Lattner
b5027095e5 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
6ee0d4ed15 Clean up code a bit, no functionality changes.
llvm-svn: 4162
2002-10-14 03:34:17 +00:00
Chris Lattner
7cf9f6f4b1 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.

llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Misha Brukman
ab67f309cd On the quest of eliminating unnecessary includes.
llvm-svn: 3715
2002-09-14 02:18:57 +00:00
Chris Lattner
1720a4c0b7 Cleanup ConstantExpr handling:
* Correctly delete TypeHandles in AsmParser.  In addition to not leaking
   memory, this prevents a bug that could have occurred when a type got
   resolved that the constexpr was using
 * Check for errors in the AsmParser instead of hitting assertion failures
   deep in the code
 * Simplify the interface to the ConstantExpr class, removing unneccesary
   parameters to the ::get* methods.
 * Rename the 'getelementptr' version of ConstantExpr::get to
   ConstantExpr::getGetElementPtr

llvm-svn: 3161
2002-07-30 18:54:25 +00:00
Chris Lattner
ec1a192b16 *** empty log message ***
llvm-svn: 3105
2002-07-26 18:40:14 +00:00
Chris Lattner
071b32361f Register the WriteBytecodePass
llvm-svn: 3033
2002-07-23 19:56:44 +00:00
Chris Lattner
24bcbdd155 *** empty log message ***
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Vikram S. Adve
e182dd58ae Add support for writing ConstantExpr nodes.
llvm-svn: 2899
2002-07-14 23:08:30 +00:00
Vikram S. Adve
155a8ec344 Write out the plane for types first, since values of primitive types
may be constructed by expressions of other types (and so the
contents of the primitive type planes must come after all types).
Use a helper function outputConstantsInPlane in outputConstants to
do this.

llvm-svn: 2898
2002-07-14 23:07:51 +00:00
Vikram S. Adve
c5355ed343 Use a helper function outputConstantsInPlane in outputConstants.
llvm-svn: 2897
2002-07-14 23:05:53 +00:00
Anand Shukla
b35aa2b2e7 changes to make it compatible with 64bit gcc
llvm-svn: 2790
2002-06-25 20:44:04 +00:00
Chris Lattner
d7cbd7d5d2 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner
593394bb04 Fix constness problem
llvm-svn: 2759
2002-06-05 17:49:40 +00:00
Chris Lattner
fd8d5b852c Replace all usages of Type::isPointerType with isa<PointerType>
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
96e0c48175 Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
321a8cf4ba Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
f43286a1e4 Make debugging code not use getStrValue
llvm-svn: 2295
2002-04-18 18:14:56 +00:00
Chris Lattner
5e12c7caf5 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.

llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
cd3575a5cf s/method/function
llvm-svn: 2177
2002-04-08 22:01:15 +00:00
Chris Lattner
137fa92dce * Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function

llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
bc15ae64dd Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
8afff0c29a s/MethodType/FunctionType
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
8c98acc07f s/Method/Function
llvm-svn: 2035
2002-03-29 03:51:11 +00:00
Chris Lattner
849c762b02 Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
43c92f9dbd Remove unsized array support
llvm-svn: 1461
2001-12-14 16:30:51 +00:00
Chris Lattner
c4a5815033 Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()

llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
f90b19a71c Move support directory
llvm-svn: 1401
2001-11-29 16:32:16 +00:00
Chris Lattner
e577171af8 Implement internal method support
llvm-svn: 1374
2001-11-26 18:56:10 +00:00
Chris Lattner
9010727e28 Fix obscure nasty bug with bytecode writing that could cause the last byte to be dropped.
llvm-svn: 1123
2001-11-04 21:32:41 +00:00
Chris Lattner
bc4f868dd8 Fixed a LONG standing, SCARY problem with bytecode encoding. It turns out to be an endian problem that only shows up with type 0 instructions in LARGE programs.
llvm-svn: 961
2001-10-23 03:21:10 +00:00
Chris Lattner
0553612e11 Allow unresolved/opaque types to be read and written to bytecode files
llvm-svn: 959
2001-10-23 01:53:22 +00:00
Chris Lattner
9c5e9e028e Fix problem with a cast instruction that must be expanded to type 0
llvm-svn: 929
2001-10-21 00:14:44 +00:00
Chris Lattner
f790ec066e Dang, we were losing the Constant bit on globals. Fix this
llvm-svn: 885
2001-10-18 06:11:23 +00:00
Chris Lattner
fd1ab08cba Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner
21a0de20bf * Use new style casts more
* Add real support for global variable addresses initializing constants
* Fix encoding/decoding of VarArgs calls
* Support the Invoke instruction

llvm-svn: 761
2001-10-13 06:48:38 +00:00
Chris Lattner
a01eda3091 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion

llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
08b1dde37e Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83 Convert more code to use new style casts
Eliminate old style casts from value.h

llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
4c684cde80 Add more support for new style casts
Convert more code to use them

llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
43781f1f96 Add support for new style casts
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
b77eae1b27 Implement constant pointers, and null specifically in the parser, bytecode writer, and
bytecode reader.

llvm-svn: 668
2001-09-30 22:46:54 +00:00
Chris Lattner
ac91b150a7 Add support for global constants, and for initializers for constants
llvm-svn: 598
2001-09-18 04:01:05 +00:00
Chris Lattner
00391ca46d ModuleTyID doesn't exist anyymore
Use correct cast

llvm-svn: 539
2001-09-10 20:09:08 +00:00
Chris Lattner
9d1629d688 Implement global variable support
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
28154ea366 * Emit bytecode using a deque instead of a vector to be faster
* Internal rep no longer has a constant pool
* Support emission of recursive types
* Don't output a constant pool for an external method
* The bytecode writer is no longer a module analyzer

llvm-svn: 449
2001-09-07 16:39:41 +00:00
Chris Lattner
64c7f2be62 * Make sure that the size of the type field can also control the output
instruction pattern.

llvm-svn: 324
2001-07-28 17:51:21 +00:00
Chris Lattner
fc1d7dd221 Add support for extern varargs methods & varargs method calls
llvm-svn: 297
2001-07-25 22:47:55 +00:00
Chris Lattner
ff6c44f04f Moved inline/llvm/Tools/* to include/llvm/Support/*
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
964af23ab4 Add support to the bytecode writer to recognize floating point constants
llvm-svn: 190
2001-07-15 00:17:23 +00:00
Chris Lattner
f3410f8701 * The parent of a constant pool is a symtabvalue, not a value.
llvm-svn: 181
2001-07-14 06:10:49 +00:00
Chris Lattner
6065e61656 Implementation of Store & GetElementPtr
llvm-svn: 164
2001-07-08 23:22:50 +00:00
Chris Lattner
7a7ddef47e Neg instruction removed. Cast instruction implemented.
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
c00392210d Broad superficial changes:
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType

llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner
6f7587e4d3 Changed the fundemental architecture of Operands for Instructions. Now
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before.  Getting an operand no longer requires
a virtual function call.

WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!

llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner
d616582a7a Miscellaneous cleanups:
* Convert post to pre-increment for for loops
  * Use generic programming more
  * Use new Value::cast* instructions
  * Use new Module, Method, & BasicBlock forwarding methods
  * Use new facilities in STLExtras.h
  * Use new Instruction::isPHINode() method

llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
07b100a643 Convert ugly postincrement to efficient preincrement
llvm-svn: 89
2001-06-27 23:34:01 +00:00
Chris Lattner
e6b9b382e2 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00