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
d6a98c11bc
Chris seems fond of #include <vector>. Fix these. Also convert use list in
...
Value to a vector instead of a list.
Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling
llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
ea511697dd
Use correct style casts
...
llvm-svn: 545
2001-09-10 20:11:44 +00:00
Chris Lattner
c5adfbc219
Use correct style casts
...
Types are not all constant now
llvm-svn: 544
2001-09-10 20:11:28 +00:00
Chris Lattner
0631fccc21
Add support for printing globals
...
llvm-svn: 537
2001-09-10 20:08:19 +00:00
Chris Lattner
9d1629d688
Implement global variable support
...
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
0754f2306a
Remove the definitions of 3 global functions that don't belong in the core
...
llvm-svn: 526
2001-09-09 23:02:07 +00:00
Chris Lattner
9985e9db71
Rename contype to subtype
...
llvm-svn: 522
2001-09-09 22:26:58 +00:00
Chris Lattner
4bb7fcff1b
Rename file to be consistent with header name
...
llvm-svn: 519
2001-09-09 21:59:43 +00:00
Chris Lattner
45768e6fe5
Clean up Type class by removing mutable ConstRules member and use annotations insead
...
llvm-svn: 516
2001-09-09 21:02:38 +00:00
Chris Lattner
91858f96f2
Clean up ConstRules stuff to use annotations instead of a mutable member in Type
...
llvm-svn: 515
2001-09-09 21:01:20 +00:00
Chris Lattner
9570fbc913
Moved functionality into the other constant pool stuff
...
llvm-svn: 477
2001-09-07 18:00:19 +00:00
Chris Lattner
078b48a3f4
Cleanup
...
llvm-svn: 467
2001-09-07 16:57:29 +00:00
Chris Lattner
1dd250de63
Support abstract types
...
Remove constant pool support
llvm-svn: 466
2001-09-07 16:57:07 +00:00
Chris Lattner
873e0fdbf9
Support a abstract, opaque, and recursive types
...
Remove lockty, remove fillerty
Make type lookup more efficient
Support shared generic factory code
llvm-svn: 465
2001-09-07 16:56:42 +00:00
Chris Lattner
daf98ba299
Types and constnats are wierd objects in the symtabs
...
Support abstract types in symtab
llvm-svn: 464
2001-09-07 16:48:17 +00:00
Chris Lattner
e3a3aa89f3
Modules must have a valid, nonnull type. Make them void
...
llvm-svn: 463
2001-09-07 16:47:42 +00:00
Chris Lattner
aeaeab832b
Support new setName interface
...
llvm-svn: 462
2001-09-07 16:47:18 +00:00
Chris Lattner
0e510b8267
* Support new setname interface
...
* Add assertion for sanity checking
llvm-svn: 461
2001-09-07 16:47:03 +00:00
Chris Lattner
9c4eb70eae
* Cnstants are now global objects
...
* ConstantPools no longer exist
* Constants are global objects in the LLVM system
* Constants are structurally equilivant if they are pointer equilivant
* Support abstract & opaque types
* Support setName on constants even though they don't track names
* Constnats don't get copy ctors anymore
* ConstPoolVal::equals is no longer useful [use ptr equivalency]
* Support generic factory classes to create and maintain constants
llvm-svn: 460
2001-09-07 16:46:31 +00:00
Chris Lattner
d2c013e34c
Support new setName itf
...
llvm-svn: 459
2001-09-07 16:44:17 +00:00
Chris Lattner
652b08d465
* Support global constants
...
* Eliminate need for constant pool
llvm-svn: 451
2001-09-07 16:40:34 +00:00
Chris Lattner
c189163d03
* Assembly writer is not a module analyzer anymore
...
* There is no constant pool anymore
llvm-svn: 447
2001-09-07 16:36:04 +00:00
Chris Lattner
fddd7fbc2c
Remove #include of nonexistant header file
...
llvm-svn: 443
2001-09-07 16:32:10 +00:00
Chris Lattner
35ea5501a8
* 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
llvm-svn: 442
2001-09-07 16:31:52 +00:00
Vikram S. Adve
4c03772b2a
*** empty log message ***
...
llvm-svn: 390
2001-08-28 22:35:21 +00:00
Chris Lattner
eaebbaf5bc
Remove target specific stuff from Type classes
...
llvm-svn: 383
2001-08-27 15:52:13 +00:00
Chris Lattner
3b527dd79e
Remove target specific method from MemAccessInst class
...
llvm-svn: 382
2001-08-27 15:51:43 +00:00
Chris Lattner
a6357a1101
Make sure noone branches to the entry node of the method
...
llvm-svn: 369
2001-08-24 14:56:34 +00:00
Chris Lattner
b2c70da37a
Handle case where there is no exit node from a flowgraph
...
llvm-svn: 365
2001-08-23 17:07:19 +00:00
Chris Lattner
5882b500cf
Changed an assertion message
...
llvm-svn: 364
2001-08-23 17:06:38 +00:00
Vikram S. Adve
a91d7cb350
Added vector of machine instructions for the basic block.
...
llvm-svn: 330
2001-07-30 18:47:24 +00:00
Chris Lattner
75298e1fd2
Remove some gross stuff
...
llvm-svn: 328
2001-07-28 17:52:53 +00:00
Chris Lattner
d22d55b65a
Allow vararg method types with 0 fixed types
...
llvm-svn: 327
2001-07-28 17:52:35 +00:00
Chris Lattner
b3d06b4ec9
Make error msg nicer
...
llvm-svn: 326
2001-07-28 17:52:14 +00:00
Chris Lattner
92c31e1634
* Fix bugs
...
llvm-svn: 322
2001-07-28 17:49:02 +00:00
Chris Lattner
55c9388cc7
Don't write out constants that do not have a name, they will be inlined.
...
llvm-svn: 305
2001-07-26 16:29:38 +00:00
Chris Lattner
5a8abf8a9a
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.
llvm-svn: 303
2001-07-26 16:28:37 +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
f1a2e3b6bb
Renamed include/llvm/Codegen to include/llvm/CodeGen
...
llvm-svn: 253
2001-07-21 20:58:30 +00:00
Chris Lattner
1104f35aaf
Fix code to be in a consistent style
...
llvm-svn: 252
2001-07-21 20:09:07 +00:00
Chris Lattner
7482575151
Remove getTempValuesForMachineCode from the Instruction interface
...
to remove dependency on <vector>
llvm-svn: 250
2001-07-21 20:04:10 +00:00
Chris Lattner
bf2c12c224
Add new ctor for ConstPoolBool
...
llvm-svn: 246
2001-07-21 19:16:08 +00:00
Chris Lattner
76e199ffd2
Add new constructor for const pool bool
...
llvm-svn: 245
2001-07-21 19:15:26 +00:00
Chris Lattner
45cddb6e02
Add support for casts
...
llvm-svn: 244
2001-07-21 19:10:49 +00:00
Vikram S. Adve
a72bdbe37a
Utility routines for simpler access to the value of an integer constant.
...
llvm-svn: 236
2001-07-21 12:44:00 +00:00
Vikram S. Adve
0025c5f58a
Add isIntegral() method to SignedIntType and UnsignedIntType.
...
llvm-svn: 224
2001-07-21 12:32:48 +00:00
Vikram S. Adve
10973f75ab
Compute and cache information about the storage size and layout
...
of structures. This information is machine-dependent.
llvm-svn: 222
2001-07-20 21:09:17 +00:00
Vikram S. Adve
0d8d2f87a3
Provide uniform access to the pointer operand and to the index
...
operands (if any) for different types of MemAccessInst's.
llvm-svn: 221
2001-07-20 21:07:06 +00:00
Vikram S. Adve
cec502cb48
Added a representation of the machine instructions generated
...
for a VM instruction.
llvm-svn: 220
2001-07-20 21:05:02 +00:00
Chris Lattner
b6d8fb9977
Implement ensureTypeAvailable
...
Implement ConstPoolInt class
llvm-svn: 215
2001-07-20 19:16:02 +00:00
Chris Lattner
510fc61456
Add support for constant propogation of multiplies
...
llvm-svn: 214
2001-07-20 19:15:36 +00:00
Chris Lattner
a2122c28d0
Factor out WriteAsOperand.
...
llvm-svn: 213
2001-07-20 19:15:21 +00:00
Chris Lattner
5c33905f73
Implement forward/external declarations for methods.
...
llvm-svn: 196
2001-07-15 06:35:59 +00:00
Chris Lattner
444b28658f
Add support for assembly printing fp constants
...
llvm-svn: 191
2001-07-15 00:18:39 +00:00
Chris Lattner
d3e41d4d2f
* ValueHolder now takes 3 arguments
...
* Added a few methods to ConstantPool
* ConstPoolVal no longer derives from Value
* Method & Module multiply inherit from SymTabValue & Value now
* Added a GetElementPtrInst::isStructSelector() method
llvm-svn: 184
2001-07-14 06:13:19 +00:00
Chris Lattner
f7499bce49
The parent of a constant pool is a symtabvalue, not a value.
...
llvm-svn: 180
2001-07-14 06:10:33 +00:00
Chris Lattner
8131335c27
Made the following changes:
...
* ValueHolder became a 3 argument template. This allows for BasicBlock to
use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Module does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction
llvm-svn: 177
2001-07-14 06:07:58 +00:00
Chris Lattner
fcdbcb6ac1
Add DebugValue member.
...
llvm-svn: 175
2001-07-12 23:35:26 +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
223ea549d1
Fixed post dominator frontiers! Yaay!
...
llvm-svn: 157
2001-07-08 05:54:09 +00:00
Chris Lattner
7a7ddef47e
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
f4e2bb21f7
Removing unnecesary file
...
llvm-svn: 154
2001-07-07 20:54:19 +00:00
Chris Lattner
1619a709b4
Convert BinaryOperand and UnaryOperator to only take instruction types of
...
the appropriate enum
llvm-svn: 153
2001-07-07 20:17:23 +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
2758aa5683
Fixed some error messages to be nicer
...
llvm-svn: 147
2001-07-07 08:36:05 +00:00
Chris Lattner
a8e840fc9b
Implement support for postdominators, except in dom frontiers
...
llvm-svn: 142
2001-07-06 16:58:22 +00:00
Chris Lattner
2dd269d8db
Checkin of new dominator calculation routines. These will be improved in
...
the future to do post dominators and stuff
llvm-svn: 124
2001-07-02 05:46:38 +00:00
Chris Lattner
0815f96a2f
Optimizations got their own header files
...
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations
llvm-svn: 113
2001-06-30 04:36:40 +00:00
Chris Lattner
a0a97d7bbd
Implement reduceApply method
...
llvm-svn: 112
2001-06-30 04:35:40 +00:00
Chris Lattner
5ce7b422a1
Add a new pop_back() method
...
llvm-svn: 111
2001-06-30 04:35:21 +00:00
Chris Lattner
806b7ff4be
Add a check to avoid allowing V->replaceAllUsesWith(V)
...
llvm-svn: 104
2001-06-29 05:25:51 +00:00
Chris Lattner
09a1ba491b
Add implementation of BasicBlock::removePredecessor code that was factored
...
out of DCE.cpp
llvm-svn: 103
2001-06-29 05:25:23 +00:00
Chris Lattner
e445514d62
Added a note about a new verification the verifier should do
...
Removed a redundant check
llvm-svn: 100
2001-06-29 05:22:12 +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
747dcc99bc
Change to use the new GenericBinaryInst class. Support lots more operators.
...
llvm-svn: 92
2001-06-27 23:36:49 +00:00
Chris Lattner
3ecce840dc
Convert postincrements to more efficient preincrements
...
llvm-svn: 81
2001-06-27 23:28:02 +00:00
Chris Lattner
c129381d15
Moved UnaryOperator::create to InstrTypes.cpp until there is an iUnaryOps.cpp
...
Moved BinaryOperator::create to iBinaryOperators.cpp
Add getUniqueName to SymbolTable
llvm-svn: 76
2001-06-25 07:33:13 +00:00
Chris Lattner
b408df97c8
* Rename get.*Operator to create seeing that it would have to be qualified
...
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder
llvm-svn: 73
2001-06-25 07:31:05 +00:00
Chris Lattner
86182934b5
Add a space to the PHI node output code to make it look nicer
...
llvm-svn: 53
2001-06-21 05:29:56 +00:00
Chris Lattner
a6d2f96bdb
Updates to support
...
* Changes in PHI node structure
llvm-svn: 25
2001-06-11 15:04:40 +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
f6941c0602
Add extra method to PHI node class
...
llvm-svn: 11
2001-06-07 16:59:37 +00:00
Chris Lattner
f2f80282cb
Fixed to print slightly differently. Added use counts for labels
...
llvm-svn: 9
2001-06-07 16:58:55 +00:00
Chris Lattner
0dcec884f6
Fixes for BB iterators, additional methods added for DCE pass
...
llvm-svn: 8
2001-06-07 16:58:36 +00:00
Chris Lattner
e6b9b382e2
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00