Make use of IR codegen pipeline and selectively report stack too deep errors for the new pipeline.

This commit is contained in:
Bhargava Shastry 2023-05-05 11:39:56 +02:00
parent 0f40bcc06d
commit 889f0721a2

View File

@ -121,7 +121,7 @@ void FuzzerUtil::testCompiler(
compiler.setSources(_input); compiler.setSources(_input);
compiler.setEVMVersion(evmVersion); compiler.setEVMVersion(evmVersion);
compiler.setOptimiserSettings(optimiserSettings); compiler.setOptimiserSettings(optimiserSettings);
compiler.enableIRGeneration(_compileViaYul); compiler.setViaIR(_compileViaYul);
try try
{ {
compiler.compile(); compiler.compile();
@ -137,6 +137,8 @@ void FuzzerUtil::testCompiler(
} }
catch (StackTooDeepError const&) catch (StackTooDeepError const&)
{ {
if (_optimize && _compileViaYul)
throw;
} }
} }