SelectionDAG viewers, filter-view-dags question

Is this option currently mandatory? If so, why? If not, I’m not sure what’s been added that I need to do differently.

-view-isel-dags opened just fine in dotty in 3.4 and now this does nothing without the filter-view-dags ‘option’ and now has a different priority program list or something.

I’m just curious why this option should be mandatory?


It’s not supposed to be. There was a short period where it was unintentionally mandatory but this was fixed after I pointed it out during post-commit review.

Which version/revision are you using?


We are using 3.6. Someone also pointed out that it was mandatory in 3.6.2 but I have not verified that.

I’ve just looked at my checkout of 3.6 and it looks like the fix wasn’t merged. I don’t have the revision number for the fix to hand but in lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp, this:

MatchFilterBB = (!FilterDAGBasicBlockName.empty() &&

FilterDAGBasicBlockName ==


Should be:

MatchFilterBB = (FilterDAGBasicBlockName.empty() ||

FilterDAGBasicBlockName ==


The trunk has the correct code so the option should be ok for LLVM 3.7.


Ok, thanks. Simple fix. We’ll just make correction in local copy for now, one less thing to port later :slight_smile:


Simply replacing the && with || did not fix the issue. This issue still exists after making those changes. There is maybe some other code that needs to be changed also?


The diff is not only the && and || but also the leading !:

diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 58f029fbe9fc…7ee06fc153b2 100644
— a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -659,7 +659,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
bool MatchFilterBB = false; (void)MatchFilterBB;
#ifndef NDEBUG

  • MatchFilterBB = (!FilterDAGBasicBlockName.empty() &&
  • MatchFilterBB = (FilterDAGBasicBlockName.empty() ||
    FilterDAGBasicBlockName ==

Ah, I missed that subltety. Thanks.

Ok, I’m getting this error now, it won’t open in dotty like it used to in 3.4. Did the program preference order change?


/usr/bin/xdg-open: line 402: htmlview: command not found
Custom widget with id loop-button does not return a valid node

Has anyone else run into this issue? (again, this problem does not exist if I revert to 3.4 but I’m not sure it’s an llvm issue either, I really don’t know)



It’s changed a few times over the last year. I believe xdg-open spawns whichever application your desktop environment would use to open the file so you should be able to tell it to use dotty.


It looks like doing a diff on the llvm configure that there were some changes in regards to DOTTY and XDOT and some additions of DOT?


I don’t know much about the autoconf build system but the configure changes are probably unrelated. The search order for this is in llvm::DisplayGraph() in lib/Support/GraphWriter.cpp.