summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA
Commit message (Collapse)AuthorAgeFilesLines
...
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+2
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* eliminate dynamic_cast from this file.Chris Lattner2010-01-221-17/+20
| | | | llvm-svn: 94157
* eliminate a bunch more unneeded dynamic_cast's.Chris Lattner2010-01-221-8/+9
| | | | llvm-svn: 94156
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-0/+3
| | | | llvm-svn: 94155
* adopt getAdjustedAnalysisPointer in two more passes.Chris Lattner2010-01-202-0/+20
| | | | llvm-svn: 94017
* adopt getAdjustedAnalysisPointer in BasicCallGraph.Chris Lattner2010-01-201-1/+11
| | | | llvm-svn: 94015
* Change dbgs() back to errs() for assert messages as Chris requested.David Greene2009-12-231-3/+3
| | | | llvm-svn: 92081
* Change dbgs() back to errs() for assert messages as Chris requested.David Greene2009-12-231-1/+1
| | | | llvm-svn: 92080
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-231-5/+5
| | | | | | s/errs/dbgs/g except for certain special cases. llvm-svn: 92035
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-231-2/+3
| | | | | | s/errs/dbgs/g except for certain special cases. llvm-svn: 92034
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-231-56/+56
| | | | | | s/errs/dbgs/g except for certain special cases. llvm-svn: 92033
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-2/+0
| | | | | | | | isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91421
* Remove the AliasAnalysis::getMustAliases method, which is dead.Chris Lattner2009-11-222-28/+0
| | | | | | | | The hasNoModRefInfoForCalls isn't worth it as a filter because basicaa provides m/r info and everything chains to it, so remove it. llvm-svn: 89599
* Fix DenseMap iterator constness.Jeffrey Yasskin2009-11-101-3/+3
| | | | | | | | | | | | | | | | | | | This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! llvm-svn: 86636
* Reverting 85714, 85715, 85716, which are breaking the buildDouglas Gregor2009-11-011-1/+0
| | | | llvm-svn: 85717
* Don't #include Pass.h from CallGraph.h.Dan Gohman2009-11-011-0/+1
| | | | llvm-svn: 85715
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-272-2/+2
| | | | llvm-svn: 85286
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-262-2/+2
| | | | | | to free() llvm-svn: 85181
* Remove FreeInst.Victor Hernandez2009-10-262-4/+3
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-253-3/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-253-6/+5
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-242-5/+6
| | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-231-5/+10
| | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
* Remove MallocInst from LLVM Instructions.Victor Hernandez2009-10-171-3/+2
| | | | llvm-svn: 84299
* Extend the StartPassTimer and StopPassTimer functions so that theDan Gohman2009-09-281-4/+4
| | | | | | | | code that stops the timer doesn't have to search to find the timer object before it stops the timer. This avoids a lock acquisition and a few other things done with the timer running. llvm-svn: 82949
* Enhance analysis passes so that they apply the same analysis to malloc calls ↵Victor Hernandez2009-09-182-9/+20
| | | | | | | | as to MallocInst. Reviewed by Eli Friedman. llvm-svn: 82281
* add a new CallGraphNode::replaceCallEdge method and use it fromChris Lattner2009-09-151-0/+17
| | | | | | | | argpromote to avoid invalidating an iterator. This fixes PR4977. All clang tests now pass with expensive checking (on my system at least). llvm-svn: 81843
* make -debug-pass=Executions show information about what call graph nodesChris Lattner2009-09-151-1/+14
| | | | | | are in the SCC for each execution of a CGSCC pass. llvm-svn: 81838
* Fix uppercaseo.Dale Johannesen2009-09-101-1/+1
| | | | llvm-svn: 81463
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-032-2/+2
| | | | | | buildbot's stage 2 configure llvm-svn: 80871
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-032-2/+2
| | | | | | this time. I'll back out if needed... llvm-svn: 80858
* revert my patch, duncan points out what is wrong with my logic. AddChris Lattner2009-09-021-4/+8
| | | | | | a comment so that I don't change this in the future :) llvm-svn: 80760
* one more try at making this simpler, hopefully it won't break everything :)Chris Lattner2009-09-021-4/+4
| | | | llvm-svn: 80759
* Complicate Chris's simplification, avoiding complaintsDuncan Sands2009-09-021-1/+5
| | | | | | | about singular iterators when building with expensive checks turned on. llvm-svn: 80757
* debug intrinsics do not go in the callgraph, this fixes a coupleChris Lattner2009-09-011-1/+2
| | | | | | clang regtest failures. llvm-svn: 80724
* Fix a regression I introduced in r80708, found by llvm-test.Chris Lattner2009-09-011-5/+12
| | | | llvm-svn: 80718
* remove CallGraphNode::replaceCallSite, it is redundant with other APIs.Chris Lattner2009-09-012-23/+1
| | | | llvm-svn: 80708
* doxygenate RefreshCallGraph, add a new 'verification mode', and run it after Chris Lattner2009-09-011-4/+37
| | | | | | | CGSCC passes make change to ensure they are updating the callgraph correctly (when assertions are enabled). llvm-svn: 80698
* simpler solution to iterator invalidation "problem" foundChris Lattner2009-09-011-11/+6
| | | | | | by expensive checking. llvm-svn: 80695
* Do not manipulate invalid iterators. This fixes theDuncan Sands2009-09-011-6/+11
| | | | | | llvm-gcc build when expensive checking is turned on. llvm-svn: 80671
* Change CallGraphNode to maintain it's Function as an AssertingVHChris Lattner2009-09-012-37/+34
| | | | | | | | | | | | for sanity. This didn't turn up any bugs. Change CallGraphNode to maintain its "callsite" information in the call edges list as a WeakVH instead of as an instruction*. This fixes a broad class of dangling pointer bugs, and makes CallGraph have a number of useful invariants again. This fixes the class of problem indicated by PR4029 and PR3601. llvm-svn: 80663
* cleanups pointed out by duncanChris Lattner2009-08-311-2/+1
| | | | llvm-svn: 80595
* Step #1 to giving Callgraph some sane invariants. The problems with callgraphChris Lattner2009-08-312-27/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stem from the fact that we have two types of passes that need to update it: 1. callgraphscc and module passes that are explicitly aware of it 2. Functionpasses (and loop passes etc) that are interlaced with CGSCC passes by the CGSCC Passmgr. In the case of #1, we can reasonably expect the passes to update the call graph just like any analysis. However, functionpasses are not and generally should not be CG aware. This has caused us no end of problems, so this takes a new approach. Logically, the CGSCC Pass manager can rescan every function after it runs a function pass over it to see if the functionpass made any updates to the IR that affect the callgraph. This allows it to catch new calls introduced by the functionpass. In practice, doing this would be slow. This implementation keeps track of whether or not the current scc is dirtied by a function pass, and, if so, delays updating the callgraph until it is actually needed again. This was we avoid extraneous rescans, but we still have good invariants when the callgraph is needed. Step #2 of the "give Callgraph some sane invariants" is to change CallGraphNode to use a CallBackVH for the callsite entry of the CallGraphNode. This way we can immediately remove entries from the callgraph when a FunctionPass is active instead of having dangling pointers. The current pass tries to tolerate these dangling pointers, but it is just an evil hack. This is related to PR3601/4835/4029. This also reverts r80541, a hack working around the sad lack of invariants. llvm-svn: 80566
* cleanups, factor some code out to a helper functionChris Lattner2009-08-311-22/+39
| | | | llvm-svn: 80542
* fix a crash building SPASS by tolerating a callsite that doesn't existChris Lattner2009-08-311-8/+13
| | | | | | in the callgraph, see the big comment at the top of the testcase. llvm-svn: 80541
* Fix PR4834, a tricky case where the inliner would resolve anChris Lattner2009-08-311-14/+23
| | | | | | | | | | | | | | | indirect function pointer, inline it, then go to delete the body. The problem is that the callgraph had other references to the function, though the inliner had no way to know it, so we got a dangling pointer and an invalid iterator out of the deal. The fix to this is pretty simple: stop the inliner from deleting the function by knowing that there are references to it. Do this by making CallGraphNodes contain a refcount. This requires moving deletion of available_externally functions to the module-level cleanup sweep where it belongs. llvm-svn: 80533
* use an accessor instead of poking internals of a node.Chris Lattner2009-08-311-1/+1
| | | | llvm-svn: 80532
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-312-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | argpromotion and structretpromote. Basically, when replacing a function, they used the 'changeFunction' api which changes the entry in the function map (and steals/reuses the callgraph node). This has some interesting effects: first, the problem is that it doesn't update the "callee" edges in any callees of the function in the call graph. Second, this covers for a major problem in all the CGSCC pass stuff, which is that it is completely broken when functions are deleted if they *don't* reuse a CGN. (there is a cute little fixme about this though :). This patch changes the protocol that CGSCC passes must obey: now the CGSCC pass manager copies the SCC and preincrements its iterator to avoid passes invalidating it. This allows CGSCC passes to mutate the current SCC. However multiple passes may be run on that SCC, so if passes do this, they are now required to *update* the SCC to be current when they return. Other less interesting parts of this patch are that it makes passes update the CG more directly, eliminates changeFunction, and requires clients of replaceCallSite to specify the new callee CGN if they are changing it. llvm-svn: 80527
* add a dump() method on callgraph.Chris Lattner2009-08-301-0/+3
| | | | llvm-svn: 80524
OpenPOWER on IntegriCloud