summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/GraphWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Support] Reapply r245289 "Always wait for GraphViz before opening the viewer"Michael Kruse2015-09-181-1/+1
| | | | | | | | | | | | | The change was accidentally undone by r245290. Original log message: When calling DisplayGraph and a PS viewer is chosen, two programs are executed: The GraphViz generator and the PostScript viewer. Always wait for the generator to finish to ensure that the .ps file is written before opening the viewer for that file. DisplayGraph's wait parameter refers to whether to wait until the user closes the viewer. This happened on Windows and if none of the options to open the .dot file directly applies, also on Linux. Differential Revision: http://reviews.llvm.org/D11876 llvm-svn: 247980
* [ADT] Switch a bunch of places in LLVM that were doing single-characterChandler Carruth2015-09-101-1/+1
| | | | | | | splits to actually use the single character split routine which does less work, and in a debug build is *substantially* faster. llvm-svn: 247245
* [Support] On Windows, generate PDF files for graphs and open with associated ↵Michael Kruse2015-08-181-23/+49
| | | | | | | | | | | | | | viewer Summary: Windows system rarely have good PostScript viewers installed, but PDF viewers are common. So for viewing graphs, generate PDF files and open with the associated PDF viewer using cmd.exe's start command. Reviewers: Bigcheese, aaron.ballman Subscribers: aaron.ballman, JakeVanAdrighem, dwiberg, llvm-commits Differential Revision: http://reviews.llvm.org/D11877 llvm-svn: 245290
* [Support] Always wait for GraphViz before opening the viewerMichael Kruse2015-08-181-1/+1
| | | | | | | | | | | | | | | Summary: When calling DisplayGraph and a PS viewer is chosen, two programs are executed: The GraphViz generator and the PostScript viewer. Always for the generator to finish to ensure that the .ps file is written before opening the viewer for that file. DisplayGraph's wait parameter refers to whether to wait until the user closes the viewer. This happened on Windows and if none of the options to open the .dot file directly applies, also on Linux. Reviewers: Bigcheese, chandlerc, aaron.ballman Subscribers: dwiberg, aaron.ballman, llvm-commits Differential Revision: http://reviews.llvm.org/D11876 llvm-svn: 245289
* [GraphWriter] Don't wait on xdg-open when not on Apple.Charlie Turner2015-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | By default, the GraphWriter code assumes that the generic file open program (`open` on Apple, `xdg-open` on other systems) can wait on the forked proces to complete. When the fork ends, the code would delete the temporary dot files created, and return. On GNU/Linux, the xdg-open program does not have a "wait for your fork to complete before dying" option. So the behaviour was that xdg-open would launch a process, quickly die itself, and then the GraphWriter code would think its OK to quickly delete all the temporary files. Once the temporary files were deleted, the dot viewers would get very upset, and often give you weird errors. This change only waits on the generic open program on Apple platforms. Elsewhere, we don't wait on the process, and hence we don't try and clean up the temporary files. llvm-svn: 241250
* [GraphWriter] Attempt to open .dot files with xdg-open/open firstMatthias Braun2015-04-031-0/+23
| | | | | | | | | | Most desktop environments let the users specify his preferred application per file type. On mac/linux we can use open/xdg-open for that and should try this first before starting a heuristic search for various programs. Differential Revision: http://reviews.llvm.org/D6534 llvm-svn: 234031
* Remove more superfluous .str() and replace std::string concatenation with Twine.Yaron Keren2015-03-301-1/+1
| | | | | | Following r233392, http://llvm.org/viewvc/llvm-project?rev=233392&view=rev. llvm-svn: 233555
* Purge unused includes throughout libSupport.Benjamin Kramer2015-03-231-1/+0
| | | | | | NFC. llvm-svn: 232976
* Move private classes into anonymous namespacesBenjamin Kramer2015-03-231-0/+2
| | | | | | NFC. llvm-svn: 232944
* Fix style.Michael J. Spencer2014-11-071-2/+1
| | | | llvm-svn: 221547
* Use findProgramByName.Michael J. Spencer2014-11-041-2/+4
| | | | llvm-svn: 221221
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-1/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* GraphWriter: try gv before xdg-openAlp Toker2014-06-041-2/+2
| | | | | | | | | Avoid changing behaviour for everyone who's used to the traditional ghostview UI, especially since it knows how to stay in the foreground unlike xdg-open. Amendment to r210147. llvm-svn: 210148
* GraphWriter: support the XDG open utilityAlp Toker2014-06-041-2/+8
| | | | | | | This runs a suitable viewer on Unix desktop environments specified by Freedesktop.org (GNOME, KDE, Linux distributions etc.) llvm-svn: 210147
* Silence -Wreturn-type warningAlp Toker2014-06-021-0/+1
| | | | llvm-svn: 210005
* GraphWriter: tweak the program fallback orderAlp Toker2014-06-021-1/+1
| | | | | | | Amend r210001 to use the classic fallback order behaviour if the requested graphing program isn't found. llvm-svn: 210003
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-021-119/+129
| | | | | | | | | | | | | | | | | | | | | | Replace the crufty build-time configure checks for program paths with equivalent runtime logic. This lets users install graphing tools as needed without having to reconfigure and rebuild LLVM, while eliminating a long chain of inappropriate compile dependencies that included GUI programs and the windowing system. Additional features: * Support the OS X 'open' command to view graphs generated by any of the Graphviz utilities. This is an alternative to the Graphviz OS X UI which is no longer available on Mountain Lion. * Produce informative log output upon failure to indicate which programs can be installed to view graphs. Ping me if this doesn't work for your particular environment. llvm-svn: 210001
* [C++11] Make use of 'nullptr' in the Support library.Craig Topper2014-04-071-3/+3
| | | | llvm-svn: 205697
* Use the simpler version of sys::fs::remove when possible.Rafael Espindola2014-01-101-2/+1
| | | | llvm-svn: 198958
* Remove several unused variables.Rafael Espindola2013-10-011-0/+3
| | | | | | Patch by Alp Toker. llvm-svn: 191757
* Find xdot or xdot.py.Matt Arsenault2013-07-081-3/+3
| | | | | | Ubuntu installs this as xdot, so finding xdot.py would fail. llvm-svn: 185860
* Use sys::fs::createTemporaryFile.Rafael Espindola2013-07-051-2/+1
| | | | llvm-svn: 185719
* Don't use PathV1.h in GraphWriter.cpp.Rafael Espindola2013-06-141-5/+2
| | | | llvm-svn: 183988
* Convert a use of sys::Path::GetTemporaryDirectory.Rafael Espindola2013-06-141-10/+9
| | | | llvm-svn: 183987
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-131-2/+3
| | | | llvm-svn: 183940
* Covert remaining graph viewers from sys::Path to std::string.Rafael Espindola2013-06-131-3/+3
| | | | llvm-svn: 183921
* Update code for other graph viewing programs too.Rafael Espindola2013-06-131-3/+3
| | | | llvm-svn: 183920
* Reduce usage of sys::Path in the graph writer.Rafael Espindola2013-06-131-22/+40
| | | | | | Now PathV1.h is not needed in GraphWriter.h. llvm-svn: 183919
* Remove the program class.Rafael Espindola2013-06-121-2/+2
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. llvm-svn: 183864
* ScheduleDAG: colorize the DOT graph and improve formatting.Andrew Trick2013-01-251-0/+11
| | | | llvm-svn: 173431
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Fix -Wcovered-switch-default warning.Patrik Hägglund2012-05-241-1/+0
| | | | llvm-svn: 157381
* Silence unused function warning when graphviz is not available.Benjamin Kramer2012-03-081-5/+3
| | | | llvm-svn: 152346
* Added -view-background to avoid waiting for each GraphViz invocation.Andrew Trick2012-03-071-39/+40
| | | | | | GV and XDOT paths are untested but should work the same. llvm-svn: 152179
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* Fix these error messages to be less confusing. These errorDan Gohman2010-10-291-9/+5
| | | | | | | messages primarily indicate errors running the viewer, not errors with the graph file itself. llvm-svn: 117665
* After printing "Running 'Graphviz' program... " and running theDan Gohman2010-10-051-6/+10
| | | | | | | Graphviz program, print something with a newline, to avoid leaving the line unfinished. llvm-svn: 115620
* Delete an unused declaration.Dan Gohman2010-09-271-2/+0
| | | | llvm-svn: 114839
* Add support for viewing graphviz graphs with xdot.py.Dan Gohman2010-09-271-0/+26
| | | | llvm-svn: 114832
* reduce indentationChris Lattner2010-04-181-21/+21
| | | | llvm-svn: 101692
* Fix PR6826: GraphWriter delete the generated file before "dotty" load it,Chris Lattner2010-04-131-1/+2
| | | | | | patch by 'ether'. llvm-svn: 101116
* Fix viewCFG on Linux.Jeffrey Yasskin2010-02-231-1/+1
| | | | llvm-svn: 96834
* Unbreak the build for HAVE_GV platforms.Dan Gohman2009-08-241-2/+2
| | | | llvm-svn: 79883
* fix some problems with my last patch which happen when one ofChris Lattner2009-08-231-14/+11
| | | | | | | | (HAVE_GV && (HAVE_DOT || HAVE_FDP || HAVE_NEATO || \ HAVE_TWOPI || HAVE_CIRCO)) are true. llvm-svn: 79872
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-2/+3
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* convert LoopInfo.h and GraphWriter.h to use raw_ostreamChris Lattner2009-08-231-16/+47
| | | | llvm-svn: 79836
* cerr isn't buffered so it doesn't need to be flushed.Dan Gohman2009-08-051-3/+3
| | | | llvm-svn: 78135
* Add support for other GraphViz display tools. This can helpDavid Greene2009-07-091-6/+48
| | | | | | | with very large graphs, where dot isn't necessarily the most visually pleasing way of looking at the graph. llvm-svn: 75144
* Allow users of GraphWriter to display graphs asynchronously. ThisDavid Greene2009-07-081-15/+30
| | | | | | | provides a way to quickly dump a bunch of graph information to dot files and display them. It's a timesaver when working on large systems. llvm-svn: 75056
* improve compatibility with various versions of graphviz, patch byChris Lattner2009-01-201-1/+1
| | | | | | Patrick Boettcher! llvm-svn: 62592
OpenPOWER on IntegriCloud