Benchmark Parsing and IR Generation

This commit is contained in:
apio 2022-07-19 15:25:53 +02:00
parent 1626e74e45
commit 5efdc23006

View File

@ -35,11 +35,18 @@ int main(int argc, char** argv)
auto parser = Parser::new_parser(result);
auto ast = parser->parse();
std::shared_ptr<ASTNode> ast;
{
benchmark("Parsing");
ast = parser->parse();
}
IRBuilder builder;
builder.create_main_function(ast);
{
benchmark("IR generation");
builder.create_main_function(ast);
}
std::cout << builder.getGeneratedIR();
}