Skip to content

Commit 32c546f

Browse files
committed
Yul control flow: Add toDot method to liveness
1 parent e20c206 commit 32c546f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libyul/backends/evm/ControlFlow.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ ControlFlowLiveness::ControlFlowLiveness(ControlFlow const& _controlFlow):
2626
mainLiveness(std::make_unique<SSACFGLiveness>(*_controlFlow.mainGraph)),
2727
functionLiveness(_controlFlow.functionGraphs | ranges::views::transform([](auto const& _cfg) { return std::make_unique<SSACFGLiveness>(*_cfg); }) | ranges::to<std::vector>)
2828
{ }
29+
30+
std::string ControlFlowLiveness::toDot() const
31+
{
32+
return controlFlow.get().toDot(this);
33+
}

libyul/backends/evm/ControlFlow.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ struct ControlFlowLiveness{
3434
std::reference_wrapper<ControlFlow const> controlFlow;
3535
std::unique_ptr<SSACFGLiveness> mainLiveness;
3636
std::vector<std::unique_ptr<SSACFGLiveness>> functionLiveness;
37+
38+
std::string toDot() const;
3739
};
3840

3941
struct ControlFlow

0 commit comments

Comments
 (0)