diff options
author | David Greene <greened@obbligato.org> | 2010-01-15 19:43:23 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2010-01-15 19:43:23 +0000 |
commit | ac931c011fae9392b5d68e763ec64ee25181c267 (patch) | |
tree | ecc7b06f8b53b117b137b982a3131ab64c2abc76 /include | |
parent | 54482b472a888c9efe003ad694ecf47b21878f0e (diff) | |
download | external_llvm-ac931c011fae9392b5d68e763ec64ee25181c267.zip external_llvm-ac931c011fae9392b5d68e763ec64ee25181c267.tar.gz external_llvm-ac931c011fae9392b5d68e763ec64ee25181c267.tar.bz2 |
Add some debug routines to SelectionDAG to dump full DAGs.
print/dumpWithDepth allows one to dump a DAG up to N levels deep.
dump/printWithFullDepth prints the whole DAG, subject to a depth limit
on 100 in the default case (to prevent infinite recursion).
Have CannotYetSelect to a dumpWithFullDepth so it is clearer exactly
what the non-matching DAG looks like.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 7b1931a..b60e2f2 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1285,10 +1285,29 @@ public: void print_details(raw_ostream &OS, const SelectionDAG *G) const; void print(raw_ostream &OS, const SelectionDAG *G = 0) const; void printr(raw_ostream &OS, const SelectionDAG *G = 0) const; + /// printWithDepth - Print a SelectionDAG node and children up to + /// depth "depth." "limit" controls whether a message should be + /// printed if we hit depth "depth." + /// + void printWithDepth(raw_ostream &O, const SelectionDAG *G = 0, + unsigned depth = -1, unsigned indent = 0, + bool limit = false) const; + /// printWithFullDepth - Print a SelectionDAG node and all children + /// down to the leaves. + /// + void printWithFullDepth(raw_ostream &O, const SelectionDAG *G = 0, + unsigned indent = 0) const; void dump() const; void dumpr() const; void dump(const SelectionDAG *G) const; void dumpr(const SelectionDAG *G) const; + /// dumpWithDepth - printWithDepth to dbgs(). + /// + void dumpWithDepth(const SelectionDAG *G = 0, unsigned depth = 1, + unsigned indent = 0, bool limit = false) const; + /// dumpWithFullDepth - printWithFullDepth to dbgs(). + /// + void dumpWithFullDepth(const SelectionDAG *G = 0, unsigned indent = 0) const; static bool classof(const SDNode *) { return true; } |