Allow testing FullInliner without ExpressionSplitter

This commit is contained in:
Kamil Śliwak 2023-07-11 11:49:05 +02:00
parent 96bb39d1b4
commit edceb4d2d1
2 changed files with 25 additions and 0 deletions

View File

@ -168,6 +168,12 @@ YulOptimizerTestCommon::YulOptimizerTestCommon(
FullInliner::run(*m_context, *m_ast);
ExpressionJoiner::run(*m_context, *m_ast);
}},
{"fullInlinerWithoutSplitter", [&]() {
disambiguate();
FunctionHoister::run(*m_context, *m_ast);
FunctionGrouper::run(*m_context, *m_ast);
FullInliner::run(*m_context, *m_ast);
}},
{"mainFunction", [&]() {
disambiguate();
FunctionGrouper::run(*m_context, *m_ast);

View File

@ -0,0 +1,19 @@
{
function f(a) -> x {
x := add(a, a)
}
let y := f(2)
}
// ----
// step: fullInlinerWithoutSplitter
//
// {
// {
// let a_1 := 2
// let x_2 := 0
// x_2 := add(a_1, a_1)
// let y := x_2
// }
// function f(a) -> x
// { x := add(a, a) }
// }