[m-rev.] for post-commit review: Match output arguments correctly?for mutually recursive code
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Apr 12 19:01:09 AEST 2017
On Wed, 12 Apr 2017 12:58:15 +1000, Paul Bone <paul at bone.id.au> wrote:
> > BTW, there *is* a change in argument passing convention that we have
> > considered for which the looser definition of tail call may not work.
> > The current LLDS argument passing convention uses general purpose
> > registers, because when I designed the Mercury abstract machine,
> > the target machines were RISC machines with lots of registers.
> > Now, the only target worth discussing is the x86, which has a
> > grand total of 2 registers we can use. So I have thought several times
> > creating a separate version of the LLDS backend that would pass
> > arguments on the stack, not in registers. Creating that backend
> > would be a lot of work for probably only a few percent improvement
> > in performance, which is why I never started working on it, but
> > I did consider offering it as an honours or masters project.
>
> What's the benefit? Less shuffling of data?
Yes.
> Generally speaking, please let me know if I'm mistaken, the inline linear
> tail SCCs optimisation mostly doesn't care about tail calls. It only
> handles tail calls specifically to work-around (current) limitations with
> the MLDS.
That is correct.
Zoltan.
More information about the reviews
mailing list