Commit Graph

623 Commits

Author SHA1 Message Date
Chris Lattner
c83769ae33 Fix pastos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 06:57:55 +00:00
Reid Spencer
c773de6d61 Fix some doxygen usage in these headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 19:07:54 +00:00
Chris Lattner
6fe8ff48bd Use class tags instead of struct tags. The coding standards specify this
for public classes for improved win32 compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28391 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 17:17:12 +00:00
Chris Lattner
60a05cc118 Fix Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll and
PR726 by performing consistent signed division, not consistent unsigned
division when evaluating scev's.  Do not touch udivs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-01 04:48:52 +00:00
Nate Begeman
26d5d16a2c Move some common data structures between dom and pdom into the base class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26905 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 19:32:48 +00:00
Nate Begeman
442b32b5c5 Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator
set construction, rather than intersecting various std::sets.  This reduces
the memory usage for the testcase in PR681 from 496 to 26MB of ram on my
darwin system, and reduces the runtime from 32.8 to 0.8 seconds on a
2.5GHz G5.  This also enables future code sharing between Dom and PostDom
now that they share near-identical implementations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 02:20:46 +00:00
Chris Lattner
410354fe0c Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 16:23:43 +00:00
Chris Lattner
ed412ac2cb Refactor a bunch of code into a non-inlined method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 09:51:33 +00:00
Chris Lattner
8f9f0d3a34 add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25959 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 05:49:01 +00:00
Chris Lattner
801af7376e Initialize DFSnum's to -1, in case a node is not reachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25344 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 21:48:36 +00:00
Chris Lattner
d2da286e99 add an assert, patch by Daniel Berlin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25343 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 21:46:23 +00:00
Chris Lattner
25abb1dc09 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:55:09 +00:00
Chris Lattner
56151dad2e Add CallGraph::getOrInsertFunction, to allow clients to update the callgraph
when they change the program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:01:50 +00:00
Chris Lattner
1694ec615f add a dump method to CallGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 19:17:02 +00:00
Chris Lattner
2e761e29f8 Switch loopinfo to using ETForest instead of DominatorSet to compute itself.Patch by Daniel Berlin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:08:57 +00:00
Chris Lattner
e8605a475f Fix the build on platforms where <cassert> doesn't define NULL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25147 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 09:10:46 +00:00
Chris Lattner
ccacd3ccc2 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 08:22:18 +00:00
Chris Lattner
03839956e2 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24944 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:07:52 +00:00
Sumant Kowshik
f8395ba498 Added comment for removing assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:16:08 +00:00
Sumant Kowshik
14d1d22f37 Handling of zero length last fields in struct used for growing it arbitrarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24620 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:01:20 +00:00
Chris Lattner
8bdbb63243 Add a simple clear() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 19:31:23 +00:00
Chris Lattner
d87ef134d7 Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 01:07:12 +00:00
Chris Lattner
a35bef9db2 Fix the dominates method to return true if the two nodes are the same. Add
a new properlyDominates method to do what the old one did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:33 +00:00
Chris Lattner
9a83508a27 remove a dead header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24084 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:43:10 +00:00
John Criswell
bd9d37026a Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 16:00:10 +00:00
Chris Lattner
f753ea7a15 This pass is very old and quite useless, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23946 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:35:24 +00:00
Chris Lattner
d5bc0e5f9c add a proto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:00:32 +00:00
Chris Lattner
efec5e1599 new header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23921 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:59:49 +00:00
Chris Lattner
cd04092fe4 add some prototypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23919 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:38:25 +00:00
Chris Lattner
331a1833e1 new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12 17:03:16 +00:00
Chris Lattner
27631a30eb add two helper methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22735 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-09 23:36:18 +00:00
Jeff Cohen
d29b6aa608 Keep tabs and trailing spaces out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22565 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 18:33:25 +00:00
Nate Begeman
36f891bdf6 Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
other passes may use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 00:12:19 +00:00
Jeff Cohen
9eb59ec548 Eliminate tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 05:53:44 +00:00
Chris Lattner
50f5490842 Don't crash on a query where the block is not in any loop. Thanks to
Sameer D. Sahasrabuddhe for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-29 17:41:25 +00:00
Andrew Lenharth
14f1703ae3 make AliasAnalysis know that VAArg writes memory. This is extremely conservative and should be fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22267 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:24:23 +00:00
Chris Lattner
3e909e8bb9 fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22060 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 17:25:14 +00:00
Chris Lattner
7a5659176f fix compiler warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22059 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 17:23:19 +00:00
Reid Spencer
edd5d9ece1 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 16:13:11 +00:00
Tanya Lattner
21d6ff546d Add accessor method,
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-01 16:22:41 +00:00
Misha Brukman
3b1b6e626e Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 03:27:20 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Chris Lattner
07753cecb9 add support for taking the address of free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:08:59 +00:00
Chris Lattner
0f67dd6237 Improve doxygen documentation, patch contributed by Evan Jones!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:04:49 +00:00
Chris Lattner
48574ab52c merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21041 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:08:06 +00:00
Chris Lattner
da7c380eb4 add and use a callee_iterator typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21037 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:02:32 +00:00
Chris Lattner
df968b8b37 Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:15:15 +00:00
Chris Lattner
487cd15fdb add new spliceFrom methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20823 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:45:20 +00:00
Chris Lattner
8eec644862 if a function doesn't access memory at all, it definitely doesn't read it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20794 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:27:34 +00:00
Chris Lattner
65512d2525 a hack to allow count-aa to work with ds-aa :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:34 +00:00