Vikram S. Adve
59e7da7437
Don't require a BB to look-up live variables, unless they may need to
...
be recomputed.
llvm-svn: 7388
2003-07-29 19:42:32 +00:00
Chris Lattner
36a7bf78fa
Fix another minor bug
...
llvm-svn: 7340
2003-07-26 23:00:05 +00:00
Chris Lattner
752a4ca4c4
Dont' try to parse the colon
...
llvm-svn: 7323
2003-07-25 20:49:29 +00:00
Chris Lattner
915b998b3f
Add a more general check-flags which can be used to ensure arbitrary flags are set
...
llvm-svn: 7322
2003-07-25 20:45:40 +00:00
Chris Lattner
bfe70df7fc
Fit code into 80 columns
...
llvm-svn: 7249
2003-07-23 15:17:01 +00:00
Chris Lattner
0fce06e40e
Eliminate old-style cast
...
llvm-svn: 7248
2003-07-23 15:16:40 +00:00
Vikram S. Adve
420ec0bb0f
Fix comment.
...
llvm-svn: 7227
2003-07-22 12:08:58 +00:00
Brian Gaeke
026c333f07
Fix typo in call to isUnresolvableFunc, which was breaking the build.
...
llvm-svn: 7194
2003-07-17 19:07:46 +00:00
Vikram S. Adve
96abba3e01
Rematerialize nodes from the globals graph into the current graph
...
after all callees are inlined into the current graph.
NOTE: There's also a major bug fix for the BU pass in DataStructure.cpp,
which ensures that resolvable indirect calls are not moved out to the
globals graph, so that they are eventually inlined (if possible).
llvm-svn: 7189
2003-07-16 21:42:03 +00:00
Vikram S. Adve
e2993f34ed
(1) Rematerialize nodes from the globals graph into the current graph
...
after all callers are inlined into the current graph.
(2) Optimize the way a graph is inlined into its callees in the TD phase:
(a) Use DSGraph::cloneReachableSubgraph to clone only a subgraph at
each call site, for faster inlining.
(b) Clone separately for the same callee at different call sites,
since only the reachable subgraph is being cloned, not the entire
caller graph.
llvm-svn: 7188
2003-07-16 21:40:28 +00:00
Vikram S. Adve
d1a85b7860
Implement 2 important changes: (1) rematerialization from the globals graph,
...
and (2) faster inlining by cloning only reachable nodes. In particular:
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
current graph, merging the global nodes into thos in the current graph.
The TD pass now uses this for faster inlining, and so does the
next function.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
globals graph into the current graph in both BU and TD passes.
(3) `I' flags are removed from all nodes in the globals graph, because they
are difficult to maintain correctly and are not needed anyway.
(4) Aux. function calls are only removed to the globals graph if they
will never be resovled. (This is what fixed gap.) The immediate
reason is that if we took these out of a function (and moved them to
the globals graph) we would need to rematerialize these nodes into the
function graph for every function in the BU pass. The longer term
problem is that we would need to find a way to remove them from the
globals graph iff they have been resolved on all paths through the
call graph.
llvm-svn: 7187
2003-07-16 21:36:31 +00:00
Vikram S. Adve
0ce80bfa82
Factor out the test for unresolvable external functions into
...
isUnresolvableFunc() (I thought I needed this externally.
I don't, but it's still nicer this way.)
llvm-svn: 7186
2003-07-16 21:25:17 +00:00
Misha Brukman
0b5999cca1
The word separate' only has one
e'.
...
llvm-svn: 7174
2003-07-14 17:26:34 +00:00
Chris Lattner
b93ef28cef
Reuse the values if they are constants: this is important so that we index into the right structure field
...
This fixes bug: BasicAA/2003-07-03-BasicAACrash.ll
llvm-svn: 7093
2003-07-03 06:42:38 +00:00
Chris Lattner
2a6504c799
Remove globals more aggressively from graphs.
...
Fix a bug where we removed nodes that were marked U.
llvm-svn: 7090
2003-07-03 02:03:53 +00:00
Chris Lattner
492b7eeb06
INCLUDE_PARENT_GRAPH is required!
...
llvm-svn: 7088
2003-07-02 23:57:05 +00:00
Chris Lattner
86c8f822ec
Disable incorrect mustalias code
...
llvm-svn: 7087
2003-07-02 23:56:51 +00:00
Chris Lattner
478e42b621
Remove space at end of line
...
llvm-svn: 7084
2003-07-02 23:44:15 +00:00
Chris Lattner
b64aff94fd
Fix how we are handling unreachable functions. This DRAMATICALLY improves efficiency
...
llvm-svn: 7082
2003-07-02 23:42:48 +00:00
Chris Lattner
083398eff5
Keep track of how many inlinings are performed
...
llvm-svn: 7076
2003-07-02 20:24:42 +00:00
Chris Lattner
59bb44723a
Try using trivially dead deletion
...
llvm-svn: 7075
2003-07-02 19:49:11 +00:00
Chris Lattner
c1f922d61e
Remove dead Nodes list
...
llvm-svn: 7065
2003-07-02 06:06:34 +00:00
Chris Lattner
56585a82d9
Complete rewrite of td pass
...
llvm-svn: 7064
2003-07-02 04:39:44 +00:00
Chris Lattner
a85502303e
Print collapsed to match the paper
...
llvm-svn: 7063
2003-07-02 04:39:27 +00:00
Chris Lattner
95c5313776
Reduce amount of work we do calculating mustaliases if the arg is a global
...
llvm-svn: 7062
2003-07-02 04:39:13 +00:00
Chris Lattner
f4a221c87c
Add support for ParentGraph only when building in debug mode
...
Minor cleanups, reenable folding of call nodes to external functions
llvm-svn: 7061
2003-07-02 04:38:49 +00:00
Chris Lattner
d49611837b
Add some functions to the blacklist
...
llvm-svn: 7060
2003-07-02 04:38:00 +00:00
Chris Lattner
64ea02737e
Make the BU closure keep track of which actual calls happen
...
Minor cleanups
llvm-svn: 7059
2003-07-02 04:37:48 +00:00
Chris Lattner
60652f41c4
Make local pass print out its progress
...
llvm-svn: 7058
2003-07-02 04:37:26 +00:00
Chris Lattner
f3cfe71797
Fix bug: Regression/Other/2002-03-11-ExprAssertion.ll
...
llvm-svn: 7046
2003-07-01 21:08:52 +00:00
Chris Lattner
5ddec0f02d
Rework TD pass to work with the precise call graph constructed by the BU phase
...
llvm-svn: 7031
2003-07-01 16:28:11 +00:00
Chris Lattner
3536455262
Do not treat global variables as functions! (and assert failing)
...
llvm-svn: 7030
2003-07-01 16:27:53 +00:00
Chris Lattner
7ab30a179b
Dont' print scalar nodes for ConstantPointerRefs
...
llvm-svn: 7029
2003-07-01 16:27:32 +00:00
Chris Lattner
599287e3c3
Minor cleanups
...
llvm-svn: 7027
2003-07-01 16:04:18 +00:00
Chris Lattner
33fce4d868
Use the getFunctionNames method
...
llvm-svn: 7008
2003-06-30 05:57:39 +00:00
Chris Lattner
cb32be085b
Add new method
...
llvm-svn: 7007
2003-06-30 05:57:30 +00:00
Chris Lattner
851b6382b6
Split CallSiteIterator out into DSCallSiteIterator.h, and generalize it a bit
...
llvm-svn: 7006
2003-06-30 05:27:53 +00:00
Chris Lattner
e40d871120
Be more const-correct
...
llvm-svn: 7005
2003-06-30 05:27:18 +00:00
Chris Lattner
fb9f50ee23
Fix bug in last checkin
...
llvm-svn: 7003
2003-06-30 05:18:26 +00:00
Chris Lattner
9954cfc9bf
Reimplement the BU closure to collapse all SCC graphs into a single graph.
...
Look at all of the code that gets deleted!
llvm-svn: 7001
2003-06-30 05:09:58 +00:00
Chris Lattner
60b2516889
Handle the case where OldNodeMap == &ScalarMap correctly
...
llvm-svn: 7000
2003-06-30 05:09:29 +00:00
Chris Lattner
20d3019fa6
Remove dead method
...
llvm-svn: 6999
2003-06-30 04:53:39 +00:00
Chris Lattner
37d7a580b2
Do not delete the same graph multiple times when freeing memory if graphs are sharing
...
llvm-svn: 6998
2003-06-30 04:53:27 +00:00
Chris Lattner
64008895c8
Do not multiply delete graphs if functions are sharing graphs
...
llvm-svn: 6997
2003-06-30 04:53:08 +00:00
Chris Lattner
8574358e8a
Move usages of explicit hash_* datastructures to use typedefs
...
llvm-svn: 6996
2003-06-30 03:36:09 +00:00
Chris Lattner
203826c2e1
Revamp DSGraphs so that they can support multiple functions in the same
...
DSGraph at one time
llvm-svn: 6994
2003-06-30 03:15:25 +00:00
Chris Lattner
2ce6424601
Adjust for new DSGraph API
...
llvm-svn: 6993
2003-06-30 03:14:54 +00:00
Chris Lattner
762a057a22
Abstract out the predicate which decides whether a function gets complete
...
arguments or not...
llvm-svn: 6987
2003-06-29 22:37:07 +00:00
Chris Lattner
9cb6f34b81
Fix minor bug in previous checkin
...
llvm-svn: 6986
2003-06-29 22:36:31 +00:00
Chris Lattner
9229da84be
Add support for ensuring that nodes are not incomplete
...
llvm-svn: 6985
2003-06-29 22:36:15 +00:00
Chris Lattner
94b29bf96d
Add support for "physical subtyping", which fixes:
...
DSGraph/2003-06-29-NodeCollapsing2.ll & DSGraph/PhysicalSubtyping.ll
llvm-svn: 6982
2003-06-29 20:27:45 +00:00
Chris Lattner
ed9302c854
Add print method to not get silly warning from analyze
...
llvm-svn: 6981
2003-06-29 20:27:16 +00:00
Chris Lattner
55099822d5
New pass which is useful for writing regression tests
...
llvm-svn: 6979
2003-06-29 18:17:07 +00:00
Chris Lattner
b932c794ee
Expose must alias information for global variables, implementing: DSGraph/mustalias.ll
...
llvm-svn: 6973
2003-06-29 00:54:08 +00:00
Chris Lattner
d1ca41db68
If the alias analysis algorithm we are using can provide MUST alias information,
...
expose it directly as value numbering information
llvm-svn: 6972
2003-06-29 00:53:34 +00:00
Chris Lattner
7b5077de46
Count operands to instructions as well as just results. This allows for global variables to be checked as well
...
llvm-svn: 6970
2003-06-29 00:07:11 +00:00
Chris Lattner
1352a50cbb
Propagate globals graph from the local to bu to td globals graphs. This
...
fixes bug: DSGraph/buglobals.ll
llvm-svn: 6947
2003-06-28 22:14:55 +00:00
Chris Lattner
801e22514d
Drop references to globals who do exist in the globals graph, but are never
...
read or written to. Keep track of how many times this happens. This should
be good for deleting things like references to type information in C++ classes
llvm-svn: 6946
2003-06-28 22:10:58 +00:00
Chris Lattner
5f90382628
Avoid double negatives
...
llvm-svn: 6945
2003-06-28 21:58:28 +00:00
Chris Lattner
cf6df3ef6b
New pass to perform DSA based optimizations. Initially we just support turning
...
globals into constants if we can prove it's safe
llvm-svn: 6941
2003-06-28 21:54:55 +00:00
Chris Lattner
7aa690403b
Fix bug: LevelRaise/2003-06-25-ExprAnalysis.ll
...
llvm-svn: 6903
2003-06-25 17:09:03 +00:00
Chris Lattner
0a0266865a
Remove support for the MultiObject flag, which was fundamentally broken
...
llvm-svn: 6840
2003-06-22 03:03:52 +00:00
Chris Lattner
365e583866
* Changes to make NodeType be private to DSNode.
...
* Add new MultiObject flag to DSNode which keeps track of whether or not
multiple objects have been merged into the node, allowing must-alias info
to be tracked.
llvm-svn: 6794
2003-06-19 21:15:11 +00:00
Chris Lattner
5083d8846b
Implement handling of constantexprs for disambiguation. This implements
...
BasicAA/featuretest.ll:constexpr_test
llvm-svn: 6740
2003-06-17 15:25:37 +00:00
Chris Lattner
07452f836a
Avoid divide by zero errors
...
llvm-svn: 6738
2003-06-17 15:07:20 +00:00
Chris Lattner
2806ac8828
Nodes get forwarded when they are collapsed currently.
...
llvm-svn: 6696
2003-06-16 12:08:18 +00:00
Chris Lattner
e718da0d46
Remove bogus assertion: a node with no referrers could be collapsed if field-sensitivity was disabled
...
llvm-svn: 6695
2003-06-16 12:07:39 +00:00
Chris Lattner
24441a15c5
Implement forwarding from stores to loads of must-aliased pointers.
...
This implements: GCSE/2003-06-13-LoadStoreEliminate.ll
llvm-svn: 6694
2003-06-16 12:06:41 +00:00
Chris Lattner
fe6eef643c
Be more robust in the face of undefined behavior.
...
Fixes bug: BasicAA/2003-06-01-AliasCrash.ll
llvm-svn: 6538
2003-06-02 05:42:39 +00:00
Chris Lattner
fb76ebe95a
Fix bug: CBackend/2003-05-31-MissingStructName.ll
...
llvm-svn: 6495
2003-05-31 23:30:52 +00:00
Chris Lattner
01cbfa9317
Eliminate unnecessary ->get calls that are now automatically handled.
...
llvm-svn: 6397
2003-05-29 15:12:27 +00:00
Vikram S. Adve
ab50c0aee5
Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
...
and related functions and flags. Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".
llvm-svn: 6342
2003-05-27 00:06:48 +00:00
Chris Lattner
777fdfc135
Fix Bug: BasicAA/2003-05-21-GEP-Problem.ll
...
llvm-svn: 6270
2003-05-21 20:23:26 +00:00
Misha Brukman
58c5ef0f4d
The word operands' has an
r' in it.
...
llvm-svn: 6250
2003-05-20 20:36:39 +00:00
Misha Brukman
80e11dcb30
Sparc instruction opcodes now all live under the `V9' namespace.
...
llvm-svn: 6249
2003-05-20 20:32:24 +00:00
Misha Brukman
74cf3f5246
s/convertable/convertible/g
...
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Chris Lattner
648e9d9cff
Fix bug: Analysis/LoopInfo/2003-05-15-NestingProblem.ll
...
llvm-svn: 6230
2003-05-15 18:03:51 +00:00
Chris Lattner
0ec2b1188a
Fix miscompilation in Fhourstones and bug: LICM/2003-05-02-LoadHoist.ll
...
llvm-svn: 5994
2003-05-03 03:42:08 +00:00
Chris Lattner
72338826c9
Fix bug: LoopPreheaders/2003-04-25-AssertFail.ll
...
llvm-svn: 5959
2003-04-26 19:34:18 +00:00
Chris Lattner
43e38979b5
Fix BasicAA/2003-04-25-GEPCrash.ll
...
llvm-svn: 5940
2003-04-25 18:03:06 +00:00
Chris Lattner
3e687b8b65
Remove unneccesary &*
...
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner
72a506d1f2
Fix bug: BasicAA/2003-04-22-GEPProblem.ll
...
llvm-svn: 5858
2003-04-22 22:00:27 +00:00
Chris Lattner
23615ca1b5
Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
...
llvm-svn: 5795
2003-04-16 22:50:19 +00:00
Chris Lattner
8080df315f
Remove unneccesary forward decl
...
llvm-svn: 5710
2003-03-06 16:37:29 +00:00
Chris Lattner
9d545c8aa3
Fix bug: BasicAA/2003-03-04-GEPCrash.ll
...
llvm-svn: 5695
2003-03-04 16:40:17 +00:00
Chris Lattner
eb82f294bd
ADd two new 'add' methods
...
llvm-svn: 5691
2003-03-03 23:28:05 +00:00
Chris Lattner
1778154dc7
Don't apply type information to load instructions if it will cause collapsing
...
llvm-svn: 5684
2003-03-03 17:13:31 +00:00
Chris Lattner
a29ba21066
Fix a problem with negative indexes
...
llvm-svn: 5681
2003-03-02 23:43:34 +00:00
Chris Lattner
77840ef407
Add dump method for Loops
...
llvm-svn: 5671
2003-02-28 16:54:45 +00:00
Chris Lattner
030a114dba
Simplify a bit by using a new member function
...
llvm-svn: 5662
2003-02-27 22:48:08 +00:00
Chris Lattner
c37308604f
Change behavior of changeExitBlock function to replace all instances of exit block
...
llvm-svn: 5661
2003-02-27 22:37:44 +00:00
Chris Lattner
e1d4fb3c2c
Fix bug: LICM/2003-02-27-PreheaderProblem.ll
...
There may be a single outside predecessor and
still need a new loop-preheader if the predecessor has multiple
successors.
llvm-svn: 5656
2003-02-27 21:51:38 +00:00
Chris Lattner
ac72aab6e7
- LoopInfo now calculates and tracks loop exit blocks
...
llvm-svn: 5650
2003-02-27 00:38:34 +00:00
Chris Lattner
5baf8bb966
Make the aliassettracker much more precise by actually tracking size
...
information for various accesses. What a concept.
llvm-svn: 5647
2003-02-26 22:11:00 +00:00
Chris Lattner
933b11a154
Fix bug: BasicAA/2003-02-26-AccessSizeTest.ll
...
llvm-svn: 5645
2003-02-26 21:57:23 +00:00
Chris Lattner
e923b037b7
Fix several bugs in basic-aa
...
llvm-svn: 5643
2003-02-26 21:28:49 +00:00
Chris Lattner
4e622afb23
Add new -no-aa implementation
...
llvm-svn: 5641
2003-02-26 19:57:10 +00:00
Chris Lattner
721f9fc770
Move BasicAA pass out to it's own header file
...
llvm-svn: 5640
2003-02-26 19:41:54 +00:00
Chris Lattner
4162adcfee
Adjust to implement new AA interface
...
llvm-svn: 5638
2003-02-26 19:29:36 +00:00
Chris Lattner
4d57299049
Adjust to new AA interface
...
llvm-svn: 5637
2003-02-26 19:29:16 +00:00