Eric Botcazou <ebotca...@adacore.com> wrote: > OK, thanks. The number of special cases dealt with in the function is on the > verge of making it barely understandable though. Why couldn't a backward > scan > based only on: > > /* If the return register is not likely spilled, - as is > the case for floating point on SH4 - then it might > be set by an arithmetic operation that needs a > different mode than the exit block. */ > for (j = n_entities - 1; j >= 0; j--) > { > int e = entity_map[j]; > int mode = MODE_NEEDED (e, return_copy); > > if (mode != num_modes[e] && mode != MODE_EXIT (e)) > break; > } > > (with a few shortcuts to speed it up) be sufficient?
Although I might be getting you wrong, the current code does a scan based on those lines but builtin_return, functions with no return value and exceptions require special treatments and made things complex. Regards, kaz