unison-code / unison

Unison's source code
http://unison-code.github.io/
Other
101 stars 17 forks source link

Unison scalability issue #60

Closed romits800 closed 2 years ago

romits800 commented 2 years ago

I am trying to optimize mesa.triangle.general_textured_triangle but Unison does not manage to find a solution. With large --global-budget I get a memory exhaustion error.

I attach the .mir file, together with a script that runs the compilation. To use the script for maxblocksize = 25:

$ bash run.sh mesa.triangle.general_textured_triangle general_textured_triangle 25

issue_triangle.tar.gz

robcasloz commented 2 years ago

Hi, thanks for the report! Unfortunately, the function size (almost 1000 input instructions) is well beyond the scalability limits of Unison for MIPS (see Impact of different processors paragraph in Section 11.3 of the Unison TOPLAS paper). As a last resort, you could try to decompose the source function into smaller ones, if that is an option, or limiting the amount of inlining in the compiler front-end if applicable.