summaryrefslogtreecommitdiff
path: root/tools/opt/PrintSCC.cpp
Commit message (Collapse)AuthorAge
* [PM] Remove the underspecified 'getRoot' method from CallGraph. It'sChandler Carruth2013-11-27
| | | | | | | | only user was an ancient SCC printing bit of the opt tool which really should be walking the call graph the same way the CGSCC pass manager does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195800 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Split the CallGraph out from the ModulePass which creates theChandler Carruth2013-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CallGraph. This makes the CallGraph a totally generic analysis object that is the container for the graph data structure and the primary interface for querying and manipulating it. The pass logic is separated into its own class. For compatibility reasons, the pass provides wrapper methods for most of the methods on CallGraph -- they all just forward. This will allow the new pass manager infrastructure to provide its own analysis pass that constructs the same CallGraph object and makes it available. The idea is that in the new pass manager, the analysis pass's 'run' method returns a concrete analysis 'result'. Here, that result is a 'CallGraph'. The 'run' method will typically do only minimal work, deferring much of the work into the implementation of the result object in order to be lazy about computing things, but when (like DomTree) there is *some* up-front computation, the analysis does it prior to handing the result back to the querying pass. I know some of this is fairly ugly. I'm happy to change it around if folks can suggest a cleaner interim state, but there is going to be some amount of unavoidable ugliness during the transition period. The good thing is that this is very limited and will naturally go away when the old pass infrastructure goes away. It won't hang around to bother us later. Next up is the initial new-PM-style call graph analysis. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195722 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for tools/...Chandler Carruth2012-12-04
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144648 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the SCC printing passes use errs() instead of outs(), as theDan Gohman2010-08-20
| | | | | | | other printing passes do, and update the documentation accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111601 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups to follow the common convention for passDan Gohman2010-08-20
| | | | | | | registration variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111598 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Output "external node" rather than "Indirect CallGraph node" when printingDuncan Sands2010-06-09
| | | | | | | | | callgraph SCC's. This makes it match what the node itself would print. Also, "indirect callgraph node" doesn't make sense - it has nothing particularly to do with indirect calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105730 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-23
| | | | | | | update all code that this affects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch some clients to Value::getName(), and other getName() userDaniel Dunbar2009-07-22
| | | | | | | | simplification. - NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76789 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
* Rationalize the names of passes that print information:Duncan Sands2008-09-23
| | | | | | | | | | | | | | | | | | -callgraph => print-callgraph -callscc => print-callgraph-sccs -cfgscc => print-cfg-sccs -externalfnconstants => print-externalfnconstants -print => print-function -print-alias-sets (no change) -print-callgraph => dot-callgraph -print-cfg => dot-cfg -print-cfg-only => dot-cfg-only -print-dom-info (no change) -printm => print-module -printusedtypes => print-used-types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56487 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from tools.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-02
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner2006-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR387:\Reid Spencer2004-12-07
| | | | | | | | Make only one print method to avoid overloaded virtual warnings when \ compiled with -Woverloaded-virtual git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-09-20
| | | | | | | | | 'Pass' should now not be derived from by clients. Instead, they should derive from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16434 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #include <iostream> since Value.h does not #include it any more.Reid Spencer2004-07-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-20
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TarjanSCCIterator -> scc_iteratorChris Lattner2003-08-31
| | | | | | | | | * Increases consistency with other iterators (e.g. df_iterator, po_iterator...) * It's shorter * We don't name classes by the implementation, we name it for the interface! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8273 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't explicitly use the SCC classChris Lattner2003-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8271 91177308-0d34-0410-b5e6-96231b3b80d8
* The SCC::HasLoop method is now in the main iteratorChris Lattner2003-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8269 91177308-0d34-0410-b5e6-96231b3b80d8
* The tarjan iterator now returns a reference to the current SCC, not a ↵Chris Lattner2003-08-31
| | | | | | possibly null pointer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8262 91177308-0d34-0410-b5e6-96231b3b80d8
* Indent classes correctly in the namespaceChris Lattner2003-08-31
| | | | | | | | move bodies out-of-line Add getAnalysisUsage method for SFGSCC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8259 91177308-0d34-0410-b5e6-96231b3b80d8
* * CleanupsChris Lattner2003-08-31
| | | | | | | * Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8258 91177308-0d34-0410-b5e6-96231b3b80d8
* Simple passes that print out SCCs in the CFGs or in the CallGraph of a module.Vikram S. Adve2002-11-04
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4532 91177308-0d34-0410-b5e6-96231b3b80d8