This is an archive of the discontinued LLVM Phabricator instance.

Introduce -dot-cfg-mssa option which creates dot-cfg style file with mssa comments included in source

Authored by jamieschmeiser on Nov 2 2020, 12:33 PM.



Expand the print-memoryssa and print<memoryssa> passes with a new hidden
option -cfg-dot-mssa that names a file. When set, a dot-cfg style file
will be generated into the named file with the memoryssa comments retained
and those blocks containing them shown in light pink. The option does
nothing in isolation.

Diff Detail

Event Timeline

jamieschmeiser created this revision.Nov 2 2020, 12:33 PM
jamieschmeiser requested review of this revision.Nov 2 2020, 12:33 PM
asbirlea accepted this revision.Nov 2 2020, 5:24 PM
This revision is now accepted and ready to land.Nov 2 2020, 5:24 PM

Needs some test coverage?


These could/should be llvm::function_ref, since they're not being captured/outliving the function call.

Could also skip the -> void since it's implicit (& the one statement lambda body seems clear enough that it's not returning anything, and the functor type written a line above has the void return type spelled out), if you like.

Respond to review comments: use llvm::function_ref, add unit test.
Fix option name and MemoryUse search string.
Regarding "-> void", I prefer to have the return type specified.

Seems pretty reasonable to me - @asbirlea could you check the test case to see the expected output, etc, makes sense? MSSA itself is not so much my wheelhouse so I'm not rightly sure myself.


This can now be removed/replaced with STLExtras.h

asbirlea accepted this revision.Nov 4 2020, 6:40 PM

Resulting dot file for the test looks good.

dblaikie accepted this revision.Nov 4 2020, 6:44 PM

Sounds good to me then!

Respond to review comments: replace header include.

anhtuyen reopened this revision.Nov 12 2020, 7:53 AM
anhtuyen added a subscriber: anhtuyen.

Reopen due to a failed build on builder polly-x86_64-linux
Full details are available at:

Buildbot URL:
Worker for this Build: polly-x86_64-gce1

This revision is now accepted and ready to land.Nov 12 2020, 7:53 AM

Fix build problems revealed when delivering changes.