r236531 - in /trunk/gcc: jit/ChangeLog jit/docs...

dmalcolm@gcc.gnu.org dmalcolm@gcc.gnu.org
Fri May 20 19:12:00 GMT 2016


Author: dmalcolm
Date: Fri May 20 19:12:49 2016
New Revision: 236531

URL: https://gcc.gnu.org/viewcvs?rev=236531&root=gcc&view=rev
Log:
jit: implement gcc_jit_rvalue_set_bool_require_tail_call

This implements the libgccjit support for must-tail-call via
a new:
  gcc_jit_rvalue_set_bool_require_tail_call
API entrypoint.

(I didn't implement a wrapper for this within the C++ bindings)

gcc/jit/ChangeLog:
	* docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
	* docs/topics/expressions.rst (Function calls): Add documentation
	of gcc_jit_rvalue_set_bool_require_tail_call.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.
	* jit-common.h (gcc::jit::recording::base_call): Add forward decl.
	* jit-playback.c: Within namespace gcc::jit::playback...
	(context::build_call) Add "require_tail_call" param and use it
	to set CALL_EXPR_MUST_TAIL_CALL.
	(context::new_call): Add "require_tail_call" param.
	(context::new_call_through_ptr): Likewise.
	* jit-playback.h: Within namespace gcc::jit::playback...
	(context::new_call: Add "require_tail_call" param.
	(context::new_call_through_ptr): Likewise.
	(context::build_call): Likewise.
	* jit-recording.c: Within namespace gcc::jit::recording...
	(base_call::base_call): New constructor.
	(base_call::write_reproducer_tail_call): New method.
	(call::call): Update for inheritance from base_call.
	(call::replay_into): Provide m_require_tail_call to call
	to new_call.
	(call::write_reproducer): Call write_reproducer_tail_call.
	(call_through_ptr::call_through_ptr): Update for inheritance from
	base_call.
	(call_through_ptr::replay_into): Provide m_require_tail_call to call
	to new_call_through_ptr.
	(recording::call_through_ptr::write_reproducer): Call
	write_reproducer_tail_call.
	* jit-recording.h: Within namespace gcc::jit::recording...
	(rvalue::dyn_cast_base_call): New virtual function.
	(class base_call): New subclass of class rvalue.
	(class call): Inherit from base_call rather than directly from
	rvalue, moving get_precedence and m_args to base_call.
	(class call_through_ptr): Likewise.
	* libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
	function.
	* libgccjit.h
	(LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
	macro.
	(gcc_jit_rvalue_set_bool_require_tail_call): New function.
	* libgccjit.map (LIBGCCJIT_ABI_6): New.
	(gcc_jit_rvalue_set_bool_require_tail_call): Add.

gcc/testsuite/ChangeLog:
	* jit.dg/all-non-failing-tests.h: Add
	test-factorial-must-tail-call.c.
	* jit.dg/test-error-impossible-must-tail-call.c: New test case.
	* jit.dg/test-factorial-must-tail-call.c: New test case.


Added:
    trunk/gcc/testsuite/jit.dg/test-error-impossible-must-tail-call.c
    trunk/gcc/testsuite/jit.dg/test-factorial-must-tail-call.c
Modified:
    trunk/gcc/jit/ChangeLog
    trunk/gcc/jit/docs/topics/compatibility.rst
    trunk/gcc/jit/docs/topics/expressions.rst
    trunk/gcc/jit/jit-common.h
    trunk/gcc/jit/jit-playback.c
    trunk/gcc/jit/jit-playback.h
    trunk/gcc/jit/jit-recording.c
    trunk/gcc/jit/jit-recording.h
    trunk/gcc/jit/libgccjit.c
    trunk/gcc/jit/libgccjit.h
    trunk/gcc/jit/libgccjit.map
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/jit.dg/all-non-failing-tests.h



More information about the Gcc-cvs mailing list