[llvm-commits] [PATCH 0/6] Cleanup DisplayGraph and make F->viewCFG() non-blocking
Tobias Grosser
grosser at fim.uni-passau.de
Tue Jul 5 08:23:26 PDT 2011
Hi,
while debugging I figured out that the F->viewCFG() function blocks until the
graph viewer is closed. This is anoying, as I often would like to keep the graph
open while I continue my debugging session.
To solve this problem I looked into the DisplayGraph function and figured out
that displaying a graph without waiting for the viewer to return was already
available, but hidden between lines of redundant code and many preprocessor
macros. The feature was also only available for a single graph viewer
(ghostview).
This patchset restructures the DisplayGraph function such that it is more
readable and that common code is actually shared between the different viewers.
It also adds support for non-blocking graph viewing for all viewers.
The last patch enables this non-blocking behaviour for the F->viewCFG()
function, but keeps the blocking behaviour of 'opt -view-cfg'.
Besides the size of the patches, almost all do not intend any functional
changes. If, because of missing test cases, a small bug slipped in, it should be
easy to understand and fix. Just bug me, if DisplayGraph starts to act weird.
OK to commit?
Tobi
Tobias Grosser (6):
Use a separate function to get graph viewer path
Use a separate function to translate from dot to ps
DisplayGraph: Delete dot file earlier
Use a separate function to select the graph viewer
DisplayGraph: Unify code of the different viewers
F->viewCFG() does not wait any more.
include/llvm/Support/GraphWriter.h | 14 ++-
lib/Analysis/CFGPrinter.cpp | 14 ++-
lib/Support/GraphWriter.cpp | 207 ++++++++++++++++++++++--------------
3 files changed, 147 insertions(+), 88 deletions(-)
More information about the llvm-commits
mailing list