As pointed out in https://github.com/llvm/llvm-project/issues/52610, the changes to GraphWriter made
in https://reviews.llvm.org/D87202 introduced some bad code and the changes are actually unnecessary
for -print-changed=dot-cfg. The code in question is guarded by a call to
DefaultDOTGraphTraits::hasEdgeDestLabels() which is always false when the graph writer is called for
-print-changed=dot-cfg. Revert this section of the changes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks. It'd be nice if everything supported HTML output (and that were an option somewhere, not hard-coded), but given the rest of the code for this case needs updating to support HTML this seems fine as a fix for the regression.
Yes, it would be nice. BTW, the choice is not hard coded but is specified with DefaultDOTGraphTraits::renderNodesUsingHTML() and stored in the ctor since it is unlikely that an HTML and non-HTML mix would be desirable.
That's what I mean by hard-coded; the code has non-overridable values baked in for specific classes as far as LLVM as a whole is concerned, even if it's not in GraphWriter.h. I'm talking from a command-line standpoint; it'd be nice to be able to say -mllvm -view-sched-dags-html or something and have the user be able to request a different format.
A test case is missing, but I tested on local system, above reported issue is now fixed.