1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

69 Commits

Author SHA1 Message Date
Chris Lattner
e63e580e56 Add support for memmove
llvm-svn: 9824
2003-11-09 03:32:52 +00:00
Chris Lattner
eb36733092 Handle bzero and memset in the local analysis, because we were missing the fact
that memset returns its argument!!

llvm-svn: 9811
2003-11-08 21:55:50 +00:00
Chris Lattner
a71b07eeca All DSGraphs keep a reference to the targetdata they are created with. This is
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.

llvm-svn: 9659
2003-11-02 22:27:28 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
471405e2ba DOn't crash if program calls the null pointer
llvm-svn: 8708
2003-09-24 23:42:58 +00:00
Chris Lattner
c2e75f110a Make sure to add global variable initializers to the Globals graph!
llvm-svn: 8636
2003-09-20 21:48:16 +00:00
Chris Lattner
372fe6873d Add special case handling for calloc and realloc
llvm-svn: 8630
2003-09-20 16:50:46 +00:00
Chris Lattner
b12a8a6177 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Misha Brukman
b9a4ddbfc5 Fixed spelling and grammar.
llvm-svn: 8478
2003-09-11 18:14:24 +00:00
Chris Lattner
686e94e760 DEBUG got moved to Support/Debug.h
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Chris Lattner
c1f922d61e Remove dead Nodes list
llvm-svn: 7065
2003-07-02 06:06:34 +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
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
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
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
2806ac8828 Nodes get forwarded when they are collapsed currently.
llvm-svn: 6696
2003-06-16 12:08:18 +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
e5dbced215 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
522cb6d282 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
f8c57bab25 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
2c7c54ce9d Add a flag which effectively disables field sensitivity
llvm-svn: 5506
2003-02-08 20:18:39 +00:00
Chris Lattner
5f3ef2f0e7 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
4e0422745c Fix a huge bug with handling non-pointer instructions
llvm-svn: 5491
2003-02-04 00:59:50 +00:00
Chris Lattner
7aec6c471b 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
6051f888b4 Remove using declarations
llvm-svn: 5456
2003-02-01 04:01:21 +00:00
Chris Lattner
712b3598b8 free instructions mark their operands as being heap nodes.
llvm-svn: 5425
2003-01-28 20:59:57 +00:00
Chris Lattner
f1afc156f8 * 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
1c82a35a0b Slight efficiency improvement
llvm-svn: 5418
2003-01-23 21:31:16 +00:00
Vikram S. Adve
773fe59c79 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
Chris Lattner
f179a40a00 Add peak memory usage support
llvm-svn: 4748
2002-11-18 21:44:19 +00:00
Chris Lattner
2597c1158f Initialize PrintAuxCalls member
llvm-svn: 4677
2002-11-10 06:53:38 +00:00
Chris Lattner
1fe76d2385 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
0752756a6a Add globals graphs to all three passes
llvm-svn: 4663
2002-11-09 21:12:07 +00:00
Chris Lattner
e726eb5ea7 Clean up DSGraph::removeDeadNodes interface
llvm-svn: 4660
2002-11-09 21:00:49 +00:00
Chris Lattner
3e54e8f3ca Make removeTriviallyDeadNodes a private interface of DSGraph
llvm-svn: 4659
2002-11-09 20:55:24 +00:00
Chris Lattner
082bbe3069 Don't put constants into the scalar map!
llvm-svn: 4657
2002-11-09 20:14:03 +00:00
Chris Lattner
1c5c03d6f7 Add initial support for a globals graph
llvm-svn: 4656
2002-11-09 20:01:01 +00:00
Chris Lattner
6172544663 #include Datastructure.h first
llvm-svn: 4654
2002-11-09 19:25:10 +00:00
Chris Lattner
986ec528fd * 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
dfba076f5b Rename DataStructureAnalysis namespace to DS
llvm-svn: 4596
2002-11-07 05:20:53 +00:00
Chris Lattner
d0387e7e11 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
8d63aab886 Rename ValueMap to ScalarMap
llvm-svn: 4516
2002-11-03 21:27:48 +00:00
Chris Lattner
0ee058644e Rename NewNode flag to HeapNode
llvm-svn: 4515
2002-11-03 21:24:04 +00:00
Chris Lattner
702ac95902 Implement the "unknown flag" which mainly consists of aligning printing code
llvm-svn: 4490
2002-11-02 00:36:03 +00:00
Chris Lattner
226c503f31 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
07c1f70586 Remove dead code
llvm-svn: 4467
2002-10-31 06:52:26 +00:00
Chris Lattner
317daff9bf 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
8929f75913 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
2914391ab6 - 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