Commit Graph

78 Commits

Author SHA1 Message Date
Chandler Carruth
255f89faee Sort the #include lines for the include/... tree with the script.
AKA: Recompile *ALL* the source code!

This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 17:02:12 +00:00
Galina Kistanova
72ea0c9ffa Fixed few warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160493 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 04:50:12 +00:00
Benjamin Kramer
25ad1cc32a Twinify GraphWriter a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-15 16:26:38 +00:00
Chris Lattner
7a2bdde0a0 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:18:47 +00:00
Dan Gohman
7ee42e6a28 Escape graph edge labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126788 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 22:12:24 +00:00
Dan Gohman
b0cdabb6c2 Code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126786 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 22:07:55 +00:00
Tobias Grosser
a91f86c49a Pass the graph to the DOTGraphTraits.getEdgeAttributes().
This follows the interface of getNodeAttributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126562 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-27 04:11:03 +00:00
Devang Patel
5860c6c09e Revert rr123550. It causes clang build failure on darwin9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123661 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-17 17:34:43 +00:00
Michael J. Spencer
36852d3681 Support/GraphWriter: Replace all internal uses of PathV1 with PathV2. The external API still uses PathV1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123550 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-15 21:43:25 +00:00
Michael J. Spencer
1f6efa3996 Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:16:10 +00:00
Dan Gohman
cce563cf1c writeGraph doesn't need its ShortNames argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114842 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 16:59:51 +00:00
Dan Gohman
d73b908f26 Don't construct a redundant GraphWriter object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114838 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 16:54:13 +00:00
Dan Gohman
f7e2ca9e16 Factor out code from the standalone WriteGraph function into a helper
function on GraphWriter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 16:44:11 +00:00
Dan Gohman
4c6809d8e3 Remove WriteGraph's Name argument, which it didn't use, and
rename writeHeader's Name argument to Title, to be consistent
with WriteGraph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114829 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 15:34:19 +00:00
Dan Gohman
640e74207e Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114827 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 14:44:14 +00:00
Mikhail Glushenkov
68e18b3054 Disambiguate calls to WriteGraph() to disable ADL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 11:24:35 +00:00
Mikhail Glushenkov
c0086edac4 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 11:24:31 +00:00
Tobias Grosser
f96b006367 Add new RegionInfo pass.
The RegionInfo pass detects single entry single exit regions in a function,
where a region is defined as any subgraph that is connected to the remaining
graph at only two spots.
Furthermore an hierarchical region tree is built.
Use it by calling "opt -regions analyze" or "opt -view-regions".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109089 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 07:46:31 +00:00
Dan Gohman
89938ce0ad Add an isNodeHidden to the graph traits, to support definition of
subgraph views.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103772 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 15:29:31 +00:00
Dan Gohman
5b296e307f Properly escape edge source and destination labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102728 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 18:27:57 +00:00
Benjamin Kramer
795eb2ae8e Fix odd declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 15:52:29 +00:00
Tobias Grosser
56f4ef3232 Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:47 +00:00
Tobias Grosser
a10d598602 Instantiate DefaultDOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:13 +00:00
Tobias Grosser
ce4edd647b Do not point edge heads to source labels
If no destination label is available, just point to the node itself
instead of pointing to some source label. Source and destination labels are
not related in any way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:37:39 +00:00
Tobias Grosser
c500566d9f Only print edgeSourceLabels if they are not empty
Graphviz can layout the graphs better if a node does not contain source
ports. Therefore only print the ports if the source ports are useful,
that means are not labeled with the empty string "".
This patch also simplifies graphs without any edgeSourceLabels e.g. the
dominance trees.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:24:40 +00:00
Daniel Dunbar
65b660743c A few more tabs -> spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-20 04:03:25 +00:00
Dan Gohman
baa26395cc Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:34:52 +00:00
Chris Lattner
74382b7c69 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 22:45:37 +00:00
Chris Lattner
103289e938 convert LoopInfo.h and GraphWriter.h to use raw_ostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 07:19:13 +00:00
Andrew Lenharth
ea2381eb71 only point to dest labels if the graph has them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 15:04:22 +00:00
Andrew Lenharth
787b0db33c emit simple node was using different labels for fields than the rest of the graph writter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 15:24:38 +00:00
David Greene
00ad26ff57 Add support for other GraphViz display tools. This can help
with very large graphs, where dot isn't necessarily the 
most visually pleasing way of looking at the graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 17:06:18 +00:00
David Greene
229509a8bc Allow users of GraphWriter to display graphs asynchronously. This
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 21:53:41 +00:00
Owen Anderson
8cbc94afb7 Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
Update other uses in the codebase for this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 17:37:09 +00:00
Misha Brukman
fe2cce63aa Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 22:51:36 +00:00
Dan Gohman
7953f37810 Don't use reinterpret_cast when it isn't needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-27 23:12:19 +00:00
Dan Gohman
358033102f Enhance the GraphWriter support for edge destinations, and teach the
SelectionDAG graph writer to make use of them. Now, nodes with multiple
values are displayed as such, with incoming edges pointing to the
specific value they use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53875 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 21:06:55 +00:00
Dan Gohman
2d3ff5a7ae Make the GraphWriter be more consistent about the string
used for the graph "title" and the graph "label", as there
are differences in interpretation of these strings
between viewers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 19:57:57 +00:00
Dan Gohman
358f5ac972 Escape the graph name. This unbreaks -view-cfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 19:55:54 +00:00
Dan Gohman
afbd0737e7 The graph name really does matter for configurations that use gv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 23:33:46 +00:00
Dan Gohman
e4706a0b51 Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
all happened be unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53182 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 18:14:29 +00:00
Evan Cheng
34cd4a484e Fix more -Wshorten-64-to-32 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 18:30:58 +00:00
Ted Kremenek
f02e26abc0 Added special escape sequences "\{", "\}", and "\|" when processing
getNodeLabel(); these sequences allow the user to specify the characters '{',
'}', and '|' in the label, which facilitate breaking the label into multiple
record segments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46283 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-23 22:29:58 +00:00
Chris Lattner
7ed47a1335 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:59:42 +00:00
Ted Kremenek
96345186a5 Previously GraphWriter assumed operator*() for node_iterator always
returned a reference type.  This patch allows operator*() to return a
non-reference type while still maintaining the old behavior when it
does return a reference type.

This patch was motivated when I tried to use "df_iterator" (see
llvm/ADT/DepthFirstIterator.h) as a "node_iterator", as df_iterator
does not return a reference type and thus we would get a compilation
error when trying to take the address of a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42151 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 21:26:49 +00:00
Ted Kremenek
1a0190f4f0 Added Graphviz escaping for the '|' character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41610 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 17:01:41 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Bill Wendling
52883e7a9a Used llvm_ostream instead of std::ostream objects. This will reduce use
of the icky <iostream> class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31818 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 09:52:49 +00:00
Jim Laskey
ec20402c90 Add ability to annotate (color) nodes in a viewGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-02 12:26:53 +00:00
Reid Spencer
51c5a286ba For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:34:57 +00:00