[PATCH] D56793: [SelectionDAG] Add option -dag-dump-verbose-dbg

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 17 04:36:39 PST 2019


jmorse added a comment.

Hi Bjorn, this is highly useful and relevant to my interests,

In D56793#1360037 <https://reviews.llvm.org/D56793#1360037>, @bjope wrote:

> Before submitting this we need to decide upon a few things, such as:
>
> 1. should this be a separate option or could it simply be part of `-dag-dump-verbose`
> 2. should we convert `-dag-dump-verbose` into some multi-choice param with different verbosity levels


IMHO this can be rolled into -dag-dump-verbose: for the normal use cases the user won't have any dbg.values, or should be able to trivially drop them if they don't want this information cluttering output.

> Not sure about what kind of test cases that are needed for these. I haven't seen any test cases for -dag-dump-verbose so maybe it isn't that important to have tests for this kind of debugging aid?

I suspect no test is required (although I doubt it's written down anywhere). It'd be awkward to break someones CI testing because a non-functional textual representation changed. I've also seen a couple of reviews disallowing the use of -debug output to test the compiler behaviour.



================
Comment at: include/llvm/CodeGen/SelectionDAG.h:1355-1357
+  const ArrayRef<SDDbgValue*> GetDbgValues(const SDNode* SD) const {
+    return DbgInfo->getSDDbgValues(SD);
+  }
----------------
Doesn't compile for me, the other GetDbgValues method is already const, so this only overloads the return type which C++ disallows.


================
Comment at: include/llvm/CodeGen/SelectionDAG.h:1364-1367
   SDDbgInfo::DbgIterator DbgBegin() { return DbgInfo->DbgBegin(); }
   SDDbgInfo::DbgIterator DbgEnd()   { return DbgInfo->DbgEnd(); }
+  SDDbgInfo::DbgIterator DbgBegin() const { return DbgInfo->DbgBegin(); }
+  SDDbgInfo::DbgIterator DbgEnd() const  { return DbgInfo->DbgEnd(); }
----------------
Is it worth just removing the non-const DbgBegin/End here, as we return the same iterators anyway?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56793/new/

https://reviews.llvm.org/D56793





More information about the llvm-commits mailing list