Chris Lattner
cd7482b354
Keep track of how many inlinings are performed
...
llvm-svn: 7076
2003-07-02 20:24:42 +00:00
Chris Lattner
d3d5c5c98e
Try using trivially dead deletion
...
llvm-svn: 7075
2003-07-02 19:49:11 +00:00
Chris Lattner
ad7b9c1810
Remove dead Nodes list
...
llvm-svn: 7065
2003-07-02 06:06:34 +00:00
Chris Lattner
116f68a990
Complete rewrite of td pass
...
llvm-svn: 7064
2003-07-02 04:39:44 +00:00
Chris Lattner
049d558988
Print collapsed to match the paper
...
llvm-svn: 7063
2003-07-02 04:39:27 +00:00
Chris Lattner
0b61cdd191
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
03f3cb1af7
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
db6e0ac800
Add some functions to the blacklist
...
llvm-svn: 7060
2003-07-02 04:38:00 +00:00
Chris Lattner
5a3d63d5aa
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
3ff99e3731
Make local pass print out its progress
...
llvm-svn: 7058
2003-07-02 04:37:26 +00:00
Chris Lattner
8309574e8d
Fix bug: Regression/Other/2002-03-11-ExprAssertion.ll
...
llvm-svn: 7046
2003-07-01 21:08:52 +00:00
Chris Lattner
23428214e9
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
e809e3afd8
Do not treat global variables as functions! (and assert failing)
...
llvm-svn: 7030
2003-07-01 16:27:53 +00:00
Chris Lattner
8a30ad6d89
Dont' print scalar nodes for ConstantPointerRefs
...
llvm-svn: 7029
2003-07-01 16:27:32 +00:00
Chris Lattner
269467d216
Minor cleanups
...
llvm-svn: 7027
2003-07-01 16:04:18 +00:00
Chris Lattner
70923c688d
Use the getFunctionNames method
...
llvm-svn: 7008
2003-06-30 05:57:39 +00:00
Chris Lattner
bfce1115e3
Add new method
...
llvm-svn: 7007
2003-06-30 05:57:30 +00:00
Chris Lattner
f8865a4389
Split CallSiteIterator out into DSCallSiteIterator.h, and generalize it a bit
...
llvm-svn: 7006
2003-06-30 05:27:53 +00:00
Chris Lattner
fa52af4fb0
Be more const-correct
...
llvm-svn: 7005
2003-06-30 05:27:18 +00:00
Chris Lattner
0929c5ef68
Fix bug in last checkin
...
llvm-svn: 7003
2003-06-30 05:18:26 +00:00
Chris Lattner
4ffb4e0e03
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
348d93c8c2
Handle the case where OldNodeMap == &ScalarMap correctly
...
llvm-svn: 7000
2003-06-30 05:09:29 +00:00
Chris Lattner
312783f0d2
Remove dead method
...
llvm-svn: 6999
2003-06-30 04:53:39 +00:00
Chris Lattner
01877f5224
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
7695128217
Do not multiply delete graphs if functions are sharing graphs
...
llvm-svn: 6997
2003-06-30 04:53:08 +00:00
Chris Lattner
6d187fdc5a
Move usages of explicit hash_* datastructures to use typedefs
...
llvm-svn: 6996
2003-06-30 03:36:09 +00:00
Chris Lattner
63aeacfe3d
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
151576413e
Adjust for new DSGraph API
...
llvm-svn: 6993
2003-06-30 03:14:54 +00:00
Chris Lattner
7e29f97d1d
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
205d1acfba
Fix minor bug in previous checkin
...
llvm-svn: 6986
2003-06-29 22:36:31 +00:00
Chris Lattner
992abdae26
Add support for ensuring that nodes are not incomplete
...
llvm-svn: 6985
2003-06-29 22:36:15 +00:00
Chris Lattner
16e3c398c8
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
0aca3e714f
Add print method to not get silly warning from analyze
...
llvm-svn: 6981
2003-06-29 20:27:16 +00:00
Chris Lattner
5da440b239
New pass which is useful for writing regression tests
...
llvm-svn: 6979
2003-06-29 18:17:07 +00:00
Chris Lattner
0877def4f6
Expose must alias information for global variables, implementing: DSGraph/mustalias.ll
...
llvm-svn: 6973
2003-06-29 00:54:08 +00:00
Chris Lattner
426b890f0d
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
83e21a0c93
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
fa578d0eb4
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
c7ba69d8b4
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
856a6cbb80
Avoid double negatives
...
llvm-svn: 6945
2003-06-28 21:58:28 +00:00
Chris Lattner
2890f428a9
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
81d75b7cfc
Fix bug: LevelRaise/2003-06-25-ExprAnalysis.ll
...
llvm-svn: 6903
2003-06-25 17:09:03 +00:00
Chris Lattner
d791d8e427
Remove support for the MultiObject flag, which was fundamentally broken
...
llvm-svn: 6840
2003-06-22 03:03:52 +00:00
Chris Lattner
4853d162af
* 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
1bec75e730
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
702a42bb8a
Avoid divide by zero errors
...
llvm-svn: 6738
2003-06-17 15:07:20 +00:00
Chris Lattner
3937726a5b
Nodes get forwarded when they are collapsed currently.
...
llvm-svn: 6696
2003-06-16 12:08:18 +00:00
Chris Lattner
82f4f85f6d
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
98105944b3
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
78dd43245d
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
9ed31bc497
Fix bug: CBackend/2003-05-31-MissingStructName.ll
...
llvm-svn: 6495
2003-05-31 23:30:52 +00:00
Chris Lattner
f789f29aaa
Eliminate unnecessary ->get calls that are now automatically handled.
...
llvm-svn: 6397
2003-05-29 15:12:27 +00:00
Vikram S. Adve
6bbfe341dd
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
060f38121e
Fix Bug: BasicAA/2003-05-21-GEP-Problem.ll
...
llvm-svn: 6270
2003-05-21 20:23:26 +00:00
Misha Brukman
9392c3ca74
The word `operands' has an `r' in it.
...
llvm-svn: 6250
2003-05-20 20:36:39 +00:00
Misha Brukman
56f4fa10fd
Sparc instruction opcodes now all live under the `V9' namespace.
...
llvm-svn: 6249
2003-05-20 20:32:24 +00:00
Misha Brukman
e5838c4d72
s/convertable/convertible/g
...
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Chris Lattner
0e416df2b2
Fix bug: Analysis/LoopInfo/2003-05-15-NestingProblem.ll
...
llvm-svn: 6230
2003-05-15 18:03:51 +00:00
Chris Lattner
d14c200425
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
d021c2d56b
Fix bug: LoopPreheaders/2003-04-25-AssertFail.ll
...
llvm-svn: 5959
2003-04-26 19:34:18 +00:00
Chris Lattner
be2d24e3b5
Fix BasicAA/2003-04-25-GEPCrash.ll
...
llvm-svn: 5940
2003-04-25 18:03:06 +00:00
Chris Lattner
6ee2cf5d89
Remove unneccesary &*
...
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner
4183b34d39
Fix bug: BasicAA/2003-04-22-GEPProblem.ll
...
llvm-svn: 5858
2003-04-22 22:00:27 +00:00
Chris Lattner
dee5f75221
Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
...
llvm-svn: 5795
2003-04-16 22:50:19 +00:00
Chris Lattner
1520eda3e3
Remove unneccesary forward decl
...
llvm-svn: 5710
2003-03-06 16:37:29 +00:00
Chris Lattner
ce848a3397
Fix bug: BasicAA/2003-03-04-GEPCrash.ll
...
llvm-svn: 5695
2003-03-04 16:40:17 +00:00
Chris Lattner
c048bb3add
ADd two new 'add' methods
...
llvm-svn: 5691
2003-03-03 23:28:05 +00:00
Chris Lattner
c12e5ccdb5
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
96afad55b9
Fix a problem with negative indexes
...
llvm-svn: 5681
2003-03-02 23:43:34 +00:00
Chris Lattner
a777f7a7ed
Add dump method for Loops
...
llvm-svn: 5671
2003-02-28 16:54:45 +00:00
Chris Lattner
72f876223f
Simplify a bit by using a new member function
...
llvm-svn: 5662
2003-02-27 22:48:08 +00:00
Chris Lattner
72a9854584
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
4f3b1d1808
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
b7b58f65c6
- LoopInfo now calculates and tracks loop exit blocks
...
llvm-svn: 5650
2003-02-27 00:38:34 +00:00
Chris Lattner
b5b0b7a934
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
053994f5a6
Fix bug: BasicAA/2003-02-26-AccessSizeTest.ll
...
llvm-svn: 5645
2003-02-26 21:57:23 +00:00
Chris Lattner
d98ac881ca
Fix several bugs in basic-aa
...
llvm-svn: 5643
2003-02-26 21:28:49 +00:00
Chris Lattner
dca12c77df
Add new -no-aa implementation
...
llvm-svn: 5641
2003-02-26 19:57:10 +00:00
Chris Lattner
d6a2a99a1b
Move BasicAA pass out to it's own header file
...
llvm-svn: 5640
2003-02-26 19:41:54 +00:00
Chris Lattner
e79b8319a6
Adjust to implement new AA interface
...
llvm-svn: 5638
2003-02-26 19:29:36 +00:00
Chris Lattner
13082d63dd
Adjust to new AA interface
...
llvm-svn: 5637
2003-02-26 19:29:16 +00:00
Chris Lattner
71b82bb494
Convert to work with new AliasAnalysis interface by conservatively assuming all pointers are arbitrarily large accesses
...
llvm-svn: 5636
2003-02-26 19:28:57 +00:00
Chris Lattner
0edc91ff2a
Calculate and pass load sizes to the alias analysis infrastructure
...
llvm-svn: 5635
2003-02-26 19:27:35 +00:00
Chris Lattner
d1e3208147
Adjust to new AA interface
...
Add tracking for Mod/Ref info
llvm-svn: 5634
2003-02-26 19:27:05 +00:00
Chris Lattner
3a3118394c
- Checkin of the alias analysis work:
...
* Takes into account the size of the memory reference to determine aliasing.
* Expose mod/ref information in a more consistent way
* BasicAA can now disambiguate A[i][1] and A[j][2] for conservative request
sizes
llvm-svn: 5633
2003-02-26 19:26:51 +00:00
Chris Lattner
7606fb65c0
This is a substantial rewrite of the AliasSetTracker class which now uses
...
a union-find based algorithm, is significantly faster, and is more general.
It will also scale to handle call instructions correctly, which is a nice
added bonus.
This includes a new pass -print-alias-sets which can be used to show how
alias sets are formed for a particular analysis.
llvm-svn: 5619
2003-02-24 20:37:56 +00:00
Chris Lattner
ef6ea65807
Dramatically simplify building of natural loops and fix a bug where the BBMap
...
was not correctly computed.
llvm-svn: 5606
2003-02-22 21:33:11 +00:00
Chris Lattner
1cbe5116ff
Fix the requisite bug that I introduced
...
llvm-svn: 5605
2003-02-20 00:28:00 +00:00
Chris Lattner
1dc4c29b6d
Fix 80 character formatting
...
llvm-svn: 5604
2003-02-20 00:18:07 +00:00
Chris Lattner
0049419836
Fix bug: 2003-02-19-LoopInfoNestingBug.ll
...
llvm-svn: 5603
2003-02-20 00:17:17 +00:00
Chris Lattner
b39d6355e1
Fix resolution of indirect function calls... whoops
...
llvm-svn: 5576
2003-02-14 23:27:18 +00:00
Chris Lattner
b5cbfa0f15
Mark function edges
...
llvm-svn: 5571
2003-02-14 20:25:47 +00:00
Chris Lattner
8acdca64fd
- Eliminate provably non-pointer nodes from graphs.
...
This helps a lot of testcases, for example:
New Time New #Nodes Old Time Old #Nodes
254.gap: 91.1024 21605 91.1397 22657
povray31: 2.7807 8613 3.0152 10338
255.vortex: 1.2034 8153 1.2172 8822
moria: .6756 3150 .7054 3877
300.twolf: .1652 2010 .1851 3270
Typically, testcases which use long and ulong integers a lot get better, f.e. povray above.
llvm-svn: 5566
2003-02-14 06:28:00 +00:00
Chris Lattner
ddd3b7fa54
Don't put integer pointers (longs) into the scalar map.
...
This speeds stuff up by 10% on some tests, woot!
llvm-svn: 5564
2003-02-14 04:55:58 +00:00
Chris Lattner
3699ef409c
Hax0r around a deficiency in the Pass infrastructure
...
llvm-svn: 5555
2003-02-13 21:44:18 +00:00
Chris Lattner
60ede774af
Use the new tailclip property new added to graphviz CVS to make call nodes
...
actually intelligable
llvm-svn: 5554
2003-02-13 20:14:40 +00:00
Chris Lattner
a17866894a
Move node forwarding code from being inlined to being out-of-line.
...
This brings a 11.6% speedup to steens, and a 3.6 overall speedup to ds-aa
llvm-svn: 5552
2003-02-13 19:09:00 +00:00
Chris Lattner
3595c3387a
Rename options
...
llvm-svn: 5537
2003-02-11 23:12:09 +00:00
Chris Lattner
7127d7db7a
Implement a "union-findy" version of DS-Analysis, which eliminates the
...
Referrers list on DSNodes.
llvm-svn: 5536
2003-02-11 23:11:51 +00:00
Chris Lattner
763502671d
Minor tweaks to printing. Close the file before viewing it in viewGraph
...
llvm-svn: 5535
2003-02-11 19:27:27 +00:00
Chris Lattner
e715357909
Modest speedup which seems to help steens quite a bit on large graphs
...
llvm-svn: 5532
2003-02-10 18:47:23 +00:00
Chris Lattner
f8292feb04
Fix problem breaking GAP, use hasNoReferrers more
...
llvm-svn: 5530
2003-02-10 18:18:18 +00:00
Chris Lattner
75007f16de
Implement a new "viewGraph" method which can be used to instantly view a graph from gdb
...
llvm-svn: 5528
2003-02-10 18:17:07 +00:00
Chris Lattner
b96f2123ab
Rearrange code
...
llvm-svn: 5527
2003-02-10 18:16:36 +00:00
Chris Lattner
5153d44a91
Fix problem breaking Fhourstones
...
llvm-svn: 5526
2003-02-10 18:16:19 +00:00
Chris Lattner
df2a78e833
Make steensgaards performance not shameful
...
llvm-svn: 5524
2003-02-10 00:14:57 +00:00
Chris Lattner
43df2886c5
Don't insert null entries into the scalar map for constexpr (cast null to Ty)
...
llvm-svn: 5523
2003-02-09 23:04:12 +00:00
Chris Lattner
b0208e1ae3
Allow printing of various types of alias analysis results
...
llvm-svn: 5520
2003-02-09 20:40:13 +00:00
Chris Lattner
2393160bde
Implement knowledge in BasicAA that &A->field != &A and (P+1) != P
...
llvm-svn: 5519
2003-02-09 19:38:11 +00:00
Chris Lattner
1fbac976b9
- Fix BasicAA to correctly detect the non-aliasness of A[1] & A[2]
...
llvm-svn: 5518
2003-02-09 19:27:21 +00:00
Chris Lattner
4e0457a027
Switch to using the right call vector
...
llvm-svn: 5517
2003-02-09 19:26:47 +00:00
Chris Lattner
93fdaf9cb9
Fix major bugs in incompleteness marking that were pessimizing results
...
llvm-svn: 5515
2003-02-09 18:42:43 +00:00
Chris Lattner
e4059b4ed6
Print out the steens graph if -debug is specified
...
llvm-svn: 5514
2003-02-09 18:42:16 +00:00
Chris Lattner
0eee7eb390
* Fix a bug where global incompleteness marking would not mark the global
...
itself incomplete!
* Allow incompleteness callers to specify they don't want globals to be
considered sources of incompleteness.
llvm-svn: 5513
2003-02-09 18:41:49 +00:00
Chris Lattner
26bd24cd81
Add a special case for main because we know it's incoming arguments don't alias
...
llvm-svn: 5511
2003-02-08 23:08:02 +00:00
Chris Lattner
d73f9f55f2
Fix a bug where we would mark the callees arguments incomplete if the caller was external.
...
llvm-svn: 5510
2003-02-08 23:07:39 +00:00
Chris Lattner
eadcadc54b
Fix division by zero problem
...
llvm-svn: 5509
2003-02-08 23:04:50 +00:00
Chris Lattner
63ea85f089
Remove explicit result counters
...
llvm-svn: 5508
2003-02-08 23:03:17 +00:00
Chris Lattner
cb7d6429fc
Add a flag which effectively disables field sensitivity
...
llvm-svn: 5506
2003-02-08 20:18:39 +00:00
Chris Lattner
fdc902e6f2
Don't bother counting alias results, allow the AliasAnalysisCounter to do that.
...
llvm-svn: 5505
2003-02-07 20:39:48 +00:00
Chris Lattner
9a734b6c24
Allow counting multiple passes, and print the pass name counted
...
llvm-svn: 5504
2003-02-07 20:39:17 +00:00
Chris Lattner
e996681c1c
New general purpose alias analysis result auditor
...
llvm-svn: 5503
2003-02-07 19:46:03 +00:00
Chris Lattner
371fd2c59b
Add a summary
...
llvm-svn: 5500
2003-02-06 22:06:08 +00:00
Chris Lattner
4fdb75f223
Simple N^2 alias anlysis accuracy checker
...
llvm-svn: 5498
2003-02-06 21:29:49 +00:00
Chris Lattner
f7979c2f2b
Fix an assertion failure
...
llvm-svn: 5496
2003-02-06 00:15:08 +00:00
Chris Lattner
80614ee5ef
Implement optimization for direct function call case. This dramatically
...
reduces the number of function nodes created and speeds up analysis by
about 10% overall.
llvm-svn: 5495
2003-02-05 21:59:58 +00:00
Chris Lattner
d7357ab5d1
Remove bogus assertion
...
llvm-svn: 5492
2003-02-04 16:33:23 +00:00
Chris Lattner
04fb4b5808
Fix a huge bug with handling non-pointer instructions
...
llvm-svn: 5491
2003-02-04 00:59:50 +00:00
Chris Lattner
36fd3eccbd
Make the TD pass not include all of the call nodes from the local pass,
...
eliminating incomplete markers from them
llvm-svn: 5490
2003-02-04 00:59:32 +00:00
Chris Lattner
a0e9e6ec8c
Add sanity check
...
llvm-svn: 5489
2003-02-04 00:03:57 +00:00
Chris Lattner
7e41fedd3a
Fix steensgaard to work on a lot more cases...
...
llvm-svn: 5488
2003-02-04 00:03:37 +00:00
Chris Lattner
4113571cd1
Fix printing of nonfunction graphs
...
llvm-svn: 5487
2003-02-04 00:03:18 +00:00
Chris Lattner
eededa396e
Rename variable
...
llvm-svn: 5486
2003-02-03 22:51:53 +00:00
Chris Lattner
390cec0c77
Hack to work around deficiency in pass infrastructure
...
llvm-svn: 5485
2003-02-03 22:51:28 +00:00
Chris Lattner
8fd2b77547
Initial implementation of ds-aa
...
llvm-svn: 5484
2003-02-03 22:50:46 +00:00
Chris Lattner
4b9eb3d2a1
Add statistics to basicAA pass
...
llvm-svn: 5480
2003-02-03 21:16:17 +00:00
Chris Lattner
1d3922ac0b
* Fix a bug introduced in the last checkin wrt Stack markers
...
* Make cloning more efficient in the process...
llvm-svn: 5479
2003-02-03 20:08:51 +00:00
Chris Lattner
8bb9513bd8
Implement the globals graph!
...
llvm-svn: 5477
2003-02-03 19:12:15 +00:00
Chris Lattner
e396e9bbae
Add better debug output
...
llvm-svn: 5476
2003-02-03 19:11:38 +00:00
Chris Lattner
07ba9d9010
Be a bit more specific in caption
...
llvm-svn: 5469
2003-02-02 16:42:01 +00:00
Chris Lattner
9e75f38bb9
Fix a bug where we would delete neccesary calls in bu pass
...
llvm-svn: 5465
2003-02-01 06:54:31 +00:00
Chris Lattner
5965bbb02f
Fix a bug where we would incorrectly delete globals which had edges to alive nodes in
...
a graph in the t-d pass. This slows down the TD pass by quite a bit (1/3), but is
needed for correctness.
llvm-svn: 5464
2003-02-01 06:51:17 +00:00
Chris Lattner
c154bdcd4c
Delete nodes more efficiently
...
llvm-svn: 5463
2003-02-01 06:41:15 +00:00
Chris Lattner
71449ba556
Remove dead nodes more efficiently
...
llvm-svn: 5462
2003-02-01 06:23:33 +00:00
Chris Lattner
4f276cc4dd
Improve efficiency of aliveness traversal code
...
llvm-svn: 5461
2003-02-01 06:17:02 +00:00
Chris Lattner
c44c04af44
Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
...
This change provides a small (3%) but consistent speedup
llvm-svn: 5460
2003-02-01 04:52:08 +00:00
Chris Lattner
ee97c8b08a
Remove using declarations
...
llvm-svn: 5456
2003-02-01 04:01:21 +00:00
Chris Lattner
87d76c7f01
Remove globals on the bottom up pass which do not contain any information
...
llvm-svn: 5451
2003-01-31 23:57:36 +00:00
Chris Lattner
0cd81260e6
Add functions to the ban list
...
llvm-svn: 5450
2003-01-31 23:57:10 +00:00
Chris Lattner
c5497c816f
Use and implement API for graph traversals
...
llvm-svn: 5431
2003-01-29 21:10:20 +00:00
Chris Lattner
362dab3705
free instructions mark their operands as being heap nodes.
...
llvm-svn: 5425
2003-01-28 20:59:57 +00:00
Chris Lattner
38c5e417a7
* Eliminate boolean arguments in favor of using enums
...
llvm-svn: 5420
2003-01-23 22:06:33 +00:00
Chris Lattner
a1d9011d6e
* Eliminate boolean arguments in favor of using enums
...
* T-D pass now eliminates unreachable globals
llvm-svn: 5419
2003-01-23 22:05:33 +00:00
Chris Lattner
98034fa407
Slight efficiency improvement
...
llvm-svn: 5418
2003-01-23 21:31:16 +00:00
Chris Lattner
2d4945580f
Fix analysis of the Burg program
...
llvm-svn: 5401
2003-01-22 22:00:24 +00:00
Chris Lattner
24c1d5e551
Rename llvm/Analysis/LiveVar/FunctionLiveVarInfo.h -> llvm/CodeGen/FunctionLiveVarInfo.h
...
llvm-svn: 5284
2003-01-14 23:05:08 +00:00
Chris Lattner
de1d729747
Move llvm/Analysis/LiveVar/ValueSet.h to CodeGen/ValueSet.h
...
llvm-svn: 5282
2003-01-14 22:56:37 +00:00
Chris Lattner
0b2f0ed730
Move annotations to support library
...
llvm-svn: 5270
2003-01-14 21:31:39 +00:00
Misha Brukman
1028ac46d6
'graph' is spelled without a 'c'.
...
Also added Statistic counters for NoAlias and MayAlias.
llvm-svn: 4972
2002-12-12 05:34:10 +00:00
Chris Lattner
c42ada2e5e
Remove #includes
...
llvm-svn: 4968
2002-12-12 03:47:27 +00:00
Vikram S. Adve
775e51d87a
Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,
...
i.e., enumerates all data and control dependences for the function.
llvm-svn: 4958
2002-12-08 14:13:19 +00:00
Vikram S. Adve
8975afdfc4
An explicit representation of dependence graphs, and a pass that
...
computes a dependence graph for data dependences on memory locations
using interprocedural Mod/Ref information.
llvm-svn: 4957
2002-12-08 13:26:29 +00:00
Chris Lattner
3935d2b1ec
Add total instruction, bb, & function counts
...
llvm-svn: 4954
2002-12-07 23:24:24 +00:00
Vikram S. Adve
04aee9478c
Two bug fixes:
...
(1) Make entries for Constant values in the ScalarMap.
(2) Set MOD bit for the node pointed to by the
argument of a free instruction.
llvm-svn: 4948
2002-12-06 21:17:10 +00:00
Vikram S. Adve
0d5559fdfb
Fix several related bugs in DSNode::mergeWith() caused by the
...
fact that the incoming nodes may be merged away at intermediate
steps. Use an extra level of indirection via DSNodeHandles
to track the nodes being merged. All this now happens in a
static helper function MergeNodes().
llvm-svn: 4947
2002-12-06 21:15:21 +00:00
Vikram S. Adve
bfff743897
Cute bug fix: when moving links from N to this, some links could have
...
been missed if node *this got merged away due to recursive merging!
Also, links were not moved correctly if a node is collapsed.
llvm-svn: 4933
2002-12-05 17:17:26 +00:00
Chris Lattner
5e05817565
Simplify code
...
llvm-svn: 4886
2002-12-03 19:40:16 +00:00
Vikram S. Adve
2d2303db22
Fix logical error in TD pass: we should clear Mod/Ref bits of each caller
...
before inlining their graphs into a function. To support this,
added flags to CloneFlags to strip/keep Mod/Ref bits.
llvm-svn: 4836
2002-11-27 17:41:13 +00:00
Vikram S. Adve
19b3303f3d
(1) Bug fix that was causing nodes with dangling references to be freed.
...
We run removeDeadNodes() on the TD graph up front before using it.
(2) Major enhancement to printing of results: now we list the actual objects
that are mod/ref instead of just printing the bit vectors.
Also an important bug fix in TDDataStructures pass (no change here):
clear Mod/Ref bits of callers before inlining into a function.
llvm-svn: 4833
2002-11-27 17:37:46 +00:00
Vikram S. Adve
68690673ad
Keep global nodes in each DS Graph (by forcing them to be marked live).
...
llvm-svn: 4831
2002-11-25 18:21:25 +00:00
Chris Lattner
79d943eb67
Add peak memory usage measurement stuff
...
Add structure padding optimizations
llvm-svn: 4749
2002-11-18 21:44:46 +00:00
Chris Lattner
63a9e5c068
Add peak memory usage support
...
llvm-svn: 4748
2002-11-18 21:44:19 +00:00
Chris Lattner
77b80616b0
Add stats
...
llvm-svn: 4747
2002-11-18 21:42:45 +00:00
Chris Lattner
29a320bfcf
Add hack to only consider indirect calls indirect if they do more than cast
...
their source function
llvm-svn: 4723
2002-11-17 22:17:12 +00:00
Chris Lattner
1e3652955b
Add MaxSCC statistics
...
llvm-svn: 4722
2002-11-17 22:16:28 +00:00
Chris Lattner
342f68151e
Count CallInsts correctly, remove unneccesary initializers
...
S: ----------------------------------------------------------------------
llvm-svn: 4721
2002-11-17 22:15:40 +00:00
Dinakar Dhurjati
a7be9a7db7
Gives the count for various instructions.
...
llvm-svn: 4706
2002-11-13 18:22:13 +00:00
Vikram S. Adve
16eac628f4
Pass to compute various statisics related to DSGraphs.
...
For now, this just computes the #indirect call sites and
the avg. #callees per indirect call site (actually it prints
both totals and the average is their ratio).
llvm-svn: 4705
2002-11-13 15:41:00 +00:00
Chris Lattner
ccc27ecd35
Inline graphs from outside the SCC into the SCC before SCC resolution starts
...
llvm-svn: 4701
2002-11-12 15:58:08 +00:00
Chris Lattner
dcb4ac9594
Fix two bugs:
...
* The globals vector was getting broken and unsorted, this caused vortex
to get badly pessimized
* Node offset handling was being handled really poorly, and in particular
we were not merging types with offsets right. This causes several graphs
to be non-merged.
llvm-svn: 4699
2002-11-12 07:20:45 +00:00
Chris Lattner
1aeca4d0e6
Fix bug
...
llvm-svn: 4697
2002-11-11 22:23:56 +00:00
Chris Lattner
eb10d4cbce
Handle a mismatch between # function args and call site args
...
llvm-svn: 4696
2002-11-11 21:36:05 +00:00
Chris Lattner
8aed9820e2
Elimiante calls to a node with nothing in it.
...
llvm-svn: 4695
2002-11-11 21:35:38 +00:00
Chris Lattner
59821c5ce6
Complete rewrite of BU code to use Tarjan's SCC finding algorithm to drive
...
the algorithm instead of hand coded depth first iteration
llvm-svn: 4694
2002-11-11 21:35:13 +00:00
Chris Lattner
dd3dd4abeb
Mark stuff reachable by _AUX_ calls as incomplete in the BU graph
...
llvm-svn: 4690
2002-11-11 03:36:55 +00:00
Chris Lattner
cca3599c0b
Fix infinite loop in the BU algorithm. Unfortunately this dies a serious
...
death when handling moderately sized SCC's, but what can you do
llvm-svn: 4689
2002-11-11 00:01:34 +00:00
Chris Lattner
773da868a0
Print the right call set size
...
llvm-svn: 4688
2002-11-11 00:01:02 +00:00
Chris Lattner
6fa9a7f7f4
Use call site mergeWith method to simplify code
...
llvm-svn: 4687
2002-11-11 00:00:46 +00:00
Chris Lattner
d7f9f635ec
Fix a bug that could trigger when varargs call sites had non-matching number of arguments
...
llvm-svn: 4683
2002-11-10 07:46:08 +00:00
Chris Lattner
7b61563d99
* Dramatically rework liveness evaluation.
...
* Implement the first step of the Globals graph: Deleting nodes from function
graphs. In practice, these nodes need to be moved to the globals graph, but
this will be taken care of later. Note that the graphs computed right now are
not strictly correct!
llvm-svn: 4681
2002-11-10 06:59:55 +00:00
Chris Lattner
e79ce7d359
Honor the shouldPrintAuxCalls flag
...
llvm-svn: 4678
2002-11-10 06:53:59 +00:00
Chris Lattner
17da287408
Initialize PrintAuxCalls member
...
llvm-svn: 4677
2002-11-10 06:53:38 +00:00
Chris Lattner
3b83d797d6
* Bottom-Up graphs print the Aux call vector
...
* Significantly improve DEBUG output
* Aggressively fold calls together if we inlined a graph that provides
call nodes.
* Add a bailout if the current graph has over 200 call nodes in it, this is
a really whacky case that should never happen.
llvm-svn: 4675
2002-11-10 06:52:47 +00:00
Chris Lattner
715a3a3b5c
eliminate the ability to remove global nodes from deadNodeElminate... for now.
...
This slows stuff down a bit, but it should get much better before it gets any
worse.
llvm-svn: 4666
2002-11-09 22:07:02 +00:00
Chris Lattner
3e32cd8e8b
Remove obsolete code
...
llvm-svn: 4665
2002-11-09 21:41:44 +00:00
Chris Lattner
d185d2ce9d
Fix logic
...
llvm-svn: 4664
2002-11-09 21:40:58 +00:00
Chris Lattner
4b1be35569
Add globals graphs to all three passes
...
llvm-svn: 4663
2002-11-09 21:12:07 +00:00
Chris Lattner
0de21ea32d
Move maskNodeTypes to header file
...
llvm-svn: 4661
2002-11-09 21:02:26 +00:00
Chris Lattner
380d1ad4ab
Clean up DSGraph::removeDeadNodes interface
...
llvm-svn: 4660
2002-11-09 21:00:49 +00:00
Chris Lattner
e703c52b20
Make removeTriviallyDeadNodes a private interface of DSGraph
...
llvm-svn: 4659
2002-11-09 20:55:24 +00:00
Chris Lattner
2dd1adafa6
Don't put constants into the scalar map!
...
llvm-svn: 4657
2002-11-09 20:14:03 +00:00
Chris Lattner
e742f31e0c
Add initial support for a globals graph
...
llvm-svn: 4656
2002-11-09 20:01:01 +00:00
Chris Lattner
5737a600d7
Tighten up array handling
...
llvm-svn: 4655
2002-11-09 19:25:27 +00:00
Chris Lattner
bcc12023ce
#include Datastructure.h first
...
llvm-svn: 4654
2002-11-09 19:25:10 +00:00
Chris Lattner
a2620ac156
Fix warning
...
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner
63aeefeafb
Fix warning & release build
...
llvm-svn: 4648
2002-11-09 00:49:05 +00:00
Chris Lattner
be46569ba1
Fold arrays down to a single element. This causes huge wins on some benchmarks
...
for example: 197.parser (64M->14M), 164.gzip (14M->2.7M). The actual graphs
represented should not change at all.
llvm-svn: 4643
2002-11-08 22:49:57 +00:00
Chris Lattner
09a21dc2f5
ONLY merge in the aux call sites, this causes a HUGE speedup
...
llvm-svn: 4640
2002-11-08 22:27:25 +00:00
Chris Lattner
56363a05e6
Allow specification of whether the call sites should be copied, AND whether
...
the aux call sites should be copied
llvm-svn: 4639
2002-11-08 22:27:09 +00:00
Chris Lattner
ef305cec98
Reenable 'quick exit' case
...
llvm-svn: 4638
2002-11-08 22:26:43 +00:00
Chris Lattner
2ea00e994e
Reduce amount of work needed to compute ip/modref
...
llvm-svn: 4637
2002-11-08 22:17:01 +00:00
Chris Lattner
0c2f4bab3a
Reimplement TD pass completely it now works
...
llvm-svn: 4635
2002-11-08 21:28:37 +00:00
Chris Lattner
a06ac62a5e
Cannot modify original call sites vector
...
llvm-svn: 4634
2002-11-08 21:27:37 +00:00
Chris Lattner
c20122732e
- Add a bunch of checking to make sure that dead nodes are not used after they
...
are marked DEAD. This helped track down some bugs
- Fix a bunch of bugs where we were doing work on nodes after they became dead
- Add support for aux function call sites
- Add support for not cloning call sites
llvm-svn: 4633
2002-11-08 21:27:12 +00:00
Chris Lattner
639898c9bb
Remove gunk used by broken TD pass
...
llvm-svn: 4632
2002-11-08 21:25:24 +00:00
Chris Lattner
465668552a
Fix IPModRef to use new DS interface
...
llvm-svn: 4628
2002-11-08 19:13:14 +00:00
Chris Lattner
a075a5801b
Use DSNodeHandleMap instead to be safe
...
llvm-svn: 4622
2002-11-08 05:01:14 +00:00
Chris Lattner
5e730ed972
* actually handle constants (especially constantexprs) correctly.
...
- This seems to dramatically improve many benchmarks, only slowing down
gzip significantly.
llvm-svn: 4621
2002-11-08 05:00:44 +00:00
Chris Lattner
b0c9b37048
Add flush
...
llvm-svn: 4619
2002-11-08 01:21:07 +00:00
Chris Lattner
5904e63465
Implement ResolveCallSiteModRefInfo for IPModRef. computeModRef is not yet done though!
...
llvm-svn: 4602
2002-11-07 07:12:23 +00:00
Chris Lattner
5e865cdbe2
Instead of using a bool that constant has to be explained, use a self
...
explanitory enum instead.
llvm-svn: 4600
2002-11-07 07:06:20 +00:00
Chris Lattner
df307e6fd0
Implement a new mergeInGraph method, which basically factors code out of
...
the BU class.
This will be used by the IPModRef class to do stuff, eventually perhaps the
TD pass will use it also.
Speaking of the TD pass, this also eliminates the self recursive case, which
was broken, and couldn't occur anyway.
llvm-svn: 4599
2002-11-07 06:31:54 +00:00
Chris Lattner
ca03c3b516
Rename DataStructureAnalysis namespace to DS
...
llvm-svn: 4596
2002-11-07 05:20:53 +00:00
Chris Lattner
28c34bd8eb
Fix problem with dangling referrers
...
llvm-svn: 4595
2002-11-07 05:00:35 +00:00
Chris Lattner
f9d29b3299
Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, and
...
The problem was merging two unsized types like function's, ie int (int*) with
int (uint *)
llvm-svn: 4594
2002-11-07 04:59:28 +00:00
Chris Lattner
c03a377f6a
Compute total number of nodes and # call nodes
...
llvm-svn: 4592
2002-11-07 02:18:46 +00:00
Chris Lattner
4f8e2acaa2
Move printouts to be wrapped in DEBUG() macros
...
llvm-svn: 4588
2002-11-07 01:54:56 +00:00
Chris Lattner
2d0081a148
When the -only-print-main-ds option is specified, still print out graph size
...
statistics for skipped functions
llvm-svn: 4587
2002-11-07 01:54:44 +00:00
Chris Lattner
bac5fec8b9
Allow the ResolveCallSiteModRefInfo method to return a mapping of nodes,
...
implement the mod/ref bit masking
llvm-svn: 4578
2002-11-06 19:59:33 +00:00
Chris Lattner
2b23bf16e3
Add a stub to implement the context sensitive mod/ref info for call sites
...
llvm-svn: 4577
2002-11-06 19:38:43 +00:00
Chris Lattner
3cf08cc08a
Give a back pointer to the IPModRef object to the FunctionModRefInfo object
...
llvm-svn: 4576
2002-11-06 19:07:13 +00:00
Chris Lattner
2f05c9a206
Remove a couple of #includes, move some code from .h file
...
llvm-svn: 4575
2002-11-06 18:38:18 +00:00
Chris Lattner
92acbcda99
Change Steens class to build with Vikram's changes
...
llvm-svn: 4572
2002-11-06 18:08:32 +00:00
Chris Lattner
2b79f4b7c3
Make PointerSize & Shift be enums
...
Fix problem with recursive merging
llvm-svn: 4570
2002-11-06 18:01:39 +00:00
Vikram S. Adve
075a8d7341
Make query operations non-const to allow demand-driven analyses.
...
llvm-svn: 4569
2002-11-06 17:17:55 +00:00
Vikram S. Adve
36da63f19f
An interprocedural analysis pass that computes flow-insensitive
...
IP Mod and Ref information for every function and every call site.
llvm-svn: 4567
2002-11-06 17:02:03 +00:00
Chris Lattner
48e37d9b97
Dramatically simplify internal DSNode representation, get implementation
...
*FULLY OPERATIONAL* and safe. We are now capable of completely analyzing
at LEAST the Olden benchmarks + 181.mcf
llvm-svn: 4562
2002-11-06 06:20:27 +00:00
Chris Lattner
230f6926b0
Delete "StripScalars" argument to cloneInto method
...
llvm-svn: 4560
2002-11-06 06:16:30 +00:00
Chris Lattner
6c213d673b
Attempted fixes to the mergemap to make it work better.
...
Ended up disabling merge map merging completely. It shall be removed.
llvm-svn: 4550
2002-11-05 00:01:58 +00:00
Vikram S. Adve
5beed607f4
Simple passes that print out SCCs in the CFGs or in the CallGraph of a module.
...
llvm-svn: 4532
2002-11-04 14:20:22 +00:00
Chris Lattner
7e8b76009f
Change the "Cannot merge two portions of the same node yet" from an assertion
...
into a "oh crap, lets collapse" case
llvm-svn: 4530
2002-11-04 06:48:26 +00:00
Chris Lattner
cd691d2047
Give a better error message in an unhandled case
...
llvm-svn: 4521
2002-11-04 02:29:15 +00:00
Chris Lattner
b9d55473b5
Allow the call graph to be called from analyze naturally with print implemented
...
llvm-svn: 4517
2002-11-04 00:21:19 +00:00
Chris Lattner
a20fabc7ec
Rename ValueMap to ScalarMap
...
llvm-svn: 4516
2002-11-03 21:27:48 +00:00
Chris Lattner
bd7af8e664
Rename NewNode flag to HeapNode
...
llvm-svn: 4515
2002-11-03 21:24:04 +00:00
Chris Lattner
4b6a813048
Change the letters used to represent stack and heap allocations to "S" and "H"
...
respectively. This is to make presentation easier in the paper.
llvm-svn: 4514
2002-11-03 19:46:15 +00:00
Chris Lattner
63ba1aca7c
Implement the "unknown flag" which mainly consists of aligning printing code
...
llvm-svn: 4490
2002-11-02 00:36:03 +00:00
Chris Lattner
364e6e82fd
Oops, this was not meant to be checked in
...
llvm-svn: 4489
2002-11-02 00:26:32 +00:00
Chris Lattner
a7b0d4eb08
Stop representing scalars as explicit nodes in the graph. Now the only
...
nodes in the graph are memory objects, which is very nice. This also greatly
reduces the size and memory footprint for DSGraphs. For example, the local
DSGraph for llu went from 65 to 13 nodes with this change. As a side bonus,
dot seems to lay out the graphs slightly better too. :)
llvm-svn: 4488
2002-11-02 00:13:20 +00:00
Chris Lattner
8a1854fc47
Fix comments, steens is context sensitive, we just haven't implemented
...
mod/ref apis yet
llvm-svn: 4485
2002-11-01 17:34:23 +00:00
Chris Lattner
8c68d869e5
Add a fixme
...
llvm-svn: 4479
2002-10-31 23:24:00 +00:00
Chris Lattner
c1d8820711
* Minor optimization: when merging nodes, merge the smaller one into the
...
larger one.
* Handle the case where we are merging two nodes of different size better.
llvm-svn: 4476
2002-10-31 22:41:15 +00:00
Chris Lattner
5d428a0029
Remove dead code
...
llvm-svn: 4467
2002-10-31 06:52:26 +00:00
Chris Lattner
7d5f19886d
This fixes all kinds of problems with array handling. There are still bugs to
...
be fixed, but we are getting much closer now.
* Make DSNode::TypeRec a full fledged DSTypeRec type.
* Add methods used to update and access the typerecords elements
* Add methods to query if and to cause a node to be completely folded
* DSGraph construction doesn't use the allocation type for anything at all,
now nodes get their type information based on how they are used.
* Fixed a bug with global value handling introduced in the last checkin
* GEP support is now much better, arrays are handled correctly. The array
flag is now updated in type records. There are still cases that are not
handled yet (we do not detect pessimizations), but getting much closer.
llvm-svn: 4465
2002-10-31 05:45:02 +00:00
Chris Lattner
d1998c4aea
Use new isCommutative interface, which gives us SetEQ and SetNE for free.
...
Thanks fly out to Casey Carter for this fix.
llvm-svn: 4460
2002-10-31 04:20:07 +00:00
Misha Brukman
632df28deb
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
a7ee81d6a5
Eliminate uses of MachineBasicBlock::get
...
llvm-svn: 4340
2002-10-28 18:01:21 +00:00
Chris Lattner
8710aab04c
Rename MachineCodeForBasicBlock to MachineBasicBlock
...
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Chris Lattner
51a2c3cc2d
- Make sure to only keep track of mappings that the TD pass may need in the
...
future. This prevents having spurious map entries to nodes that we really
don't care about. This allows us to reenable the DeadNodeElim, which was
disabled.
llvm-svn: 4260
2002-10-22 16:01:03 +00:00
Chris Lattner
d90e74ae13
The callee is not correct, and confuses the TD pass. Null it out.
...
llvm-svn: 4259
2002-10-22 15:58:46 +00:00
Chris Lattner
155fffd350
Delete unused arguments to DSGraph::cloneInto method
...
llvm-svn: 4253
2002-10-21 19:50:29 +00:00
Chris Lattner
f76087336f
- Add "ResolvingCaller" to the CallSite record. This keeps track of which
...
function was finally able to resolve the function call. Adding this allows
the TD pass to actually work right!
- Temporarily disable dead node pruning. This will be reenabled soon.
llvm-svn: 4252
2002-10-21 19:47:18 +00:00
Chris Lattner
c6191df9af
Add another copy ctor form
...
llvm-svn: 4251
2002-10-21 15:32:34 +00:00
Chris Lattner
78c1e7d83c
As it turns out, we don't need a fully generic mapping copy ctor, we just need
...
something that maps through a std::map. Since this simplified the client and
implementation code, do so now.
llvm-svn: 4250
2002-10-21 15:04:18 +00:00
Chris Lattner
32438d8c84
Don't create a new node for every reference to a global. This caused a huge
...
node explosion that doesn't help anything at all. In previous versions of
the representation this DID help, but not anymore.
llvm-svn: 4249
2002-10-21 13:51:30 +00:00
Chris Lattner
800b7e33df
Fix a confusing bug that caused return value and callee pointers to not
...
be printed!
llvm-svn: 4248
2002-10-21 13:47:57 +00:00
Chris Lattner
2f5a6d46ae
Remove some unneccesary 'using' directives
...
llvm-svn: 4246
2002-10-21 13:31:48 +00:00
Chris Lattner
80e1a74820
Fix bug with prior checkin
...
llvm-svn: 4242
2002-10-21 02:18:55 +00:00
Chris Lattner
5c3ce31e1f
- Make DSCallSite not inherit from std::vector. Renamed methods slightly.
...
Make copy ctor have two versions to avoid dealing with conditional template
argument. DSCallSite ctor now takes all arguments instead of taking one
and being populated later.
llvm-svn: 4240
2002-10-21 02:08:03 +00:00
Chris Lattner
faa756ecee
Avoid extra copy
...
llvm-svn: 4239
2002-10-20 22:12:06 +00:00
Chris Lattner
3af17ce2cf
Simplify code a bit, add comment flyer
...
llvm-svn: 4238
2002-10-20 22:11:44 +00:00
Chris Lattner
fd16b72fc7
Split some long lines
...
llvm-svn: 4237
2002-10-20 22:11:17 +00:00
Vikram S. Adve
e85319693e
Remove spurious caller pointer in DSCallSite.
...
Also add functions to access pointer argument nodes cleanly.
llvm-svn: 4235
2002-10-20 21:41:02 +00:00
Chris Lattner
c94855e46b
This function can be static
...
llvm-svn: 4234
2002-10-20 20:39:31 +00:00
Chris Lattner
07d69052f8
Fix previous checkin :(
...
llvm-svn: 4233
2002-10-20 20:39:17 +00:00
Chris Lattner
28bef38c56
Avoid extra callSite copy
...
llvm-svn: 4232
2002-10-20 20:32:13 +00:00
Chris Lattner
43301680aa
Print the array flag
...
llvm-svn: 4231
2002-10-20 20:29:10 +00:00
Vikram S. Adve
dc9e142686
Added a first-class representation for each call site that can be
...
used in the DS graphs. Essentially, what was vector<DSNodeHandle>
before is now a DSCallSite with the same vector, plus pointers to the
CallInst and the caller Function. The special-purpose class
BUDataStructure::CallSite is no longer needed.
llvm-svn: 4228
2002-10-20 18:07:37 +00:00
Chris Lattner
f931f6b5c7
Convert typerec to be a structure instead of a pair
...
llvm-svn: 4226
2002-10-18 18:22:46 +00:00
Chris Lattner
ac2de97c75
Print Mod/ref info
...
llvm-svn: 4224
2002-10-17 22:13:28 +00:00
Chris Lattner
b4e800aabf
Calculate mod/ref info
...
llvm-svn: 4223
2002-10-17 22:13:19 +00:00
Chris Lattner
bf25578f02
Remove more obsolete code
...
llvm-svn: 4221
2002-10-17 20:53:12 +00:00
Chris Lattner
b182216df8
* Make the DSGraph cloner automatically merge global nodes
...
* BUClosure doesn't have to worry about global nodes
* TDClosure now works with global nodes
* Reenable DNE on TD pass, now that globals work right
llvm-svn: 4220
2002-10-17 20:09:52 +00:00
Chris Lattner
981c92a9e2
Remove obsolete code
...
llvm-svn: 4218
2002-10-17 04:58:10 +00:00
Chris Lattner
7c02ec2562
Enable incompleteness marking
...
llvm-svn: 4217
2002-10-17 04:57:28 +00:00
Chris Lattner
f10327ebce
* First try at implementing TD pass this does not merge global nodes yet,
...
among other things.
* Significant rewrite of TD pass to avoid potentially N^2 algorithms if
possible. It is still not complete, but at least it's checked in now.
llvm-svn: 4215
2002-10-17 04:26:54 +00:00
Chris Lattner
6b5acda098
Reenable printing of TD analysis
...
llvm-svn: 4214
2002-10-17 04:24:30 +00:00
Chris Lattner
a1cfcf4dff
* Add data structures and code to track the call sites for each function
...
llvm-svn: 4213
2002-10-17 04:24:08 +00:00
Chris Lattner
ddebb4343e
Cleanup data structure graph printer, eliminate hard coded printing in
...
favor of generic printer.
llvm-svn: 4209
2002-10-17 01:02:46 +00:00
Chris Lattner
7b0ebe9983
Make sure to print out the call nodes as well
...
llvm-svn: 4203
2002-10-16 20:16:16 +00:00
Chris Lattner
fea9f0b786
* Print the "return" node in the graphs
...
llvm-svn: 4199
2002-10-16 02:04:36 +00:00
Chris Lattner
5274757b62
The second element of the iterator is really an offset, not a link
...
llvm-svn: 4196
2002-10-16 01:43:11 +00:00
Chris Lattner
b1c17ad7e8
Specify the graph name
...
llvm-svn: 4195
2002-10-16 01:34:28 +00:00
Chris Lattner
eb15c6d2b3
- DSGraph Printing Improvements:
...
* Print edge source labels again
* Override node shape to be Mrecord again, instead of just record.
llvm-svn: 4193
2002-10-16 01:18:27 +00:00
Chris Lattner
b0f38789da
Halfway conversion from custom printing to GraphWriter printing
...
llvm-svn: 4146
2002-10-13 19:31:57 +00:00
Vikram S. Adve
b52220cd21
Use PARALLEL_DIRS.
...
llvm-svn: 4114
2002-10-11 16:08:17 +00:00
Misha Brukman
33022f07bb
Added capability to get execution count of a loop if it is a predictable
...
number of iterations.
llvm-svn: 4113
2002-10-11 05:34:32 +00:00
Misha Brukman
3845be203d
Added helper functions in LoopInfo: isLoopExit and numBackEdges.
...
llvm-svn: 4112
2002-10-11 05:31:10 +00:00
Chris Lattner
d7b3bb0fa4
Handle post dominance correctly in the case where blocks do not have a path to
...
the exit node.
llvm-svn: 4038
2002-10-04 14:50:20 +00:00
Chris Lattner
9df1cf3034
Prune function nodes that are no longer referenced due to inlining
...
llvm-svn: 4036
2002-10-03 21:55:28 +00:00
Chris Lattner
9dfb9f44cc
sgefa uses truely huge data structures nodes. Only print part of them if they
...
are so big
llvm-svn: 4035
2002-10-03 21:55:13 +00:00
Chris Lattner
4ee4381a23
Handle bug exposed by power benchmark
...
llvm-svn: 4033
2002-10-03 21:06:38 +00:00
Chris Lattner
c9c681e4f5
Reimplement/port the Bottom Up Closure pass
...
llvm-svn: 4031
2002-10-03 20:38:41 +00:00
Chris Lattner
3f69054dd5
DataStructure.h doesn't include DSGraph.h
...
llvm-svn: 4029
2002-10-02 22:14:38 +00:00
Chris Lattner
c4d2ad21bf
* Implement fully general merging of array subscripts on demand! This
...
does not handle the initial pointer index case yet though.
llvm-svn: 4012
2002-10-02 06:24:36 +00:00
Chris Lattner
4e37455a69
When printing DS nodes, print the mergemap index as well to allow easier
...
debugging of merging process.
llvm-svn: 4010
2002-10-02 05:17:55 +00:00
Chris Lattner
0b2a6e00d1
* Significant rework of DSNode to support arbitrary aliasing due to merging
...
* Now all and any bytes of a DSNode can be merged together individually. This
is neccesary to support the full generality of C and support aliasing
correctly.
llvm-svn: 4008
2002-10-02 04:57:39 +00:00
Chris Lattner
d3121eb8cb
Initial checkin of Steensgaards context insensitive flow insensitive
...
alias analysis
llvm-svn: 3997
2002-10-01 22:34:12 +00:00
Chris Lattner
193e6924ca
Checkin some major reworks of data structure analysis. This is not done,
...
nor does it work very well, but I need to get it checked in before I break
the tree unintentionally.
llvm-svn: 3996
2002-10-01 22:33:50 +00:00
Chris Lattner
1931788143
Minor tweak
...
llvm-svn: 3985
2002-09-29 22:59:29 +00:00
Chris Lattner
467a9e84c4
Fix printing of loop information
...
llvm-svn: 3977
2002-09-29 21:43:04 +00:00
Chris Lattner
647df647e1
First try at implementing the AliasSetTracker class. I'm sure it will need
...
revision as I start to use it though.
llvm-svn: 3954
2002-09-26 21:49:07 +00:00
Chris Lattner
3524f58309
Fix printing of loop information
...
llvm-svn: 3941
2002-09-26 16:15:54 +00:00
Chris Lattner
08373d1c9c
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
llvm-svn: 3936
2002-09-26 05:32:50 +00:00
Chris Lattner
ceae380b2c
Convert BasicVN to be an ImmutablePass
...
llvm-svn: 3924
2002-09-25 22:27:25 +00:00
Chris Lattner
c952e4558b
Make users of FindUsedTypes not have problems with linkage. This fixes
...
Cwriter.
llvm-svn: 3900
2002-09-24 00:07:21 +00:00
Chris Lattner
e1751db3ca
Clean up indvar printing
...
llvm-svn: 3650
2002-09-10 15:35:39 +00:00
Chris Lattner
30214c23aa
* Add capability to recognize alias properties of the following common cases:
...
- A[c1] cannot alias A[c2] where constants c1 != c2
- A[i] cannot alias B[j] if A & B are provably different arrays
This should help out array based codes. For example, from bzip2 from spec,
3 additional loads can be GCSE'd, and _21_ additional loads can be LICMd due
to this change.
In a test example from the Spec GAP benchmark (vecffe.c), this change allows
_52_ additional loads to be GCSE'd and _224_ additional LICM'd loads.
Not bad for such a simple change. Other testcases show no change at all
because they just don't use arrays. Not too suprising there.
llvm-svn: 3616
2002-09-08 18:45:18 +00:00
Chris Lattner
2d42bbf5d0
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
SCVS: ----------------------------------------------------------------------
llvm-svn: 3572
2002-09-03 01:05:48 +00:00
Chris Lattner
ed39ccae8d
- Eliminate the last traces of the 'analysis' namespace
...
llvm-svn: 3550
2002-08-30 22:53:53 +00:00
Chris Lattner
f2eb70fc0b
Minor cleanups so I can remove BasicValueNumbering.h
...
llvm-svn: 3544
2002-08-30 22:30:36 +00:00
Chris Lattner
c05581fb31
initial implementation of ValueNumbering interface.
...
llvm-svn: 3541
2002-08-30 20:29:02 +00:00
Chris Lattner
2dd49e525c
Initial implementation of value numbering for load instructions
...
llvm-svn: 3540
2002-08-30 20:28:10 +00:00
Chris Lattner
abb16604fd
Remove unneeded #include
...
llvm-svn: 3524
2002-08-29 20:08:55 +00:00
Anand Shukla
e87291ef83
Changed so it gets linked properly
...
llvm-svn: 3508
2002-08-26 16:45:19 +00:00
Chris Lattner
02fe752fbd
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner
cd709cbf53
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
d922a84930
doxygenize comments
...
llvm-svn: 3481
2002-08-22 22:46:39 +00:00
Chris Lattner
3a4a335ad8
Add missing #include
...
llvm-svn: 3467
2002-08-22 18:57:09 +00:00
Chris Lattner
7d58f8ddc0
Check-in new alias analysis infrastructure
...
llvm-svn: 3465
2002-08-22 18:25:32 +00:00
Chris Lattner
c86203ace3
- Split Dominators.h into Dominators.h & PostDominators.h
...
llvm-svn: 3432
2002-08-21 23:43:50 +00:00
Chris Lattner
1a386b6a73
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3417
2002-08-21 17:09:49 +00:00
Chris Lattner
c869ecbe42
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3416
2002-08-21 17:09:45 +00:00
Chris Lattner
0d92ff0488
*** empty log message ***
...
llvm-svn: 3282
2002-08-09 22:52:08 +00:00
Chris Lattner
40eb9dafed
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Chris Lattner
b3ce9fc449
Minor changes to DEBUG()'s
...
llvm-svn: 3261
2002-08-07 21:41:11 +00:00
Chris Lattner
3147fd226a
Reorder #includes to be right
...
llvm-svn: 3260
2002-08-07 21:41:03 +00:00
Chris Lattner
d43023a85d
Split dominance calculation and post dominance calculation stuff
...
Dominance calculation goes to VMCore library to be used by Verifier.
llvm-svn: 3210
2002-08-02 16:43:03 +00:00
Chris Lattner
c70601cd67
Changes to be GCC3.1 friendly
...
llvm-svn: 3186
2002-07-31 19:32:12 +00:00
Chris Lattner
be4826e627
*** empty log message ***
...
llvm-svn: 3185
2002-07-31 19:32:01 +00:00
Chris Lattner
35f0c49feb
Add new -only-print-main-ds option that causes mains ds graph to be
...
printed, but no others.
llvm-svn: 3178
2002-07-31 17:15:40 +00:00
Vikram S. Adve
b82a496132
Add GlobalDSGraph -- a common graph that holds externally visible nodes.
...
llvm-svn: 3173
2002-07-30 22:08:08 +00:00
Vikram S. Adve
256776e91f
Print globals graph after either the BU or the TD pass.
...
llvm-svn: 3172
2002-07-30 22:07:26 +00:00
Vikram S. Adve
90c8892b4e
This file implements the top-down propagation pass for data structure graphs.
...
Also, we now use a separate globals graph to hold externally visible nodes.
This changes both the bottom-up and top-down propagation so that
globals and other external objects do not have to appear in every
function, but only in functions in which they are referenced or
they can be used to access something else that is referenced.
llvm-svn: 3171
2002-07-30 22:06:40 +00:00
Vikram S. Adve
0d66177bc8
Use a separate globals graph to hold externally visible nodes.
...
This changes both the bottom-up and top-down propagation so that
globals and other external objects do not have to appear in every
function, but only in functions in which they are referenced or
they can be used to access something else that is referenced.
llvm-svn: 3170
2002-07-30 22:05:22 +00:00
Chris Lattner
31aa7e72f2
Declare that these passes only depend on the CFG of the function
...
llvm-svn: 3157
2002-07-30 16:27:52 +00:00
Chris Lattner
f356bcc824
* Eliminate the Provided set. All Passes now finally just automatically
...
provide themselves.
llvm-svn: 3124
2002-07-29 21:03:33 +00:00
Chris Lattner
2675007573
* Standardize how analysis results/passes as printed with the print() virtual
...
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3116
2002-07-27 01:12:17 +00:00
Chris Lattner
96a0dfa33e
* Standardize how analysis results/passes as printed with the print() virtual
...
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3115
2002-07-27 01:12:15 +00:00
Chris Lattner
c8b7092e54
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3113
2002-07-26 21:12:46 +00:00