Commit Graph

42 Commits

Author SHA1 Message Date
Chris Lattner c8f563bed1 s/Method/Function in variable and method names
llvm-svn: 5715
2003-03-06 17:18:14 +00:00
Chris Lattner 17f8686900 Use the std namespace explicitly
llvm-svn: 5708
2003-03-06 16:32:25 +00:00
Chris Lattner 2862d2ec71 There is no way to guarantee that constants are not forward referenced.
Handle forward referenced constants in a general way.  This fixes bug:
Assembler/2002-10-13-ConstantEncodingProblem.llx and allows the SPEC
197.parser benchmark to be built

llvm-svn: 4161
2002-10-14 03:33:02 +00:00
Chris Lattner 243b5751a0 Fix bug: test/Regression/Assembler/2002-08-19-BytecodeReader.llx
llvm-svn: 3384
2002-08-19 16:48:21 +00:00
Chris Lattner c8d952ebba Fix stupid oversight of missing #include.
llvm-svn: 3367
2002-08-17 22:02:41 +00:00
Chris Lattner 51fa0ef925 - Finally nailed: test/Regression/Assembler/2002-08-16-ConstExprInlined.llx
- ParseConstantPool was resolving reference to value using the function
      slot # instead of the global slot #.
  - Bytecode reader changes:
    - Remove the failure<> template from Bytecode Reader
    - Remove extraneous #includes
    - s/method/function/ a bit
    - Eliminate the fwdRefs class that just added abstraction where it was not
      needed, making things more complex.
    - Use a vector instead of a list for function signatures.

llvm-svn: 3366
2002-08-17 22:01:27 +00:00
Chris Lattner 330b7ac76c Remove support for Not ConstantExpr. This simplifies the unary case to only
have to support the cast instruction, so the function is renamed to getCast.

llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner a13a2dac7e 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: 3160
2002-07-30 18:54:22 +00:00
Chris Lattner 68c7b71ea6 Break line to fit 80 columns
llvm-svn: 3083
2002-07-25 15:40:04 +00:00
Chris Lattner 980ddf5854 ConstExpr::getelementptr now takes a vector of Constants not Values
llvm-svn: 2948
2002-07-18 00:14:27 +00:00
Anand Shukla 09da3b881f added std:: to vector
llvm-svn: 2916
2002-07-16 00:04:15 +00:00
Vikram S. Adve a336afd5d9 Add support for reading ConstantExpr nodes.
Add class ConstantFwdRefs to resolve forward references to constants
and to globals. (Hmm... this class could be renamed I guess.)

llvm-svn: 2896
2002-07-14 23:05:09 +00:00
Chris Lattner 0a30bda280 Convert tabs to spaces
llvm-svn: 2805
2002-06-30 16:04:37 +00:00
Anand Shukla eaa2e7204e changes to make it compatible with 64bit gcc
llvm-svn: 2790
2002-06-25 20:44:04 +00:00
Chris Lattner b469cf8361 Fix constness problems now that the cast operators preserve the constness
of their argument

llvm-svn: 2758
2002-06-05 17:38:28 +00:00
Chris Lattner d5a847057b Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner ca14237696 Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner b0df8fdcb8 Enable better debug output. When debugging the type system, print out the
type tables after reading a bytecode file to make sure they are ok

llvm-svn: 2126
2002-04-07 06:11:22 +00:00
Chris Lattner ff87436f48 s/Method/Function
llvm-svn: 2035
2002-03-29 03:51:11 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner b2b1b3d036 Remove unsized array support
llvm-svn: 1461
2001-12-14 16:30:51 +00:00
Chris Lattner 2413b160ec 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 3462ae3ad7 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner fb5ae02e1a Split the PHINode class out from the iOther.h file into the iPHINode.h file
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner 2263733dcf Implement internal method support
llvm-svn: 1374
2001-11-26 18:56:10 +00:00
Chris Lattner 4f1ca018aa Fix major bugs in type resolution
llvm-svn: 1092
2001-11-03 03:27:53 +00:00
Chris Lattner e3fe1ac4ee Frivolous cleanups
llvm-svn: 973
2001-10-24 06:21:22 +00:00
Chris Lattner 61b665528e Fix another annoying bug that took forever to track down. This one involves abstract type resolution at a bad time that broke symbol tables.
llvm-svn: 958
2001-10-23 01:53:01 +00:00
Chris Lattner 162ed4d6cc Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner fb49fd6642 * Add real support for global variable addresses initializing constants
* Add minor optimization to BytecodeParser::refineAbstractType
* MethodType::get now take an explicit isVarArg parameter
* Fix encoding/decoding of VarArgs calls
* Support the Invoke instruction

llvm-svn: 760
2001-10-13 06:47:01 +00:00
Chris Lattner ad95d1d12f Rename getNullPointer to getNull
llvm-svn: 708
2001-10-03 15:39:24 +00:00
Chris Lattner 7fac070215 * 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 da55810666 Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner 3856934386 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 8f19112923 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 fbdec250b3 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 1f043cd1ba * 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

llvm-svn: 448
2001-09-07 16:37:43 +00:00
Chris Lattner 5bdab0f9ad * 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.

llvm-svn: 323
2001-07-28 17:50:18 +00:00
Chris Lattner 90e0d464ba Add support for extern varargs methods & varargs method calls
llvm-svn: 297
2001-07-25 22:47:55 +00:00
Chris Lattner f435e200b1 Add support to the bytecode reader to recognize floating point constants
llvm-svn: 189
2001-07-15 00:17:18 +00:00
Chris Lattner 4cee8d8ffb 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 2f7c963559 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00