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
23379a852e
Implement TODO for better diagnostic output
...
llvm-svn: 1859
2002-03-11 22:12:39 +00:00
Chris Lattner
d9558891af
Fix bug: test/Regression/2002-03-08-NameCollision2.ll
...
llvm-svn: 1839
2002-03-08 19:11:42 +00:00
Chris Lattner
c49eff8d4b
Fix minor memory leak
...
llvm-svn: 1837
2002-03-08 18:57:56 +00:00
Chris Lattner
49c5f320ff
Fix for: test/Regression/Assembler/2002-03-08-NameCollision.ll
...
llvm-svn: 1836
2002-03-08 18:41:32 +00:00
Chris Lattner
ec7118a6aa
Close input file if exception is thrown
...
llvm-svn: 1784
2002-02-20 18:06:43 +00:00
Chris Lattner
1b91bcee90
Change to verifier interface
...
llvm-svn: 1782
2002-02-20 17:56:02 +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
a1ba456c49
* Fix cases where we were calling Type->getName() instead of Type->getDescription()
...
* Remove unsized array support
* Malloc/alloca do not require that the first element be an unsized array to be an
array allocation
llvm-svn: 1458
2001-12-14 16:28:42 +00:00
Chris Lattner
d865a13064
Allow hyphens in identifier names
...
llvm-svn: 1409
2001-12-04 04:31:30 +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
bcf2df7058
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
463cc31132
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
2a1613d3b2
Implement support for internal methods
...
llvm-svn: 1373
2001-11-26 18:54:16 +00:00
Chris Lattner
a459583ba8
Implement array indexing with uints
...
llvm-svn: 1336
2001-11-26 16:54:11 +00:00
Chris Lattner
8573672b7f
Improve some debugging code
...
llvm-svn: 1088
2001-11-02 07:46:26 +00:00
Chris Lattner
5ee08db6ce
Support floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
...
llvm-svn: 1087
2001-11-01 22:06:08 +00:00
Chris Lattner
3ab6c706d5
Negative FP constants... whodathunkit.
...
llvm-svn: 963
2001-10-23 04:13:01 +00:00
Chris Lattner
92f2a6ec9a
Remove ugly subclass of Opaque type
...
llvm-svn: 936
2001-10-22 06:01:08 +00:00
Chris Lattner
ee608fe298
Fix bug with
...
%list = type {%list *}
%list = type {%list *}
not being accepted (broken testmisc.ll)
llvm-svn: 935
2001-10-22 05:56:09 +00:00
Chris Lattner
8acdb272f4
Two changes:
...
1. Delete type handle regardless of whether a collision occured
2. Remove a MAJOR pessimization of runtime performance (thought be be an optimization at the time).
This second one was causing a 105k llvm file (from gcc) to parse in 58 seconds... without the
'optimization' it now parses in 3.64 seconds. I suck.
llvm-svn: 933
2001-10-21 23:02:41 +00:00
Chris Lattner
a5248f25c9
Fix bug caused by:
...
%list = type opaque
%list = type %list
llvm-svn: 931
2001-10-21 21:43:25 +00:00
Chris Lattner
03e692a51b
Add support for And, XOR, and Or
...
llvm-svn: 924
2001-10-20 09:32:59 +00:00
Chris Lattner
8c57784273
It is valid to have unsigned arrays as constants... the linker may initialize them later
...
llvm-svn: 923
2001-10-20 06:43:05 +00:00
Chris Lattner
66ccdebe53
Simplify some code
...
Remove Method special case
Fix bug exposed by this testcase:
implementation
void "PtrFunc2"()
begin
bb1:
%reg = add int(int)* null, null
add int (int)* %reg, null
ret void
end
llvm-svn: 852
2001-10-16 19:54:17 +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
be0be88441
* Add support for forward references of global variable addresses
...
* Add support for numeric global variable addresses
* Clean up getVal function by refactoring it into several smaller functions
* MethodTypes are now specified with an explicit isVarArg parameter
* Break ValueRef into ConstValueRef & SymbolicValueRef components
* Add support for the new Invoke instruction
* Fix a few broken calls to Type::getName instead of Type::getDescription
llvm-svn: 758
2001-10-13 06:41:08 +00:00
Chris Lattner
78b565249f
Add operator< to ValID's so that they can be put in map's
...
llvm-svn: 757
2001-10-13 06:37:47 +00:00
Chris Lattner
61fcf0014d
Remove exception specification
...
llvm-svn: 756
2001-10-13 06:37:27 +00:00
Chris Lattner
ec2d56a673
Support the new Invoke instruction
...
llvm-svn: 755
2001-10-13 06:37:14 +00:00
Chris Lattner
7a732d2a43
Add comment
...
llvm-svn: 712
2001-10-03 19:35:57 +00:00
Chris Lattner
4b2e88eac3
Support multiple global's definitions
...
llvm-svn: 711
2001-10-03 19:35:04 +00:00
Chris Lattner
db52bbed27
Allow duplicate constant values as long as they are compatible.
...
Clean up stuff a little bit with inMethod/ModuleContext functions
llvm-svn: 707
2001-10-03 15:39:04 +00:00
Chris Lattner
a6c7a3f199
Add check to make sure that we dont reference MEthodType's directly
...
llvm-svn: 704
2001-10-03 14:59:05 +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
af910dda17
First try at a horrible global value reference wrapper
...
llvm-svn: 701
2001-10-03 06:12:09 +00:00
Chris Lattner
510a74e27d
Clean up parser, fix a bug that prevented this from working:
...
%ListNode3 = global %list { %list* null, int 4 }
because %list is name and the parser expected a literal {..} type there.
In addition, simplified rules that the fix (Allow any Types there, not just a StructType)
made obsolete. Simplified type propogation a bit.
llvm-svn: 700
2001-10-03 03:19:33 +00:00
Chris Lattner
77d303815e
* Add support for null as a constant
...
* Allow multiple definitions of a type with the same name as long as they are the same type
* Eagerly resolve types to allow #2 to work instead of after the whole const pool has been processed
* Change grammar to require a const before a local constant definition
llvm-svn: 699
2001-10-03 01:49:25 +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
9b45b18404
Pull iterators out of CFG.h and CFGdecls and put them in Support directory
...
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
e5750a063d
Remove the unsized array constraint
...
llvm-svn: 599
2001-09-18 04:38:32 +00:00
Chris Lattner
0dfd40e910
Add support for global constants, and for initializers for constants
...
Clean up parser somewhat by factoring out freeing of ID's into setname function
llvm-svn: 597
2001-09-18 04:00:54 +00:00
Chris Lattner
7310978a8b
Update to use correct type cast
...
llvm-svn: 536
2001-09-10 20:08:08 +00:00
Chris Lattner
9d1629d688
Implement global variable support
...
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
b8f60e50f3
* Add support for forward referencing types
...
* Add support for upreferences for recursive types
* Remove support for ConstantPool.h
* Add support for globally unique Constants
* Add support for the opaque type
llvm-svn: 446
2001-09-07 16:35:17 +00:00
Chris Lattner
1a53e079fd
Add support for forward referencing types
...
llvm-svn: 445
2001-09-07 16:33:01 +00:00
Chris Lattner
f590e0c914
Add support for an opaque type
...
llvm-svn: 444
2001-09-07 16:32:43 +00:00
Chris Lattner
c6b1a790d1
* Enable the use of escaped literal strings
...
* Unresolved variable names now have the correct line number for their
error messages
* Rename Def* to Value*
* Check for symbol table collisions before inserting values
* Remove the STRING keyword
* Enable the use of string literals to initialize constant arrays
* Enable the use of extended constants in more locations: eg ret [int] [4, 5]
* Allow method prototypes to appear in the constant pool of the program
* Support varargs methods better. Enable varargs methods with 0 fixed
arguments
* Allow the entire method prototype to optionally be specified in a call inst
llvm-svn: 321
2001-07-28 17:48:55 +00:00
Chris Lattner
66dd058589
Refactor some of the constant stuff so that we can return complex constant
...
values directly. This was causing test failures. :(
llvm-svn: 304
2001-07-26 16:29:15 +00:00
Chris Lattner
8cae208dfb
Add support for extern varargs methods & varargs method calls
...
Remove tool generated files
llvm-svn: 296
2001-07-25 22:47:46 +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
350f414175
Remove dependence on command line library. Silly anyway.
...
llvm-svn: 271
2001-07-22 18:36:00 +00:00
Chris Lattner
8b78573709
Add a comment.
...
llvm-svn: 212
2001-07-20 19:15:08 +00:00
Chris Lattner
bb3f9b179a
Implement forward/external declarations for methods. Also, emit an error if a method
...
is defined more than once, instead of crashing.
llvm-svn: 195
2001-07-15 06:35:53 +00:00
Chris Lattner
c245dabe0a
Add support to the parser to recognize floating point constants
...
llvm-svn: 188
2001-07-15 00:17:01 +00:00
Chris Lattner
29a84291e0
Added some comments, preparing to add global variables and method prototypes
...
llvm-svn: 179
2001-07-14 06:10:16 +00:00
Chris Lattner
b3b40bc8b9
Make sure that types go in the constant pool if they are used.
...
llvm-svn: 171
2001-07-09 19:38:36 +00:00
Chris Lattner
6065e61656
Implementation of Store & GetElementPtr
...
llvm-svn: 164
2001-07-08 23:22:50 +00:00
Chris Lattner
dccda26cd8
Implemented shl, shl, & load instructions
...
llvm-svn: 161
2001-07-08 21:10:27 +00:00
Chris Lattner
3473967aeb
Moved Cast from being a Unary instruction to being an "Other" instruction
...
llvm-svn: 160
2001-07-08 19:03:27 +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
bb2985b84d
Changed memory reference instructions to store the result as the implicit
...
type of the instruction.
llvm-svn: 148
2001-07-07 08:36:30 +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
287398c2a9
Renamed get.*Operator to create seeing that it would have to be qualified
...
with the classname anyways.
llvm-svn: 74
2001-06-25 07:31:31 +00:00
Chris Lattner
88f6f66802
Updates to support
...
* Changes in PHI node structure
* Change to PHI syntax
llvm-svn: 24
2001-06-11 15:04:20 +00:00
Chris Lattner
11c3121788
Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
...
to the UnaryOperator class (from the Instruction class).
llvm-svn: 21
2001-06-08 21:30:13 +00:00
Chris Lattner
e6b9b382e2
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00