Ruchira Sasanka
74f3230149
LV info on machine instructions
...
llvm-svn: 359
2001-08-20 21:11:01 +00:00
Ruchira Sasanka
8078a494fc
Corrected the compilation error by making the ValOperator class a friend of
...
MachineOperand class - Ruchira
llvm-svn: 358
2001-08-13 16:54:48 +00:00
Vikram S. Adve
bd05af6e92
Can't use ref to stack value!
...
llvm-svn: 354
2001-08-09 20:14:22 +00:00
Vikram S. Adve
5f9e728807
Needed old conditions as well as new in skipToNextVal()!
...
llvm-svn: 353
2001-08-09 19:18:33 +00:00
Vikram S. Adve
36a0da1ec3
Bug fix in ValOpIterator: not moving past operand with NULL Value.
...
llvm-svn: 352
2001-08-08 00:15:42 +00:00
Ruchira Sasanka
a6cea3a426
*** empty log message ***
...
llvm-svn: 351
2001-08-07 21:01:23 +00:00
Ruchira Sasanka
66e8472995
Added isDef field to MachineOperand class - Ruchira
...
llvm-svn: 349
2001-08-07 20:14:30 +00:00
Vikram S. Adve
5a4b37da6b
Use extra operand for instructions that set a CC register that
...
was not explicit before.
llvm-svn: 347
2001-08-06 21:05:39 +00:00
Vikram S. Adve
f3b4b570aa
Allow numOperands of -1 for variable #operands.
...
llvm-svn: 341
2001-07-31 21:55:51 +00:00
Vikram S. Adve
46dd49a011
Allow machine instructions with variable numbers of arguments.
...
This is used only by Phi for now.
llvm-svn: 336
2001-07-31 21:49:28 +00:00
Vikram S. Adve
fc9759c295
Added dummy Phi instruction.
...
llvm-svn: 335
2001-07-31 21:48:23 +00:00
Vikram S. Adve
5e19e64a94
Added class MachineCodeForBasicBlock.
...
llvm-svn: 332
2001-07-30 18:49:07 +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
9554fb6043
Modify var names to make it apparant that the code is really generic
...
llvm-svn: 320
2001-07-28 17:43:45 +00:00
Vikram S. Adve
34059f45b6
Added function printIndent.
...
llvm-svn: 317
2001-07-28 04:41:27 +00:00
Vikram S. Adve
d8415b8fbd
Added a pointer hash function object for use in pointer maps.
...
llvm-svn: 316
2001-07-28 04:41:10 +00:00
Vikram S. Adve
09b706ba67
Make a function const.
...
llvm-svn: 315
2001-07-28 04:40:15 +00:00
Vikram S. Adve
8572e7c133
Added several SPARC instructions including conditional move and SETHI.
...
Added MachineInstrInfo class and subclass UltraSparcInstrInfo.
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo). Latency fields are to support scheduling.
llvm-svn: 313
2001-07-28 04:26:42 +00:00
Vikram S. Adve
b67a683e25
Remove redundant and unused functions.
...
llvm-svn: 312
2001-07-28 04:20:33 +00:00
Vikram S. Adve
ce164753ad
Added MachineInstrInfo class and moved instruction-related members there.
...
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo. Latency fields are to support scheduling.
llvm-svn: 308
2001-07-28 04:09:37 +00:00
Vikram S. Adve
a6bcc3a47e
Eliminate separate enum for operand register type.
...
Use union for alternative data for different operand types.
Add iterator over Value* operands in a MachineInstr.
llvm-svn: 307
2001-07-28 04:06:37 +00:00
Chris Lattner
de56a56bb1
Add an arg to insertVal to allow us to prevent builtin types from being ignored
...
when they are inserted
llvm-svn: 302
2001-07-26 16:28:18 +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
Ruchira Sasanka
12710ee1b2
*** empty log message ***
...
llvm-svn: 291
2001-07-24 17:14:13 +00:00
Chris Lattner
a601339af2
Eliminated the Unique class in favor of NonCopyable and NonCopyableV
...
llvm-svn: 280
2001-07-23 18:26:21 +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
56273c9ec6
Fix coding style issues to actually attempt to be somewhat uniform
...
llvm-svn: 277
2001-07-23 05:03:15 +00:00
Chris Lattner
cbe9215a10
Nonpolymorphic class, doesn't need a virtual dtor!
...
llvm-svn: 276
2001-07-23 03:57:05 +00:00
Chris Lattner
e847a66947
Clean up hash table usage
...
Remove opaque pointer used for C compatibility which isn't an issue
llvm-svn: 275
2001-07-23 03:50:57 +00:00
Chris Lattner
d73669f4c6
Removal of the redundant CompileContext wrapper
...
llvm-svn: 274
2001-07-23 03:09:03 +00:00
Chris Lattner
f42a7804c8
Large scale changes to implement new command line argument facility
...
llvm-svn: 272
2001-07-23 02:35:57 +00:00
Chris Lattner
4e55efa0f2
Add flag for emacs so it realizes it's C++ code
...
llvm-svn: 269
2001-07-22 05:15:16 +00:00
Chris Lattner
c5758cb574
Privatize LLCOptions. It had no business being visible to the entire
...
program.
llvm-svn: 267
2001-07-22 04:40:02 +00:00
Chris Lattner
9f54f76674
Move private header into private directory
...
llvm-svn: 266
2001-07-22 03:59:25 +00:00
Chris Lattner
833a705036
Convert from using C style char*'s to strings.
...
Look ma, no strdups
llvm-svn: 265
2001-07-22 03:57:31 +00:00
Chris Lattner
09dffa5c66
Remove String file some more
...
llvm-svn: 264
2001-07-22 00:46:48 +00:00
Chris Lattner
a1c4c3718f
Destroy the StringUtils.h file
...
llvm-svn: 262
2001-07-22 00:18:10 +00:00
Chris Lattner
9329758c8c
Eliminate lots of unnecessary #includes and forward decls
...
there are probably more to kill
llvm-svn: 261
2001-07-21 23:24:48 +00:00
Chris Lattner
846fdcd762
Exterminate nasty Cisms
...
llvm-svn: 257
2001-07-21 22:42:09 +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
39b84317b3
More minor reorganizations
...
llvm-svn: 251
2001-07-21 20:08:52 +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
3b75503399
Add support for casting operators
...
llvm-svn: 243
2001-07-21 19:10:33 +00:00
Chris Lattner
9f3245e86b
More functionality, renamed API
...
llvm-svn: 241
2001-07-21 19:07:19 +00:00
Chris Lattner
df088cd97d
Moved isIntegral to the Type system
...
Renamed equals(char) to equalsInt(char). Made it a const memfunc
llvm-svn: 240
2001-07-21 19:02:43 +00:00
Vikram S. Adve
e2b9e658b5
General support utilities like a program options class and a StringMap
...
class for mapping strings to arbitrary things.
llvm-svn: 228
2001-07-21 12:40:18 +00:00
Vikram S. Adve
f4b3feecd8
CompileContext and options class for the llc compiler.
...
llvm-svn: 227
2001-07-21 12:39:30 +00:00
Vikram S. Adve
8d5ecffc9a
Header files for the target architecture description and for instruction
...
selection, and instances of these for the SPARC.
llvm-svn: 226
2001-07-21 12:39:03 +00:00
Vikram S. Adve
c91af7439a
Provide simpler ways to extract the value of an integer constant.
...
llvm-svn: 223
2001-07-20 21:11:07 +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
6aec8e1991
Start of expression analysis support
...
llvm-svn: 219
2001-07-20 19:17:55 +00:00
Chris Lattner
af46a1c0af
Header to raise and lower representation
...
llvm-svn: 218
2001-07-20 19:17:47 +00:00
Chris Lattner
680da8ab0d
Add multiply as a supported constant propogation operation
...
Include the LevelChange.h header in AllOpts.h
llvm-svn: 211
2001-07-20 19:14:41 +00:00
Chris Lattner
6e921febad
New function: WriteAsOperand.
...
llvm-svn: 210
2001-07-20 19:14:01 +00:00
Chris Lattner
9a45a59ddd
Add new base class ConstPoolInt, useful for dealing with integral constants
...
llvm-svn: 209
2001-07-20 19:13:28 +00:00
Chris Lattner
bc80631a8e
Add new method, ensureTypeAvailable
...
llvm-svn: 208
2001-07-20 19:13:04 +00:00
Chris Lattner
f31adf9080
Change is*Type to be a casting convertion operator
...
Add a new isIntegral virtual function
llvm-svn: 207
2001-07-20 19:12:34 +00:00
Chris Lattner
2c4346a9bd
Add an function to BinaryOperator to swap the two operands
...
llvm-svn: 206
2001-07-20 19:09:33 +00:00
Chris Lattner
bf1ff2b205
Add short forms of the get*Type methods.
...
llvm-svn: 205
2001-07-20 19:09:11 +00:00
Chris Lattner
c88875a46d
Fixed typo in comment
...
llvm-svn: 201
2001-07-16 16:17:18 +00:00
Chris Lattner
d5633e6177
Rename 'isMethodExternal' to 'isExternal'
...
llvm-svn: 194
2001-07-15 06:35:24 +00:00
Chris Lattner
1d2d13fbd5
Add a function to convert a double to a string
...
llvm-svn: 187
2001-07-15 00:16:38 +00:00
Chris Lattner
82e8e54a80
Add support to write and read a fixed amount of raw data
...
llvm-svn: 186
2001-07-15 00:16:22 +00:00
Chris Lattner
34244ab669
* The parent of a constant pool is a SymTabValue, not a value.
...
llvm-svn: 178
2001-07-14 06:08:51 +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
5df9510721
Made it not inline
...
llvm-svn: 174
2001-07-12 23:35:11 +00:00
Chris Lattner
de099121e9
Add DebugValue global function
...
llvm-svn: 173
2001-07-12 23:33:53 +00:00
Chris Lattner
a36e2a7fbe
hasSideEffects should be marked virtual
...
stores and free's have sideeffects
llvm-svn: 170
2001-07-09 19:38:26 +00:00
Chris Lattner
9373328e93
Fix stupid typo
...
llvm-svn: 168
2001-07-09 16:54:29 +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
246d869f71
Add a new "addOperand" method to User.
...
llvm-svn: 158
2001-07-08 18:38:18 +00:00
Chris Lattner
7a7ddef47e
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +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
cd5bbb0001
Devirtualize User::dropAllReferences
...
llvm-svn: 151
2001-07-07 19:00:36 +00:00
Chris Lattner
9044bfe6a6
Remove dtor's that simply call dropAllReferences
...
llvm-svn: 150
2001-07-07 18:42:52 +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
f084b21644
New file, includes method to merge exit nodes together
...
llvm-svn: 141
2001-07-06 16:57:52 +00:00
Chris Lattner
f1f61a28cc
* Add a DominatorBase base class to maintain root of Dominator info
...
* Implement post dominator support
llvm-svn: 140
2001-07-06 16:57:21 +00:00
Chris Lattner
0cca9fc688
* Added comments
...
* Made iterators inherit from appropriate iterator base class
* Abstracted out graphs from depth first iterator
* Add "Inverse" traversal of CFG
llvm-svn: 139
2001-07-06 16:56:17 +00:00
Chris Lattner
223a2f8df5
IntervalPartition was changed to inherit from vector<Interval*> instead of
...
contain it so that it would have full iterator access without much work.
llvm-svn: 132
2001-07-03 15:28:08 +00:00
Chris Lattner
3fe0657ad9
Checkin of new Analysis result printing header
...
llvm-svn: 130
2001-07-03 05:37:26 +00:00
Chris Lattner
0aeb371764
Remove code for printing out Analysis data structures. It got moved
...
llvm-svn: 128
2001-07-03 05:35:52 +00:00
Chris Lattner
94ca55178d
Update documentation a bit, correct #include guard
...
llvm-svn: 127
2001-07-03 05:35:23 +00:00
Chris Lattner
75057fa064
Enable printing of dominator related information.
...
Theis will eventually be moved!
llvm-svn: 123
2001-07-02 05:45:30 +00:00
Chris Lattner
4a9f31a0a7
Add new anaysis routines for building dominator related information
...
llvm-svn: 122
2001-07-02 05:45:17 +00:00
Chris Lattner
be2224f993
Addition of 'deleter' function.
...
llvm-svn: 121
2001-07-02 01:09:41 +00:00
Chris Lattner
b8dcf545b8
Add prototypes for ADCE pass
...
llvm-svn: 115
2001-06-30 06:37:16 +00:00
Chris Lattner
f214ef4014
Rename DoSparseConditionalConstantProp to DoSCCP
...
llvm-svn: 114
2001-06-30 06:37:01 +00:00
Chris Lattner
5ce7b422a1
Add a new pop_back() method
...
llvm-svn: 111
2001-06-30 04:35:21 +00:00
Chris Lattner
6ba8542caa
The ConstRules class got moved to the opt namespace
...
llvm-svn: 110
2001-06-30 04:35:01 +00:00
Chris Lattner
57248a3460
Add a reduceApply method
...
llvm-svn: 109
2001-06-30 04:34:42 +00:00
Chris Lattner
b94dddaef6
Split AllOpts.h into lots of little .h files.
...
llvm-svn: 108
2001-06-30 04:34:07 +00:00
Chris Lattner
44cd71222f
Added prototype for ConstantFoldTerminator
...
llvm-svn: 105
2001-06-29 23:56:00 +00:00
Chris Lattner
86827f3d2d
Added new removePredecessor method prototype
...
llvm-svn: 99
2001-06-29 05:21:42 +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
726582fa42
* Move stuff around a bit.
...
* Add reduce_apply_bool
llvm-svn: 88
2001-06-27 23:32:12 +00:00
Chris Lattner
8daf407266
Add instructions to fold unary and binary instructions.
...
llvm-svn: 87
2001-06-27 23:31:34 +00:00
Chris Lattner
5cfc551fa2
* Use the new reduce_apply_bool template
...
* Expose Constant Pool Merging from ConstantProp.cpp
* Include definitions for SCCP pass
* InstListType is not neccesary anymore
llvm-svn: 86
2001-06-27 23:31:14 +00:00
Chris Lattner
df93760653
getBasicBlocks() is not needed anymore for reading Method data
...
llvm-svn: 85
2001-06-27 23:30:11 +00:00
Chris Lattner
0bda227de5
Added methods to make dealing with switches and branch instructions
...
more tolerable.
llvm-svn: 84
2001-06-27 23:29:41 +00:00
Chris Lattner
a0b9025a9f
Minor formating changes
...
llvm-svn: 83
2001-06-27 23:29:21 +00:00
Chris Lattner
3bcd915b32
Make a new GenericBinaryInst class, instead of providing lots of silly
...
little classes.
llvm-svn: 82
2001-06-27 23:28:50 +00:00
Chris Lattner
159093b8fe
Add a new slew of functions to allow dynamic_cast<> like operation for
...
upcasting Value's to their subclasses.
llvm-svn: 80
2001-06-27 23:27:42 +00:00
Chris Lattner
b2d6da7f1e
Add extra forwarding accessor methods so that getMethodList(), getBasicBlocks()
...
and getInstList() are obsolete... except for when modifying those lists. This
makes code much more succinct and to the point.
llvm-svn: 79
2001-06-27 23:26:41 +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
fda748370f
Add a helper function bind_obj
...
llvm-svn: 70
2001-06-25 03:54:32 +00:00
Chris Lattner
108acdb1a7
Big changes. Interval*.h is now more or less finalized. IntervalPartition
...
is recoded to use IntervalIterators. IntervalIterators can now maintain
their own memory or let an external entity do it.
Loop depth is a new user of IntervalPartition for calculating the loop
nesting depth of a basic block
TODO: add IntervalPartition capability to split intervals between the looping
portion and the "tail" portion.
llvm-svn: 69
2001-06-25 03:54:14 +00:00
Chris Lattner
61867b5b5d
CFG.h: change the iterator tag
...
Method.h: Add an iterator type.
llvm-svn: 68
2001-06-25 03:52:19 +00:00
Chris Lattner
7841ebeb00
New files due to the Intervals.h splitup
...
llvm-svn: 65
2001-06-24 04:07:37 +00:00
Chris Lattner
4316c524b4
IntervalPartition & IntervalIterator classes have been split out into
...
their own .h files
llvm-svn: 61
2001-06-24 04:05:09 +00:00
Chris Lattner
bafc68aaf9
Addition of IntervalIterator. Preparing for rename of Intervals.h to
...
Interval.h, IntervalPartition.h, and IntervalIterator.h
llvm-svn: 59
2001-06-24 03:22:59 +00:00
Chris Lattner
9e3bd15abf
Add comments
...
Interval::HeaderNode is now accessed thorugh an accessor function
llvm-svn: 55
2001-06-22 02:23:27 +00:00
Chris Lattner
f0a36e647a
Add accessor methods to binary/unary operators
...
Add extra helper methods to PHI class
llvm-svn: 54
2001-06-22 02:21:42 +00:00
Chris Lattner
ec920ae870
New header file defined with neeto utilities put in one place
...
llvm-svn: 50
2001-06-21 05:25:51 +00:00
Chris Lattner
8ec73986f5
Modified to use the new reduce_apply algorithm
...
llvm-svn: 49
2001-06-21 05:25:33 +00:00
Chris Lattner
ffd93e3c15
* Added capability to print out an interval
...
llvm-svn: 48
2001-06-21 05:25:09 +00:00
Chris Lattner
67ccf1f072
* Added comments
...
* Added prototype for new Interval::isLoop method
* Added destructor to free memory
* Added IntervalPartition::isDegeneratePartition method
* Added IntervalPartition::size() method
llvm-svn: 47
2001-06-21 05:24:46 +00:00
Chris Lattner
09e6e27f2c
Add capability to build a derived interval graph
...
llvm-svn: 41
2001-06-20 22:44:32 +00:00
Chris Lattner
1148046a49
Factor the predeclarations of the CFG.h functionality into a seperate, new header
...
file: CFGdecls.h
This allows the addition of BasicBlock::(pred|succ)_iterator typedefs.
llvm-svn: 40
2001-06-20 22:44:16 +00:00
Chris Lattner
70a32da836
Add an optimization stub
...
llvm-svn: 35
2001-06-20 19:26:21 +00:00
Chris Lattner
f2a293a07b
New file: Interval analysis support
...
llvm-svn: 34
2001-06-20 19:26:12 +00:00
Chris Lattner
ecf2e5ecf3
Implement support for writing VCG format output
...
llvm-svn: 28
2001-06-13 19:55:13 +00:00
Chris Lattner
4309ac0cb1
Move contents to the cfg namespace.
...
Implement post order and reverse post order iterators
llvm-svn: 27
2001-06-13 19:55:02 +00:00
Chris Lattner
c819db7005
Updates to support
...
* Changes in PHI node structure
* Fix to Predecessor iterator
llvm-svn: 23
2001-06-11 15:04:06 +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
33c5fbdc91
Beautify the source a bit.
...
llvm-svn: 19
2001-06-08 21:07:26 +00:00
Chris Lattner
c66bfe1b1e
Include support for reverse iteration.
...
llvm-svn: 18
2001-06-08 20:52:54 +00:00
Chris Lattner
9839031654
Added reverse depth first capability, fixed depth first capability
...
llvm-svn: 16
2001-06-08 00:35:14 +00:00
Chris Lattner
cfdf8c6be1
Moved iterators to the new CFG.h file.
...
llvm-svn: 14
2001-06-07 21:18:35 +00:00
Chris Lattner
741fb756ab
New file
...
llvm-svn: 13
2001-06-07 21:18:08 +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