Chris Lattner
aaf425bb4d
Always create a shadow node for a store instruction, even if it's storing
...
a scalar value. Likewise for load instructions.
llvm-svn: 2990
2002-07-22 16:35:53 +00:00
Chris Lattner
f5cad15a67
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Chris Lattner
341ce63dd4
Convert Command Line option handling code to use the CommandLine 2.0 interface
...
llvm-svn: 2983
2002-07-22 02:08:59 +00:00
Chris Lattner
6635edfee4
Print the contents, not the pointer...
...
llvm-svn: 2981
2002-07-22 02:06:50 +00:00
Chris Lattner
20695cba3c
Ignore some common varargs functions.
...
llvm-svn: 2973
2002-07-19 18:11:43 +00:00
Chris Lattner
b6d2dc48c9
* Inline CopyFunctionCallsList
...
* Don't clone OrigCallList
* Rename removeDeadNodes -> removeTriviallyDeadNodes
* Implement new removeDeadNodes method
llvm-svn: 2970
2002-07-18 18:22:40 +00:00
Chris Lattner
4f99733c8c
Rename removeDeadNodes to removeTriviallyDeadNodes
...
llvm-svn: 2969
2002-07-18 18:19:09 +00:00
Vikram S. Adve
94c8e5da41
Add support for a top-down propagation pass:
...
-- Save a copy of the original call nodes in DSGraph before inlining bottom-up.
-- Also, save a list of the callers of each function in DSGraph.
llvm-svn: 2966
2002-07-18 16:13:52 +00:00
Vikram S. Adve
4eac78e660
Add support for a top-down propagation pass.
...
Each DSGraph now keeps a list of pending callers that have not
been inlined into the function represented by that graph.
It also keeps a copy of the original call nodes before the BU pass
eliminates some of them.
llvm-svn: 2965
2002-07-18 16:12:08 +00:00
Chris Lattner
db7a680aec
Implement cast nodes correctly.
...
llvm-svn: 2964
2002-07-18 15:54:42 +00:00
Chris Lattner
79b0c7d016
* s/method/function
...
llvm-svn: 2958
2002-07-18 04:43:16 +00:00
Chris Lattner
140153f357
The graph is more accurate when I don't completely ignore the return value.
...
llvm-svn: 2952
2002-07-18 01:58:24 +00:00
Chris Lattner
4c0d620a82
Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.
...
llvm-svn: 2945
2002-07-18 00:12:30 +00:00
Anand Shukla
d862545ad2
added std:: to string
...
llvm-svn: 2915
2002-07-16 00:03:10 +00:00
Chris Lattner
83ce4f9298
* Pass the DSGraph around instead of the Function to printing fns
...
* Print the globals list in the node
* Print the scalars in the scalar node
* Eliminate Scalar "label" edges in the graph
* Print fake edges lighter instead of dotted
llvm-svn: 2880
2002-07-11 20:33:32 +00:00
Chris Lattner
228163059b
* Nodes now keep track of any global variables in them
...
llvm-svn: 2879
2002-07-11 20:32:22 +00:00
Chris Lattner
7d0dafc0dc
* Nodes now keep track of any global variables in them
...
* Only dead-node-eliminate nodes with no flags
* Don't merge scalars, only merge what they point to.
llvm-svn: 2878
2002-07-11 20:32:02 +00:00
Chris Lattner
c0dab43c31
New implementation of data structure analysis. Only local analysis has been
...
implemented so far.
llvm-svn: 2871
2002-07-10 22:38:08 +00:00
Chris Lattner
3e35cef186
Reimplement data structure analysis
...
llvm-svn: 2868
2002-07-10 22:36:26 +00:00
Vikram S. Adve
ae219e24ba
A single MachineInstr operand may now be both a def and a use.
...
llvm-svn: 2825
2002-07-08 22:56:34 +00:00
Chris Lattner
9e5b6904e5
Fix anand's last checkin
...
llvm-svn: 2804
2002-06-30 16:01:15 +00:00
Anand Shukla
2ac04a0083
changes to make it compatible with 64bit gcc
...
llvm-svn: 2795
2002-06-25 21:18:19 +00:00
Anand Shukla
ff4c42b7c3
changes to make it compatible with 64bit gcc
...
llvm-svn: 2789
2002-06-25 20:35:19 +00:00
Anand Shukla
4fc92edcc6
minor change in removing endl
...
llvm-svn: 2788
2002-06-25 20:34:54 +00:00
Chris Lattner
113f4f4609
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
fda72b1aad
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
2db70cea7c
*** empty log message ***
...
llvm-svn: 2755
2002-06-03 22:10:52 +00:00
Chris Lattner
afc86e9a35
Move debug options out of header files so that the header does not have
...
to #include CommandLine.h.
llvm-svn: 2712
2002-05-22 17:08:27 +00:00
Chris Lattner
6264c1c0ab
Move the DEBUG_LV option out of the public header file into a private header.
...
llvm-svn: 2711
2002-05-22 17:07:26 +00:00
Chris Lattner
99bd13b415
Hide debugging options
...
llvm-svn: 2676
2002-05-20 21:39:10 +00:00
Chris Lattner
da6743e60c
Add method to check to see if two _Instructions_ dominate each other
...
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner
f5cbf64ed2
Print out post dominance data structures more nicely
...
llvm-svn: 2562
2002-05-08 23:11:08 +00:00
Chris Lattner
15435fd550
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
7608a46cbe
Updates to move some header files out of include/llvm/Transforms into
...
the Scalar and Utils subdirectories
llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
86ed92af6d
Mark analyses that only depend on the CFG of a function
...
llvm-svn: 2507
2002-05-06 19:32:07 +00:00
Chris Lattner
4b0cac3b0f
Add #include removed from ConstantHandling.h
...
llvm-svn: 2496
2002-05-06 17:53:10 +00:00
Chris Lattner
181cc32365
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +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
06bea32e9e
Simplify and update code a bit
...
llvm-svn: 2376
2002-04-28 19:20:10 +00:00
Chris Lattner
78dd56fe62
Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
...
to the global namespace
llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner
6a1ea6fffc
Module's are no longer Value subclasses
...
llvm-svn: 2351
2002-04-28 04:50:00 +00:00
Chris Lattner
503a3fcb42
Fix signed/unsigned comparison warning
...
llvm-svn: 2350
2002-04-28 04:49:43 +00:00
Chris Lattner
99b6f5cac4
Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
...
const BasicBlocks
llvm-svn: 2337
2002-04-28 00:15:57 +00:00
Chris Lattner
f998685cd9
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
c8e665431b
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
1f4423938d
Add support for tracking array allocations
...
llvm-svn: 2328
2002-04-27 02:28:41 +00:00
Chris Lattner
87c8a4a032
Allow the inline limit to be modified on the commandline for debugging
...
llvm-svn: 2327
2002-04-27 02:27:48 +00:00
Chris Lattner
2716b5e524
Change Constant::getNullConstant to Constant::getNullValue
...
llvm-svn: 2323
2002-04-27 02:25:14 +00:00
Chris Lattner
a20370661f
Just use << isntead of forcing getStrValue
...
llvm-svn: 2294
2002-04-18 18:14:40 +00:00
Chris Lattner
a2cdf2fb10
Print argument scalars as ellipses instead of boxes
...
llvm-svn: 2293
2002-04-18 18:14:19 +00:00
Chris Lattner
bda898420b
Inline indirect function calls that are only capable of calling one function
...
llvm-svn: 2275
2002-04-17 03:42:51 +00:00
Chris Lattner
79db55028c
Make data structure acurately get ALL edges, even loads of null fields of
...
nodes that are not shadow nodes
This fixes em3d to be _correct_ if not optimial
llvm-svn: 2274
2002-04-17 03:24:59 +00:00
Chris Lattner
071dea7362
* Remove the concept of a critical shadow node
...
* Make the function pointer argument explicit for a call nodes
* Eliminate unreachable global values
* Merge call nodes that are identical
llvm-svn: 2266
2002-04-16 20:39:59 +00:00
Chris Lattner
46b08cdc7c
* Eliminate ArgDSNode's completely, now rely on scalar map
...
* Fold call nodes that are indistinguishable for each other. This is a big
win for external functions like sqrt, which would multiply dramatically
before.
* Global nodes with no edges to or from them are now eliminated from the graph.
llvm-svn: 2257
2002-04-16 03:44:03 +00:00
Chris Lattner
ac7c298ba8
Print out what the root of the call graph is.
...
llvm-svn: 2223
2002-04-10 20:31:44 +00:00
Chris Lattner
2e9fa6d101
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
06be180225
Add explicit #includes of Function.h to make up for the removed #include
...
in iOther.h
llvm-svn: 2209
2002-04-09 19:08:28 +00:00
Chris Lattner
d92b01c385
Add #includes to make up for #includes pruned out of header files.
...
llvm-svn: 2207
2002-04-09 18:37:46 +00:00
Chris Lattner
8c7e050576
Don't leak all of the Loop objects created...
...
llvm-svn: 2196
2002-04-09 05:43:19 +00:00
Chris Lattner
ad4ef851b0
* General cleanups
...
* In calcLiveVarSetsForBB, do not leak a ValueSet every time the function
is called!
llvm-svn: 2189
2002-04-09 05:14:14 +00:00
Chris Lattner
f739fa8541
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
8e421f454d
isLabelType is obsolete
...
llvm-svn: 2175
2002-04-08 21:59:08 +00:00
Chris Lattner
3734fe4f35
Play around with #includes
...
llvm-svn: 2174
2002-04-08 21:58:53 +00:00
Chris Lattner
b52d903ca0
Add #includes that were pruned from already #included files
...
llvm-svn: 2173
2002-04-08 21:56:50 +00:00
Chris Lattner
65b529fe6d
ConstantHandling moved into VMCore library
...
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
62b7fd136e
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
9ba54b2f31
Call nodes are never equivalent
...
Shadow nodes are never critical.
llvm-svn: 2102
2002-04-04 19:21:51 +00:00
Chris Lattner
d6c8dd1473
Add hack to get timing of analysis
...
llvm-svn: 2101
2002-04-04 19:21:27 +00:00
Chris Lattner
d7b6c331ea
* Eliminate commented out code
...
* Do not demand a shadow node when resolving
* Raise arbitrary inline limit
llvm-svn: 2100
2002-04-04 19:21:06 +00:00
Chris Lattner
4f47bb8ae6
Support resolving function arguments/return values to pointers that index
...
into other objects.
llvm-svn: 2094
2002-04-01 22:20:48 +00:00
Chris Lattner
7203e9f05a
Avoid incorrectly adding null values to the scalar map!
...
llvm-svn: 2085
2002-04-01 00:45:09 +00:00
Chris Lattner
f224b6b511
Critical shadow nodes no do not know their parent explictly.
...
llvm-svn: 2084
2002-04-01 00:15:30 +00:00
Chris Lattner
b4648bb38f
Minor cleanups (use dyn_cast instead of testing manually)
...
Shadow nodes now don't explicitly know their parent.
llvm-svn: 2083
2002-04-01 00:14:41 +00:00
Chris Lattner
6b06aa557e
Allow merging of identical call nodes. Make the shadow node pointed to
...
by the call node noncritical before the call is destroyed.
llvm-svn: 2082
2002-04-01 00:13:56 +00:00
Chris Lattner
a7b3b50381
Increase limit for perimeter
...
llvm-svn: 2081
2002-04-01 00:12:58 +00:00
Chris Lattner
d63afb418e
Unify the destruction code used for node pairs vs normal nodes. This was
...
causing a problem before because global values with incoming edges didn't
copy the incoming edges to the node they were being merged from, causing
the poolalloc pass to die.
llvm-svn: 2079
2002-03-31 19:57:44 +00:00
Chris Lattner
d45f4df2ae
* Move the isEquivalentTo implementations here. They can probably be put
...
someplace nicer in the file though.
* Add new dump method for debugging
llvm-svn: 2064
2002-03-31 07:16:08 +00:00
Chris Lattner
49c3ea8c1e
Print out the instruction instead of just the address!
...
llvm-svn: 2063
2002-03-31 07:15:20 +00:00
Chris Lattner
ed9bfd95a9
* Move isEquivalentTo implementations to NodeImpl
...
* Implement a new form of node folding to catch cases missed in Addtree
* Add removeIndistinguishableNodePairs to merge calls (todo) and globals
llvm-svn: 2062
2002-03-31 07:14:52 +00:00
Chris Lattner
a2cdaba6ed
* Convert CallMap to be a vector, because the keys can change, and the map
...
doesn't resort!
* Be more generous with the cached matches that we allow now.
* Recursive calls should all work now!
llvm-svn: 2061
2002-03-31 07:13:27 +00:00
Chris Lattner
15deaa0ab9
s/Method/Function
...
llvm-svn: 2043
2002-03-29 17:08:29 +00:00
Chris Lattner
8d4894e3fa
Implement getEscapingAllocations & getNonEscapingAllocations
...
llvm-svn: 2021
2002-03-28 19:33:00 +00:00
Chris Lattner
c3ae15cf0b
* Rename UnlinkUndistinguishableShadowNodes & RemoveUnreachableShadowNodes
...
to reflect that they can eliminate arbitrary nodes.
* Rename the ShadowNodeEliminate.cpp file to EliminateNodes.cpp for the
same reason
llvm-svn: 2020
2002-03-28 19:16:48 +00:00
Chris Lattner
8a5c470c59
Ooops, I did such a great job pruning nodes, that I accidentally deleted
...
ALL allocation nodes... hrm... bad.
llvm-svn: 2018
2002-03-28 18:38:38 +00:00
Chris Lattner
b1782d0c90
Many changes
...
* Simplify a lot of the inlining stuff. There are still problems, but not
many
* Break up the Function representation to have a vector for every different
node type so it is fast to find nodes of a particular flavor.
* Do more intelligent merging of call values
* Allow elimination of unreachable shadow and allocation nodes
* Generalize indistinguishability testing to allow merging of identical calls.
* Increase shadow node merging power
llvm-svn: 2010
2002-03-28 17:56:03 +00:00
Chris Lattner
be449bc1ef
* Add #define to enabled debug messages
...
* Move removeEdgesTo to be a member of DSNode
* Implement (but #ifdef out) the new, spiffier, method of determining
shadow node equivalence. This cannot be enabled until more is
implemented.
llvm-svn: 2004
2002-03-27 19:48:03 +00:00
Chris Lattner
d9c86c7c96
* Implement DSNode::removeAllIncomingEdges
...
* Implement Critical Shadow node handling
* Implement routines to determine whether an allocation node is a malloc
or alloca
llvm-svn: 2003
2002-03-27 19:46:05 +00:00
Chris Lattner
0ad8b8f5d0
* Add critical node support
...
* Optimize graph after building it. This should be unneccesary in the future
llvm-svn: 2002
2002-03-27 19:45:12 +00:00
Chris Lattner
b6c8c5138f
* Destroy alloca nodes when a graph gets inlined
...
* Add links to all subtrees when a shadow node gets resolved
* Add critical node handling
llvm-svn: 2001
2002-03-27 19:44:33 +00:00
Chris Lattner
b358f71d02
* Optimizers return true on change
...
* Implement indistinguishable shadow node elimination
llvm-svn: 1999
2002-03-27 00:55:13 +00:00
Chris Lattner
5c3280971c
Fix long line
...
llvm-svn: 1998
2002-03-27 00:54:31 +00:00
Chris Lattner
f8e2d060cc
* Because of optimization, the shadow nodes between arguments might get
...
removed. Check to see if they are there.
* Repeat optimizations while changing
llvm-svn: 1997
2002-03-27 00:53:57 +00:00
Chris Lattner
e604d8ec65
Initial checkin of Datastructure analysis.
...
Has bugs, but shouldn't crash in theory.
llvm-svn: 1994
2002-03-26 22:39:06 +00:00
Chris Lattner
0df67e347a
change refs to Method to Function
...
Change references to MEthodArgument to FunctionArgument
llvm-svn: 1989
2002-03-26 17:55:33 +00:00
Chris Lattner
4e8c4877aa
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
218f8de01a
Fixed several problems with handling arguments to Phis.
...
llvm-svn: 1910
2002-03-18 03:47:26 +00:00
Vikram S. Adve
89637cd8e2
Big bug fix: killed uses were being inserted instead of erased!
...
Also added a set of debug options.
llvm-svn: 1909
2002-03-18 03:45:41 +00:00
Chris Lattner
c47c3cce6f
Fix test/Regression/Other/2002-03-14-ValueToLarge.ll. Note that this
...
fix could be better, but we don't have the infrastructure to find out what
size types are yet.
llvm-svn: 1876
2002-03-14 22:35:50 +00:00
Chris Lattner
26ec881062
Bugfix for test/Regression/Other/2002-03-11-ExprAssertion.ll
...
llvm-svn: 1856
2002-03-11 20:50:24 +00:00
Chris Lattner
62f1e98e4f
Initial checkin
...
llvm-svn: 1831
2002-03-07 20:16:38 +00:00
Chris Lattner
beed742b55
Clean up call graph, add comments, and fix test/Regression/Other/2002-01-31-CallGraph.ll
...
llvm-svn: 1828
2002-03-06 20:19:35 +00:00
Chris Lattner
46519418b0
Pull interprocedural analyses out of Analysis library into their own lib
...
llvm-svn: 1827
2002-03-06 18:44:29 +00:00
Chris Lattner
d852cc32ec
Move call graph printing support out of Writer.h into Callgraph.h
...
remove dead global function
llvm-svn: 1825
2002-03-06 18:00:49 +00:00
Chris Lattner
8032732948
Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
...
llvm-svn: 1820
2002-03-06 17:16:43 +00:00
Chris Lattner
43373a6868
Make it compile with GCC 3.0.4
...
llvm-svn: 1786
2002-02-24 23:01:21 +00:00
Chris Lattner
83d485b310
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
InstrTypes.h anymore
llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
60a6591d83
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
7a264284f0
Convert BBLiveVar to be a BasicBlock annotation, this removes the BB2BBLVMap from MethodLiveVarInfo.
...
llvm-svn: 1721
2002-02-05 06:52:25 +00:00
Chris Lattner
ea13e0afa0
Convert operand iterator over to work like an STL iterator
...
llvm-svn: 1720
2002-02-05 06:02:59 +00:00
Chris Lattner
7e5ee4253c
Minor change: Methods that return ValueSet's that are guaranteed to be valid
...
return references instead of pointers.
llvm-svn: 1719
2002-02-05 04:20:12 +00:00
Chris Lattner
101a5d9197
Must include SetOperations to do set_*
...
llvm-svn: 1716
2002-02-05 03:35:53 +00:00
Chris Lattner
a2b661f764
Remove generic routines to Support/SetOperations.h
...
llvm-svn: 1715
2002-02-05 03:35:31 +00:00
Chris Lattner
dc6539bcc0
Remove empty files
...
llvm-svn: 1713
2002-02-05 02:52:53 +00:00
Chris Lattner
b1def732af
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
llvm-svn: 1711
2002-02-05 02:51:01 +00:00
Chris Lattner
30e8fb69c5
* Code Cleanups
...
* Introduce RAV to allow stream I/O instead of using printValue
llvm-svn: 1710
2002-02-05 01:43:49 +00:00
Chris Lattner
91c4a419e2
Changes neccesary due to the move of BBLiveVar.h to the lib/Analysis/LiveVar directory
...
llvm-svn: 1709
2002-02-05 00:43:37 +00:00
Chris Lattner
7c70802193
* Give BBLiveVar.cpp a proper file header
...
* applyFlowFunc DOES NOT NEED TO COPY the huge BB->BBLiveVar Map every time it is invoked!
* Big cleanups.
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion
llvm-svn: 1706
2002-02-05 00:34:50 +00:00
Chris Lattner
94b8baf089
* Big cleanups.
...
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion
llvm-svn: 1705
2002-02-05 00:33:19 +00:00
Chris Lattner
f468b52e3a
Code cleanups, no functional change
...
llvm-svn: 1704
2002-02-04 23:31:16 +00:00
Chris Lattner
439d0e557b
Clean up MethodLiveVarInfo
...
llvm-svn: 1703
2002-02-04 20:49:04 +00:00
Chris Lattner
494266eaf0
Turn live variable analysis into a real MethodPass.
...
llvm-svn: 1699
2002-02-04 20:00:08 +00:00
Chris Lattner
75b2283602
Remove Obsolete LoopDepthCalculator. All users should use LoopInfo directly.
...
llvm-svn: 1697
2002-02-04 17:49:01 +00:00
Chris Lattner
519af2962d
REmove huge hack used by register allocator
...
llvm-svn: 1694
2002-02-04 17:39:02 +00:00
Chris Lattner
325869ac29
* Add #includes that were yanked out of header files
...
* Convert over to valueset interface that uses insert & erase insead of add and remove
* the -> operator really isn't that hard to use!
llvm-svn: 1687
2002-02-04 16:35:12 +00:00
Chris Lattner
7ad6519f90
Cut down include pollution and number of frivolous consts.
...
llvm-svn: 1683
2002-02-04 16:31:03 +00:00
Chris Lattner
bd3ad751f0
Eliminate ModuleAnalyzer. It's old code that is not going to be used in the near future
...
llvm-svn: 1679
2002-02-04 06:47:17 +00:00
Chris Lattner
73645f3b94
Minor cleanups
...
llvm-svn: 1671
2002-02-04 05:48:24 +00:00
Chris Lattner
6f27b7d41c
Lots of nonfunctional code cleanups
...
llvm-svn: 1642
2002-02-03 07:25:25 +00:00
Chris Lattner
a5e103a2ae
Provide the right AnalysisID for postdominators
...
llvm-svn: 1616
2002-01-31 18:29:24 +00:00
Chris Lattner
ccf571a408
Convert analyses to new pass structure
...
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner
979d11db14
Implement loop depth calculation in terms of dominators instead of intervals
...
No problems with irreducibility now
llvm-svn: 1602
2002-01-31 00:42:06 +00:00
Chris Lattner
ee965abc36
Move stuff out of the Optimizations directories into the appropriate Transforms
...
directories. Eliminate the opt namespace.
llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner
0686e435d1
Implement a more powerful, simpler, pass system. This pass system can figure
...
out how to run a collection of passes optimially given their behaviors and
charactaristics.
Convert code to use it.
llvm-svn: 1507
2002-01-21 07:31:50 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
1a98b28bde
added a section on how to modify live variable code to use LLVM instructions
...
instead of machine instructions.
llvm-svn: 1451
2001-12-13 21:25:46 +00:00
Chris Lattner
cdbcb1fd17
Some programs are using BB's as values, until we resolve this. Disable the assert
...
llvm-svn: 1448
2001-12-13 00:45:06 +00:00
Ruchira Sasanka
4552ee447a
Added more comments. Added code to destructor in MethodLiveVarInfo to delete
...
LiveVarSet caches.
llvm-svn: 1435
2001-12-08 21:05:27 +00:00
Ruchira Sasanka
565a5c423d
Added comments are more documentation info
...
llvm-svn: 1434
2001-12-08 21:04:22 +00:00
Chris Lattner
be68833765
"fix" problems processing floating point expressions
...
llvm-svn: 1421
2001-12-05 19:38:29 +00:00
Chris Lattner
1bedac9af0
Fix a bug that clobbered the step value on some inputs
...
llvm-svn: 1416
2001-12-05 06:32:30 +00:00
Chris Lattner
54794fe11f
Fix a pessimization due to sucky LI testing
...
llvm-svn: 1412
2001-12-04 08:12:47 +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
66d9ceaaba
Induction variables must be phi nodes
...
llvm-svn: 1402
2001-12-03 17:27:42 +00:00
Chris Lattner
5de2204fe8
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
34dfe56c1a
Implement writer support for Loops, Induction Variables, and CallGraphs
...
llvm-svn: 1372
2001-11-26 18:53:29 +00:00
Chris Lattner
b4a7eb10fa
Make Mul work right
...
Make sub work right
llvm-svn: 1371
2001-11-26 18:53:07 +00:00
Chris Lattner
a88403bf31
Fix a bad assertion to be correct . The root basic block can be used by PHI nodes.
...
llvm-svn: 1370
2001-11-26 18:52:02 +00:00
Chris Lattner
03946cd9b6
Implement a new entry node that has edges to all external methods in the module
...
llvm-svn: 1369
2001-11-26 18:51:25 +00:00
Chris Lattner
6de9942b92
* Implement dominator based loop identification
...
* Implement cleaner induction variable identification
llvm-svn: 1359
2001-11-26 18:41:20 +00:00
Chris Lattner
0ae45bd3f4
* Implement more powerful expr analysis of cast instructions
...
llvm-svn: 1335
2001-11-26 16:53:50 +00:00
Chris Lattner
7082e110f7
New pass to find types in use by a program
...
llvm-svn: 1232
2001-11-09 05:27:21 +00:00
Chris Lattner
cf66422978
Print the method that makes an instruction invalid
...
llvm-svn: 1213
2001-11-08 19:29:51 +00:00
Chris Lattner
83f1528061
Initial checkin of pointer safety checker
...
llvm-svn: 1181
2001-11-07 21:16:12 +00:00
Vikram S. Adve
5dab57de99
Added function IsLeafMethod to identify leaf methods.
...
This will use the CallGraph only if one is provided.
llvm-svn: 950
2001-10-22 13:55:46 +00:00
Ruchira Sasanka
cc91b21fe1
No major change - added some comments
...
llvm-svn: 848
2001-10-16 01:25:05 +00:00
Chris Lattner
24872c8838
Print Debug Code to stderr instead of stdout so that it doesn't mess up the assembly output
...
llvm-svn: 841
2001-10-15 18:30:06 +00:00
Ruchira Sasanka
82605b239c
--added support for implicit operands
...
llvm-svn: 832
2001-10-15 16:58:50 +00:00
Chris Lattner
f7d66a73ce
Fix code to make GCC 2.96 happy
...
llvm-svn: 753
2001-10-13 06:34:47 +00:00
Chris Lattner
8cbbbef674
* Add support for Invoke instructions
...
* Add support for indirect calls
llvm-svn: 752
2001-10-13 06:33:19 +00:00
Ruchira Sasanka
04009efe48
added support for implict operands in machine instruction
...
llvm-svn: 728
2001-10-12 17:47:23 +00:00
Ruchira Sasanka
85cc5744ba
--added support for implicit operands in machine instructions
...
llvm-svn: 727
2001-10-12 17:46:27 +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
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
ba1c1f2fb6
Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
...
the BasicBlock class where they should be. pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.
llvm-svn: 691
2001-10-01 13:19:53 +00:00
Ruchira Sasanka
c8b4d12a8f
*** empty log message ***
...
llvm-svn: 675
2001-09-30 23:28:04 +00:00
Chris Lattner
bb09a10929
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
bbf3ae8414
Initial support for construction of a call graph
...
llvm-svn: 660
2001-09-28 00:08:15 +00:00
Chris Lattner
06028541ab
Move the sparc target to a new lib/Target directory
...
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner
ff0c8a7511
This checkin represents some cleanup of the backend, implementing the following things:
...
1. The TargetMachine structure is free to decide the process a particular target uses to generate code.
2. All of the gooee details of the sparc backend are now localized in the lib/CodeGen/TargetMAchine/Sparc directory. The Sparc.h file that is globally visible is just a stub.
3. The Sparc.h file that esxists now will dissapear entirely someday when we have multiple backends chosen by a factory of some sort.
NOTE! The BBLiveVar.cpp file dependant on the Sparc backend, and is therefore not generic/portale to other backends. This needs to be fixed.
llvm-svn: 558
2001-09-14 03:37:22 +00:00
Chris Lattner
3ce5ac2107
Handle subtract in expression classifier
...
llvm-svn: 548
2001-09-11 04:27:34 +00:00
Chris Lattner
706946b40a
Add support for global variables
...
llvm-svn: 535
2001-09-10 20:07:57 +00:00
Chris Lattner
ce4cd006c1
Module analyzer no longer has to iterate over constant pool
...
llvm-svn: 441
2001-09-07 16:31:23 +00:00
Chris Lattner
c6b06c4f9b
Simplify code by eliminating need to hang onto constant pool references
...
llvm-svn: 440
2001-09-07 16:31:04 +00:00
Vikram S. Adve
8ae325420f
Added directory LiveVar/
...
llvm-svn: 410
2001-08-28 23:29:31 +00:00
Vikram S. Adve
1143eff628
analyze() now checks to see that we don't analyze the same method twice.
...
Needs a mechnanism to override this check (e.g., after a transformation).
llvm-svn: 391
2001-08-28 22:36:35 +00:00
Chris Lattner
439465583a
Make sure noone branches to the entry node of the method
...
llvm-svn: 369
2001-08-24 14:56:34 +00:00
Chris Lattner
a0484c8eeb
Handle case where there is no exit node from a flowgraph
...
llvm-svn: 365
2001-08-23 17:07:19 +00:00
Ruchira Sasanka
11e97b08f0
LV code on machine instructions
...
llvm-svn: 360
2001-08-20 21:12:49 +00:00
Ruchira Sasanka
ec1a5411d7
LV info on machine instructions
...
llvm-svn: 359
2001-08-20 21:11:01 +00:00
Chris Lattner
c4d6aca02e
Fix a bug when compiling 'shl ubyte * %var, ubyte 2'
...
llvm-svn: 295
2001-07-25 22:47:32 +00:00
Ruchira Sasanka
6988791c1e
Changed printValue() to print constant value if the value is a constant.
...
llvm-svn: 292
2001-07-24 18:21:21 +00:00
Ruchira Sasanka
9f18119edb
*** empty log message ***
...
llvm-svn: 291
2001-07-24 17:14:13 +00:00
Chris Lattner
e2472bbf6c
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
2c6f274188
More functionality, renamed API
...
llvm-svn: 241
2001-07-21 19:07:19 +00:00
Chris Lattner
85090922f4
Start of expression analysis support
...
llvm-svn: 219
2001-07-20 19:17:55 +00:00
Chris Lattner
197390e985
Fix nasty typo
...
llvm-svn: 204
2001-07-20 04:39:07 +00:00
Chris Lattner
5446f8a542
* 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
1547114cbf
Fixed post dominator frontiers! Yaay!
...
llvm-svn: 157
2001-07-08 05:54:09 +00:00
Chris Lattner
c385bebc89
Implement support for postdominators, except in dom frontiers
...
llvm-svn: 142
2001-07-06 16:58:22 +00:00
Chris Lattner
81f3ace753
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.
llvm-svn: 133
2001-07-03 15:28:35 +00:00
Chris Lattner
fa3ac26d22
Code got moved from the lib/Assembly/Writer/IntervalWriter.cpp file to
...
here. Updates to correct description n stuff.
llvm-svn: 129
2001-07-03 05:36:34 +00:00
Chris Lattner
a7f22e53c0
Add printing code for dominator info
...
llvm-svn: 125
2001-07-02 05:46:47 +00:00
Chris Lattner
081aabc330
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
0c94a300eb
Moved deleter to include/llvm/Tools/STLExtras.h
...
llvm-svn: 120
2001-07-02 01:08:08 +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
ed59025460
IntervalPartition: recode to use IntervalIterator to do all the work
...
LoopDepth.cpp: new file that calculates the depth of a loop, using
IntervalPartitions.
llvm-svn: 71
2001-06-25 03:55:04 +00:00
Chris Lattner
601012721c
New file due to the Intervals.h splitup
...
llvm-svn: 66
2001-06-24 04:07:44 +00:00
Chris Lattner
f64a8936e5
#include a different header due to Intervals.h splitting up
...
llvm-svn: 63
2001-06-24 04:05:45 +00:00
Chris Lattner
dec727e346
IntervalPartition & IntervalIterator classes have been split out into
...
their own .h files & .cpp file
llvm-svn: 62
2001-06-24 04:05:21 +00:00
Chris Lattner
4c16155c36
Prepare for split between Interval, IntervalIterator, and IntervalIPartition
...
llvm-svn: 60
2001-06-24 03:25:01 +00:00
Chris Lattner
34b62a04b6
Interval::HeaderNode is now accessed thorugh an accessor function
...
llvm-svn: 56
2001-06-22 02:23:39 +00:00
Chris Lattner
b20a15d334
Moved printing code to the Assembly/Writer library.
...
Code now detects looping intervals
llvm-svn: 52
2001-06-21 05:27:22 +00:00
Chris Lattner
d79faa35af
Implement the new Interval::isLoop method
...
Implement destructor to free memory
llvm-svn: 51
2001-06-21 05:26:15 +00:00
Chris Lattner
5035efaeda
Add capability to build a derived interval graph
...
llvm-svn: 41
2001-06-20 22:44:32 +00:00
Chris Lattner
28ae5cbcb5
Initial Checking of Interval handling code
...
llvm-svn: 39
2001-06-20 20:09:55 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00