Commit Graph

7859 Commits

Author SHA1 Message Date
Chris Lattner
19f31f28d8 More functionality, renamed API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:07:19 +00:00
Vikram S. Adve
8ee0064983 Utility routines for simpler access to the value of an integer constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:44:00 +00:00
Vikram S. Adve
6beedac106 Program options class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:43:07 +00:00
Vikram S. Adve
a21cf20411 Description of the SPARC as a target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:42:19 +00:00
Vikram S. Adve
daae69927f Base clas for a description of a target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:42:08 +00:00
Vikram S. Adve
70bc4b5d1a Instruction selection via pattern matching on instruction trees using BURG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:41:50 +00:00
Vikram S. Adve
05f4745c01 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:41:01 +00:00
Vikram S. Adve
4e1aeca8c9 Added CodeGen, LLC, and Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:40:37 +00:00
Vikram S. Adve
a4e6f88fbb Add isIntegral() method to SignedIntType and UnsignedIntType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:32:48 +00:00
Vikram S. Adve
d01d99b2a0 Compute and cache information about the storage size and layout
of structures.  This information is machine-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:09:17 +00:00
Vikram S. Adve
6575a1d134 Provide uniform access to the pointer operand and to the index
operands (if any) for different types of MemAccessInst's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:07:06 +00:00
Vikram S. Adve
3344615555 Added a representation of the machine instructions generated
for a VM instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:05:02 +00:00
Chris Lattner
369bbeb62c Start of expression analysis support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:17:55 +00:00
Chris Lattner
37bf6308ab Implement ensureTypeAvailable
Implement ConstPoolInt class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:16:02 +00:00
Chris Lattner
b5bcbc3bef Add support for constant propogation of multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:15:36 +00:00
Chris Lattner
622f740a7d Factor out WriteAsOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:15:21 +00:00
Chris Lattner
698b56e690 Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:15:08 +00:00
Chris Lattner
a137f87051 Add multiply as a supported constant propogation operation
Include the LevelChange.h header in AllOpts.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:14:41 +00:00
Chris Lattner
7f6330c743 Fix nasty typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 04:39:07 +00:00
Chris Lattner
bc7135f5c0 Support external methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 21:43:45 +00:00
Chris Lattner
739a56d26d Implement forward/external declarations for methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 06:35:59 +00:00
Chris Lattner
e181564419 Implement forward/external declarations for methods. Also, emit an error if a method
is defined more than once, instead of crashing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 06:35:53 +00:00
Chris Lattner
a59c266d84 Add support for assembly printing fp constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:18:39 +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
3d52b2fdcc Add support to the parser to recognize floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:17:01 +00:00
Chris Lattner
a3d3c2b645 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:13:19 +00:00
Chris Lattner
3b7bfdb201 Add knowledge about the struct form of the GetElementPtr instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:11:51 +00:00
Chris Lattner
20a155f5ab Remove dependency on the structure of ValueHolder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:11:26 +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
54d56e3a99 The parent of a constant pool is a symtabvalue, not a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:10:33 +00:00
Chris Lattner
e98dda6d42 Added some comments, preparing to add global variables and method prototypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:10:16 +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
dc4c3f2f5f 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:07:58 +00:00
Chris Lattner
d8c2e42aef Add DebugValue member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-12 23:35:26 +00:00
Chris Lattner
c262f7298f Don't clean out the type plane of the constant pool... this is a hack. FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-09 19:38:52 +00:00
Chris Lattner
8896eda9a9 Make sure that types go in the constant pool if they are used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-09 19:38:36 +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
0bd654a049 Implement checking for new instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 21:18:49 +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
72f1e9929a Use the CDG to mark branches alive on demand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 18:38:36 +00:00
Chris Lattner
3590830cef Fixed post dominator frontiers! Yaay!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 05:54:09 +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
6bcc03143b Removing unnecesary file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 20:54:19 +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
f0d0e9c262 Changed memory reference instructions to store the result as the implicit
type of the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 08:36:30 +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
63a0b2a9b4 Add method to unify all exit nodes of a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:58:36 +00:00
Chris Lattner
94108ab8a3 Implement support for postdominators, except in dom frontiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:58:22 +00:00
Chris Lattner
d818312d09 Update to include right file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:32:07 +00:00
Chris Lattner
e6850235f5 IntervalPartition was changed to inherit from vector<Interval*> instead of
contain it so that it would have full iterator access without much work.

