Commit Graph

585 Commits

Author SHA1 Message Date
Chris Lattner
3ff4387113 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@664 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 22:56:31 +00:00
Chris Lattner
d70684f758 Add support for global constants, and for initializers for constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@598 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 04:01:05 +00:00
Chris Lattner
e4d71a1e18 Fix a bug with not removing method level types after compilation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@582 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 22:03:42 +00:00
Chris Lattner
b64e774ce5 ModuleTyID doesn't exist anyymore
Use correct cast


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@539 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:09:08 +00:00
Chris Lattner
1767edd983 getMethodType is now just getType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@538 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:08:52 +00:00
Chris Lattner
70cc3397f8 Implement global variable support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@530 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 07:58:01 +00:00
Chris Lattner
e8fdde179d * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@449 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:39:41 +00:00
Chris Lattner
1d670cc402 * Remove support for internal constant pool
* Support globally unique constants
* Support recursive and forward referenced types
* Support abstract types
* Add new BCR_TRACE macro to enable debugging of why the bytecode reader
  occasionally refuses to read something


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@448 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:37:43 +00:00
Chris Lattner
9a29790a6b * Slot calc is now simpler and not based on module analyzer.
* Add new SC_DEBUG option to enable debugging of why stuff doesn't work


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@442 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:31:52 +00:00
Chris Lattner
4c4007b3df Simplify SlotCalculator. SlotCalculator is now not a ModuleAnalyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@432 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:27:05 +00:00
Chris Lattner
7c5014767f * Make sure that the size of the type field can also control the output
instruction pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:51:21 +00:00
Chris Lattner
3d3f289eac * Add calls to failure template so that it is actually possible to debug
why bytecode parsing is failing.  Just put a breakpoint in the failure
  templates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:50:18 +00:00
Chris Lattner
9b50c1578d Add an arg to insertVal to allow us to prevent builtin types from being ignored
when they are inserted.

Ignore constant values without names.  If they are used, they will be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-26 16:28:37 +00:00
Chris Lattner
a25809dda4 Add an arg to insertVal to allow us to prevent builtin types from being ignored
when they are inserted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-26 16:28:18 +00:00
Chris Lattner
e5a57ee363 Add support for extern varargs methods & varargs method calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-25 22:47:55 +00:00
Chris Lattner
b49ff5c5ee Doh! Wrong accessor. Caused 'can not read bytecode' errors. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 18:51:23 +00:00
Chris Lattner
57dbb3ad63 Moved inline/llvm/Tools/* to include/llvm/Support/*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 17:46:59 +00:00
Chris Lattner
ff5eccef96 Add support to the bytecode writer to recognize floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:17:23 +00:00
Chris Lattner
a137530341 Add support to the bytecode reader to recognize floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:17:18 +00:00
Chris Lattner
e545981a6a * The parent of a constant pool is a symtabvalue, not a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:10:49 +00:00
Chris Lattner
644dc172f5 * The parent of a constant pool is a SymTabValue, not a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:08:51 +00:00
Chris Lattner
ab5ac6bb38 Implementation of Store & GetElementPtr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 23:22:50 +00:00
Chris Lattner
027dcc5b22 Implemented shl, shl, & load instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 21:10:27 +00:00
Chris Lattner
71496b3b50 Moved Cast from being a Unary instruction to being an "Other" instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 19:03:27 +00:00
Chris Lattner
0908309e3c Neg instruction removed. Cast instruction implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 04:57:15 +00:00
Chris Lattner
9f3d27654a Convert BinaryOperand and UnaryOperator to only take instruction types of
the appropriate enum


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 20:17:23 +00:00
Chris Lattner
a41f50dea8 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 19:24:15 +00:00
Chris Lattner
c8b25d40cb 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 08:36:50 +00:00
Chris Lattner
3fa0bc4408 Fixed some error messages to be nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 08:36:05 +00:00
Chris Lattner
7fc9fe3439 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:41:11 +00:00
Chris Lattner
079df31921 Convert ugly postincrement to efficient preincrement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:34:01 +00:00
Chris Lattner
bebd60dc9d Renamed get.*Operator to create seeing that it would have to be qualified
with the classname anyways.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:31:31 +00:00
Chris Lattner
ee976f3371 Updates to support
* Changes in PHI node structure


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-11 15:04:40 +00:00
Chris Lattner
477c2ec3e0 Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
to the UnaryOperator class (from the Instruction class).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-08 21:30:13 +00:00
Chris Lattner
009505452b Initial revision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-06 20:29:01 +00:00