On 7 July 2011 01:16, Kenneth Graunke <kenn...@whitecape.org> wrote: > What exactly is the difference between lowering returns in "main" and > lowering them in other subroutines? void vs. non-void is definitely > different, but I don't see why main is special. Looking at the code, it > doesn't actually seem to use lower_main_return anywhere...
There's no difference in how returns are lowered in "main" and in subroutines. The difference is in whether or not we lower returns. For instance, when _mesa_ir_link_shader() calls do_lower_jumps(), it always asks it to lower returns in subroutines (presumably to facilitate inlining), but it only asks it to lower returns in main if options->EmitNoMainReturn is true. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev