Commit Graph

978 Commits

Author SHA1 Message Date
Chris Lattner
af8a42445c Add standard print/dump methods to CallGraph classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15569 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-08 03:27:49 +00:00
Chris Lattner
f0431b0d42 Hide this option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15415 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-02 20:16:21 +00:00
Misha Brukman
47b14a4a6a Fix #includes of i*.h => Instructions.h as per PR403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15334 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:30:56 +00:00
Misha Brukman
d8e1eea678 Fix #includes of i*.h => Instructions.h as per PR403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15328 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:05:13 +00:00
Alkis Evlogimenos
eb62bc77b6 Merge i*.h headers into Instructions.h as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:17:34 +00:00
Chris Lattner
730b1ad2c4 Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
This also fixes the miscompilation of MallocBench/gs with dead store
elimination enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15324 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 07:56:39 +00:00
Brian Gaeke
96d4bf7aee Make the create...() functions for some of these passes return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15276 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:21 +00:00
Chris Lattner
b0015c510f nuke pointless -debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15267 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 08:03:18 +00:00
Chris Lattner
105d26acb4 Fix conservative assumption, which was quite broken. Also, notice that
functions known to not access memory (like sin/cos) don't access memory! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15264 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:46:26 +00:00
Chris Lattner
63e9930498 Remove a bogus assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15261 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:22:21 +00:00
Chris Lattner
fe98f27e80 Complete rewrite of this pass to be faster, use less memory, be easier to
understand, and more accurate to boot!  This implements
GlobalModRef/purecse.ll over the previous impl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15260 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 06:40:37 +00:00
Chris Lattner
efe30ef790 Use context-sensitive alias analysis to avoid pessimization in clients of
AliasSetTracker (dse and licm).  This implements
DeadStoreElimination/context-sensitive.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15254 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:20:26 +00:00
Chris Lattner
db5b80a7f2 Make basicaa a bit more aggressive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:18:52 +00:00
Chris Lattner
e181b94309 basic-aa can actually provide simple mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15251 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:13:55 +00:00
Chris Lattner
05e47987ee This was implemented back in march
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15250 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 01:59:42 +00:00
Chris Lattner
61d462760b Add some new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 05:50:23 +00:00
Chris Lattner
34a1005737 Fix a latent bug in the AliasSetTracker that was exposed by the FreeInst additions and broke a bunch of programs last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 18:32:01 +00:00
Chris Lattner
5c88260f70 Add support for free instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15197 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 07:57:37 +00:00
Chris Lattner
b8a31ace2c Clean up reference counting to stop "leaking" alias sets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15099 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 07:58:18 +00:00
Brian Gaeke
7848e68c16 These files don't need to include <iostream> since they include "Support/Debug.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15089 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 20:50:33 +00:00
Chris Lattner
6d4b0d723d Add capability to remove aliasing aliassets from an AST
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15066 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 07:04:26 +00:00
Chris Lattner
12c1155403 Make the AST interface a bit richer by returning whether an insertion caused
an insertion or not (because the pointer set already existed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 05:18:04 +00:00
Chris Lattner
bb8f43c8fc Do not ignore casts unless they are pointer-pointer casts. This caused us
to miscompile the SingleSource/Regression/C++/pointer_member.cpp program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15062 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 03:56:54 +00:00
Reid Spencer
e840434755 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:18:30 +00:00
Chris Lattner
cb19d67907 Fix incorrect computation of mod/ref sets. Do not ask for mod/ref information
for objects of size 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14908 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 07:40:34 +00:00
Chris Lattner
ad48cc71dc Print modref information in a useful way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14907 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 06:43:20 +00:00
Chris Lattner
0e872cb470 Cleanups: fold two loops into one
New features: -print-all-alias-modref-info option, print more info


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 06:28:49 +00:00
Chris Lattner
f99947c35f Be compatible with IA64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14864 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:04:13 +00:00
Chris Lattner
1ff1ff70e3 Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14843 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:31:46 +00:00
Chris Lattner
f92791ace5 Fix for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:26:49 +00:00
Chris Lattner
ce36d55cf8 Bug fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 01:29:12 +00:00
Chris Lattner
f70770abd5 Simplify logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14825 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 20:27:12 +00:00
Chris Lattner
5ace1e4f6f Disable some code that isn't helping matters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14682 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 07:25:51 +00:00
Chris Lattner
8adbec89ce Headers moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:35:22 +00:00
Chris Lattner
4dabb2c6f3 Move all of the DSA headers into the Analysis/DataStructure subdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14663 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:32:21 +00:00
Chris Lattner
eaef5685b8 Moving headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14661 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:22:54 +00:00
Chris Lattner
efffdc9408 As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken.  The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.

As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call.  This fixes some obscure bugs
handling non-forwarded node handles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14660 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:12:52 +00:00
Reid Spencer
954da37bb4 Add #include <iostream> since Value.h does not #include it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:19:56 +00:00
Chris Lattner
3b04a8ac45 Initial checkin of a simple mod/ref analysis for global variables. This is
still overly conservative and uses very simple data structures, but it is a
start, and allows elimination of a lot of loads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 06:33:13 +00:00
Chris Lattner
e6afb74188 Moved IPModRef out of the public include dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14455 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:41:23 +00:00
Chris Lattner
b88fb055c4 Move DependenceGraph.* to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:32:33 +00:00
Chris Lattner
2de1d32ce1 Moving to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:29:42 +00:00
Chris Lattner
0ecdcbe63a Move MemoryDepAnalysis.h into lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14448 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:27:16 +00:00
Chris Lattner
71ef8f7adc Move PgmDependenceGraph.h out of the public include hierarchy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14446 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:20:04 +00:00
Chris Lattner
af754dbf65 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-26 19:31:26 +00:00
Chris Lattner
d28b0d73da Fix header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14394 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 04:24:22 +00:00
Chris Lattner
5aa20212cc Remove distasteful method which is really part of the indvars pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 06:52:20 +00:00
Chris Lattner
37ec591c74 Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA on
several mallocbench programs, including perl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14342 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-23 06:29:59 +00:00
Misha Brukman
f05ff33d21 File requires IPA, moved to lib/Analysis/IPA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14330 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-22 19:04:53 +00:00
Misha Brukman
952e38cf24 File depends on MemoryDepAnalysis (DSA); moved to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14327 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-22 18:28:37 +00:00