summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraph.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-27/+13
| | | | | | update all code that this affects. llvm-svn: 79830
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-3/+3
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Clear the cached cost when removing a function inDale Johannesen2009-03-191-1/+2
| | | | | | | | | the inliner; prevents nondeterministic behavior when the same address is reallocated. Don't build call graph nodes for debug intrinsic calls; they're useless, and there were typically a lot of them. llvm-svn: 67311
* introduce a useful abstraction to find out if a Use is in the call position ↵Gabor Greif2009-01-221-1/+2
| | | | | | of an instruction llvm-svn: 62788
* switch over some other methods from indices to iteratorsGabor Greif2009-01-171-8/+8
| | | | llvm-svn: 62430
* speed up iterative loop by using iterators. changes direction, but ↵Gabor Greif2009-01-171-4/+4
| | | | | | | | functionally equivalent if this works out, I'll change the others next. llvm-svn: 62385
* Add the private linkage.Rafael Espindola2009-01-151-1/+1
| | | | llvm-svn: 62279
* minor simplificationGabor Greif2009-01-141-2/+2
| | | | llvm-svn: 62232
* Teach internalize to preserve the callgraph.Duncan Sands2008-10-031-0/+13
| | | | | | Why? Because it was there! llvm-svn: 56996
* Simplify this some more. No functionality change.Duncan Sands2008-09-091-15/+8
| | | | llvm-svn: 56003
* Optimization suggested by Matthijs Kooijman.Duncan Sands2008-09-091-1/+2
| | | | llvm-svn: 55988
* Correct callgraph construction. It has two problems:Duncan Sands2008-09-091-34/+14
| | | | | | | | | | | | | | | | | | | (1) code left over from the days of ConstantPointerRef: if a use of a function is a GlobalValue then that is not considered a reason to add an edge from the external node, even though the use may be as an initializer for an externally visible global! There might be some point to this behaviour when the use is by an alias (though the code predated aliases by some centuries), but I think PR2782 is a better way of handling that. (2) If function F calls function G, and also G is a parameter to the call, then an F->G edge is not added to the callgraph. While this doesn't seem to matter much, adding such an edge makes the callgraph more regular. In addition, the new code should be faster as well as simpler. llvm-svn: 55987
* Didn't mean to commit this change to how theDuncan Sands2008-09-081-8/+4
| | | | | | callgraph is printed. llvm-svn: 55912
* Reapply 55859. This doesn't change anything asDuncan Sands2008-09-081-14/+8
| | | | | | | long as the callgraph is correct. It checks for wrong callgraphs more strictly. llvm-svn: 55894
* When PruneEH turned an invoke into an ordinaryDuncan Sands2008-09-061-1/+14
| | | | | | | | | | | | call (thus changing the call site) it didn't inform the callgraph about this. But the call site does matter - as shown by the testcase, the callgraph become invalid after the inliner ran (with an edge between two functions simply missing), resulting in wrong deductions by GlobalsModRef. llvm-svn: 55872
* Revert r55859. This is breaking the build in the abscence of its companion ↵Owen Anderson2008-09-051-0/+10
| | | | | | commit. llvm-svn: 55865
* Delete the removeCallEdgeTo callgraph method,Duncan Sands2008-09-051-10/+0
| | | | | | | | | | | | | | | because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. llvm-svn: 55859
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Replace two manual loops with calls to CallSite::hasArguments (no functional ↵Matthijs Kooijman2008-06-041-3/+1
| | | | | | changes). llvm-svn: 51947
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+5
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.Chris Lattner2008-04-131-0/+14
| | | | llvm-svn: 49617
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-191-1/+1
| | | | llvm-svn: 48554
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-1/+1
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Drop 'const'Devang Patel2007-05-031-3/+3
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-4/+3
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Fix build error.Lauro Ramos Venancio2007-05-021-2/+4
| | | | llvm-svn: 36648
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-1/+5
| | | | llvm-svn: 36632
* Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduceReid Spencer2007-02-051-1/+2
| | | | | | LLVM's footprint and speed up linking. llvm-svn: 33941
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Added an automatic cast to "std::ostream*" etc. from OStream. We then canBill Wendling2006-12-171-2/+2
| | | | | | | rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. llvm-svn: 32636
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-4/+4
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* straighten out various memory ownership issues in the callgraph stuff.Chris Lattner2006-12-051-3/+2
| | | | | | This fixes Regression/Other/2002-01-31-CallGraph.ll. llvm-svn: 32237
* Add a comment and fix a memory leak. Thanks to Vikram for pointing this out.Chris Lattner2006-12-041-4/+5
| | | | llvm-svn: 32196
* Replacing std::iostreams with llvm iostreams. Some of these changes involveBill Wendling2006-11-291-4/+9
| | | | | | | adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. llvm-svn: 31990
* Fix a bug pointed out by Zhongxing XuChris Lattner2006-10-091-1/+1
| | | | llvm-svn: 30831
* simplify AnalysisGroup registration, eliminating one typeid call.Chris Lattner2006-08-281-1/+1
| | | | llvm-svn: 29932
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Change the callgraph representation to store the callsite along with theChris Lattner2006-07-121-17/+19
| | | | | | | | | | | target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll llvm-svn: 29120
* For PR780:Reid Spencer2006-06-071-6/+3
| | | | | | | | | | 1. Fix the macros in IncludeFile.h to put everything in the llvm namespace 2. Replace the previous explicit mechanism in all the .h and .cpp files with the macros in IncludeFile.h This gets us a consistent mechanism throughout LLVM for ensuring linkage. Next step is to make sure its used in enough places. llvm-svn: 28715
* Fix -pedantic warningChris Lattner2006-06-011-1/+1
| | | | llvm-svn: 28634
* Change from using a stub function to a stub variable for passing to theReid Spencer2006-06-011-1/+1
| | | | | | | IncludeFile hack to ensure linkage of analysis passes. This works around some -pedantic warnings about assigning an object to a function. llvm-svn: 28621
* Add a new CallGraph::getOrInsertFunction for clients to use when updatingChris Lattner2006-01-141-16/+19
| | | | | | the callgraph. llvm-svn: 25317
* add a dump method to CallGraphChris Lattner2006-01-141-0/+4
| | | | llvm-svn: 25314
* Separate the call graph implementation from its interface. This implementsChris Lattner2005-12-221-105/+178
| | | | | | | | | 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! llvm-svn: 24944
* Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | llvm-svn: 21416
* Mission accomplished!Chris Lattner2004-11-191-1/+0
| | | | llvm-svn: 17990
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-201-1/+1
| | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
* Fix a nasty iterator invalidation problem I introduced yesterday. ThisChris Lattner2004-09-191-5/+5
| | | | | | | unfortunately is the cause of a bunch of failures from tonight, and the reason the tester is running so slow :( llvm-svn: 16407
* Add CallGraphNode::removeAnyCallEdgeTo methodChris Lattner2004-09-181-0/+12
| | | | llvm-svn: 16398
OpenPOWER on IntegriCloud