-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSA CFG Liveness #15439
base: develop
Are you sure you want to change the base?
SSA CFG Liveness #15439
Conversation
1f53fe0
to
540668c
Compare
17b71f7
to
7e9ac48
Compare
540668c
to
945335d
Compare
size_t index = 1; | ||
for (auto const& [function, functionGraph]: functionGraphMapping) | ||
output << functionGraph->toDot(false, index++); | ||
output << mainGraph->toDot(false, std::nullopt, _liveness ? _liveness->mainLiveness.get() : nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not directly related with this PR, but is here, and also for the functions below, the only cases where we need the boolean _includeDiGraphDefinition
to be set to false
? Why do we need this parameter at all? I believe we could remove it, or if it's truly necessary to keep, we could remove the digraph definition on line 55 and set the parameter to true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is so that the toDot
method of a SSACFG can also be used stand-alone :)
{ | ||
std::ostringstream output; | ||
if (_includeDiGraphDefinition) | ||
output << "digraph SSACFG {\nnodesep=0.7;\ngraph[fontname=\"DejaVu Sans\"]\nnode[shape=box,fontname=\"DejaVu Sans\"];\n\n"; | ||
if (function) | ||
output << SSACFGPrinter(*this, _functionIndex ? *_functionIndex : static_cast<size_t>(1), *function); | ||
output << SSACFGPrinter(*this, _functionIndex ? *_functionIndex : static_cast<size_t>(1), *function, _liveness); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed this now, but why 1
if _functionIndex
is null? In fact, why do we even need functionIndex
in SSACFGPrinter
at all? Doesn't the SSACFG
already contain all the functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSACFG contains only one function (or the main graph), ControlFlow contains all of it :) the indices are needed to disambiguate the nodes in the dot graph
c9d2f8e
to
58a509f
Compare
58a509f
to
605aa64
Compare
depends on #15429