GCCJIT and tail-recursive calls
Basile Starynkevitch
basile@starynkevitch.net
Thu Jan 1 00:00:00 GMT 2015
Hello all,
It is well known that GCC is sometimes able to optimize some calls to
tail-recursive calls (or tail calls
https://en.wikipedia.org/wiki/Tail_call ...) which do not consume any stack.
can a GCCJIT application issues such tail calls? I'm not talking of
letting GCC decide entirely by itself (GCCJIT is probably doing that
already). I was thinking of adding a construct where the GCCJIT client knows
for sure that the call should be tail-rec (and if GCCJIT was not able to
make a tailcall, that would be an error).
Also, even without optimization (i.e. at -O0) that should remain a
tailcall...
Perhaps adding a gcc_jit_block_end_with_tail_call function?
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
More information about the Jit
mailing list