This is an archive of the discontinued LLVM Phabricator instance.

Revert unnecessary and incorrect change made to GraphWriter
ClosedPublic

Authored by jamieschmeiser on Dec 13 2021, 10:11 AM.

Details

Summary

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.

Diff Detail

Event Timeline

jamieschmeiser requested review of this revision.Dec 13 2021, 10:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2021, 10:11 AM
aeubanks resigned from this revision.Dec 13 2021, 11:07 AM

not familiar enough with html, I'll let somebody else review this

jrtc27 accepted this revision.Dec 13 2021, 11:53 AM

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.

This revision is now accepted and ready to land.Dec 13 2021, 11:53 AM

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.

I see. Yes, that would be a nice feature.

xgupta accepted this revision.Dec 13 2021, 9:35 PM
xgupta added a subscriber: xgupta.

A test case is missing, but I tested on local system, above reported issue is now fixed.

This revision was landed with ongoing or failed builds.Dec 14 2021, 5:43 AM
This revision was automatically updated to reflect the committed changes.