Internals: Add referencing flags in Dfg dumps

This commit is contained in:
Geza Lore 2026-02-13 12:12:52 +00:00
parent 64511d30b6
commit 0aaf17acfd
1 changed files with 6 additions and 0 deletions

View File

@ -288,6 +288,12 @@ static void dumpDotVertex(std::ostream& os, const DfgVertex& vtx) {
os << '\n';
varVtxp->dtype().astDtypep()->dumpSmall(os);
os << " / F" << varVtxp->fanout();
// Reference flags
os << " / ";
static const char* const rwmn[2][2] = {{"_", "W"}, {"R", "M"}};
os << rwmn[varVtxp->hasExtRdRefs()][varVtxp->hasExtWrRefs()];
os << rwmn[varVtxp->hasModRdRefs()][varVtxp->hasModWrRefs()];
os << (varVtxp->hasDfgRefs() ? "D" : "_");
// End 'label'
os << '"';
// Shape