From 6a3603e356e14096e9554ceef57916fd03d9072b Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 30 Jun 2015 19:38:12 +0000 Subject: PR jit/66546: Add gcc_jit_context_set_bool_allow_unreachable_blocks gcc/jit/ChangeLog: PR jit/66546 * docs/cp/topics/contexts.rst (gccjit::context::set_bool_allow_unreachable_blocks): New. * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New. * docs/topics/contexts.rst (Options): Add notes discussing the transition from enums to entrypoints for new options. (gcc_jit_context_set_bool_allow_unreachable_blocks): New. * docs/_build/texinfo/libgccjit.texi: Regenerate. * jit-common.h (gcc::jit::inner_bool_option): New enum. * jit-recording.c: Within namespace gcc::jit... (recording::context::context): Handle m_inner_bool_options. (recording::context::set_inner_bool_option): New. (inner_bool_option_reproducer_strings): New. (recording::context::log_all_options): Log the "inner" bool options. (recording::context::log_inner_bool_option): New. (recording::context::dump_reproducer_to_file): Write initializers for "inner" bool options. (recording::function::validate): Don't check for block reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set. * jit-recording.h: Within namespace gcc::jit... (recording::context::set_inner_bool_option): New. (recording::context::get_inner_bool_option): New. (recording::context::log_inner_bool_option): New. (recording::context::m_inner_bool_options): New. * libgccjit++.h (gccjit::context::set_bool_allow_unreachable_blocks): New. * libgccjit.c (gcc_jit_context_set_bool_allow_unreachable_blocks): New. * libgccjit.h: Add note about options present in the initial release of libgccjit. (gcc_jit_context_set_bool_allow_unreachable_blocks): New API entrypoint. (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks): New macro. * libgccjit.map (LIBGCCJIT_ABI_2): New, containing... (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new entrypoint. gcc/testsuite/ChangeLog: PR jit/66546 * jit.dg/all-non-failing-tests.h: Add note about test-validly-unreachable-block.c. * jit.dg/test-validly-unreachable-block.c: New file. From-SVN: r225206 --- gcc/jit/docs/cp/topics/contexts.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gcc/jit/docs/cp') diff --git a/gcc/jit/docs/cp/topics/contexts.rst b/gcc/jit/docs/cp/topics/contexts.rst index b26a29d..162e4ae 100644 --- a/gcc/jit/docs/cp/topics/contexts.rst +++ b/gcc/jit/docs/cp/topics/contexts.rst @@ -184,6 +184,23 @@ Boolean options :c:func:`gcc_jit_context_set_bool_option`; the options have the same meaning. +.. function:: void \ + gccjit::context::set_bool_allow_unreachable_blocks (int bool_value) + + By default, libgccjit will issue an error about unreachable blocks + within a function. + + This entrypoint can be used to disable that error; it is a thin wrapper + around the C API + :c:func:`gcc_jit_context_set_bool_allow_unreachable_blocks`. + + This entrypoint was added in :ref:`LIBGCCJIT_ABI_2`; you can test for + its presence using + + .. code-block:: c + + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks + Integer options *************** -- cgit v1.1