Writer includes code to print out IntervalPartition's now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-03 15:28:35 +00:00
Chris Lattner
3d98049e38 Code got moved from the lib/Assembly/Writer/IntervalWriter.cpp file to
here.  Updates to correct description n stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-03 05:36:34 +00:00
Chris Lattner
347bfdad7f Add printing code for dominator info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 05:46:47 +00:00
Chris Lattner
1715229db9 Checkin of new dominator calculation routines. These will be improved in
the future to do post dominators and stuff


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 05:46:38 +00:00
Chris Lattner
bd4996ad68 Moved deleter to include/llvm/Tools/STLExtras.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 01:08:08 +00:00
Chris Lattner
02e90d59c8 Initial checkin. Should print dead instructions, except it doesn't do
control dependencies.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 06:39:11 +00:00
Chris Lattner
49c8f64747 Rename DoSparseConditionalConstantProp -> DoSCCP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 06:37:43 +00:00
Chris Lattner
7e02b7e600 Optimizations got their own header files
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:36:40 +00:00
Chris Lattner
28bf86ac00 Implement reduceApply method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:35:40 +00:00
Chris Lattner
a7e26118a2 Add a new pop_back() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:35:21 +00:00
Chris Lattner
50d0b7ec3f Split AllOpts.h into lots of little .h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:34:07 +00:00
Chris Lattner
2b05880476 Export ConstantFoldTerminator, allow it to fold conditional branches to
the same label.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 23:56:58 +00:00
Chris Lattner
cb056de508 Added documentation. Constant fold terminators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 23:56:23 +00:00
Chris Lattner
7b8ec2d752 Add a check to avoid allowing V->replaceAllUsesWith(V)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:25:51 +00:00
Chris Lattner
b47af25099 Add implementation of BasicBlock::removePredecessor code that was factored
out of DCE.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:25:23 +00:00
Chris Lattner
25d17a5001 * Factored RemovePredecessorFromBlock into BasicBlock::removePredecessor
* Avoid messing around with this case:
  br label %A
%A:  br label %A
* Enable optimizations that are correct now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:24:28 +00:00
Chris Lattner
bca26a4c6b We need to make sure to remove PHI nodes in the successor that cannot be
executed when removing branch dest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:23:10 +00:00
Chris Lattner
1be1d79a1d Added a note about a new verification the verifier should do
Removed a redundant check


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:22:12 +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
138a124f09 Add a new Sparse Conditional Constant Propogation pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:38:11 +00:00
Chris Lattner
8a36b31e1a Change to use the new GenericBinaryInst class. Support lots more operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:36:49 +00:00
Chris Lattner
3b34c59dcb Misc cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:36:09 +00:00
Chris Lattner
531450d8a6 * Expose DoConstantPoolMerging
* Cleanups (post->pre increment, new cleaner API, etc)
* Moved stuff into ConstantHandling.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:35:26 +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
6bb09d96a0 Add instructions to fold unary and binary instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:31:34 +00:00
Chris Lattner
17262f7784 Convert postincrements to more efficient preincrements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:28:02 +00:00
Chris Lattner
20554f11d0 Moved UnaryOperator::create to InstrTypes.cpp until there is an iUnaryOps.cpp
Moved BinaryOperator::create to iBinaryOperators.cpp
Add getUniqueName to SymbolTable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:33:13 +00:00
Chris Lattner
d473a0acc4 Implement induction variable injection!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:32:19 +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
3bcd6394ec * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:31:05 +00:00
Chris Lattner
53b1c0161d A silly stupid test of the loop depth calculator was added. REMOVE in the
future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 03:55:37 +00:00
Chris Lattner
23e36625a2 IntervalPartition: recode to use IntervalIterator to do all the work
LoopDepth.cpp: new file that calculates the depth of a loop, using
IntervalPartitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 03:55:04 +00:00
Chris Lattner
2d676c961e New file due to the Intervals.h splitup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 04:07:44 +00:00
Chris Lattner
c9f39b26c0 #include a different header due to Intervals.h splitting up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 04:05:45 +00:00
Chris Lattner
107109c2cd IntervalPartition & IntervalIterator classes have been split out into
their own .h files & .cpp file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 04:05:21 +00:00
Chris Lattner
a0eb461263 Prepare for split between Interval, IntervalIterator, and IntervalIPartition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 03:25:01 +00:00
Chris Lattner
364b147a0f Implement a lot more functionality. Now loop invariant and linear
induction variables are correctly identified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-22 02:24:38 +00:00
Chris Lattner
a4ef933a04 Interval::HeaderNode is now accessed thorugh an accessor function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-22 02:23:39 +00:00
Chris Lattner
28d480b316 Add a space to the PHI node output code to make it look nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:29:56 +00:00
Chris Lattner
da956802bd Moved printing code to the Assembly/Writer library.
Code now detects looping intervals


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:27:22 +00:00
Chris Lattner
1c54f1da79 Implement the new Interval::isLoop method
Implement destructor to free memory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:26:15 +00:00
Chris Lattner
5ef7afb011 Get rid of a silly printout that isn't needed right now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 23:09:39 +00:00
Chris Lattner
568320595c Add capability to print a derived interval graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 22:44:38 +00:00
Chris Lattner
ed465bc265 Add capability to build a derived interval graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 22:44:32 +00:00
Chris Lattner
2275c1d55d Initial Checking of Interval handling code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 20:09:55 +00:00
Chris Lattner
d213f0f3a1 Add a test case for interval code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 19:27:11 +00:00
Chris Lattner
d36c91c9c6 Updates to work with new cfg namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-13 19:55:22 +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
c24d2088dc Updates to support
* Changes in PHI node structure
* Change to PHI syntax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-11 15:04:20 +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
dac6dda315 Updated to work with new CFG.h file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 21:18:45 +00:00
Chris Lattner
b0b0aa3849 Add extra method to PHI node class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:59:37 +00:00
Chris Lattner
f155e13092 Significant rework. DCE is still not done (see #ifdef'd out parts)
but at least the stuff that is checked in, now works.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:59:26 +00:00
Chris Lattner
b9a4578df5 Fixed to print slightly differently. Added use counts for labels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:58:55 +00:00
Chris Lattner
bbcfc51f3b Fixes for BB iterators, additional methods added for DCE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:58:36 +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