[Bug jit/66546] No way to disable check for unreachable blocks

2015-07-01 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66546

--- Comment #4 from David Malcolm dmalcolm at gcc dot gnu.org ---
Author: dmalcolm
Date: Wed Jul  1 14:35:53 2015
New Revision: 225254

URL: https://gcc.gnu.org/viewcvs?rev=225254root=gccview=rev
Log:
PR jit/66546: Add gcc_jit_context_set_bool_allow_unreachable_blocks

Backport of r225206 (04feb56e6acd497d0add042232afd7940ef61adb)
from trunk

gcc/jit/ChangeLog:
Backport from mainline r225206
2015-06-30  David Malcolm  dmalc...@redhat.com

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:
Backport from mainline r225206
2015-06-30  David Malcolm  dmalc...@redhat.com

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.

Added:
branches/gcc-5-branch/gcc/testsuite/jit.dg/test-validly-unreachable-block.c
Modified:
branches/gcc-5-branch/gcc/jit/ChangeLog
branches/gcc-5-branch/gcc/jit/docs/_build/texinfo/libgccjit.texi
branches/gcc-5-branch/gcc/jit/docs/cp/topics/contexts.rst
branches/gcc-5-branch/gcc/jit/docs/topics/compatibility.rst
branches/gcc-5-branch/gcc/jit/docs/topics/contexts.rst
branches/gcc-5-branch/gcc/jit/jit-common.h
branches/gcc-5-branch/gcc/jit/jit-recording.c
branches/gcc-5-branch/gcc/jit/jit-recording.h
branches/gcc-5-branch/gcc/jit/libgccjit++.h
branches/gcc-5-branch/gcc/jit/libgccjit.c
branches/gcc-5-branch/gcc/jit/libgccjit.h
branches/gcc-5-branch/gcc/jit/libgccjit.map
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/jit.dg/all-non-failing-tests.h


[Bug jit/66546] No way to disable check for unreachable blocks

2015-07-01 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66546

David Malcolm dmalcolm at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from David Malcolm dmalcolm at gcc dot gnu.org ---
Fixed in trunk as r225206.
Fixed in gcc-5-branch (for gcc 5.2) as r225254.
Resolving as fixed.


[Bug jit/66546] No way to disable check for unreachable blocks

2015-06-30 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66546

--- Comment #3 from David Malcolm dmalcolm at gcc dot gnu.org ---
Author: dmalcolm
Date: Tue Jun 30 19:38:12 2015
New Revision: 225206

URL: https://gcc.gnu.org/viewcvs?rev=225206root=gccview=rev
Log:
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.


Added:
trunk/gcc/testsuite/jit.dg/test-validly-unreachable-block.c
Modified:
trunk/gcc/jit/ChangeLog
trunk/gcc/jit/docs/_build/texinfo/libgccjit.texi
trunk/gcc/jit/docs/cp/topics/contexts.rst
trunk/gcc/jit/docs/topics/compatibility.rst
trunk/gcc/jit/docs/topics/contexts.rst
trunk/gcc/jit/jit-common.h
trunk/gcc/jit/jit-recording.c
trunk/gcc/jit/jit-recording.h
trunk/gcc/jit/libgccjit++.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


[Bug jit/66546] No way to disable check for unreachable blocks

2015-06-15 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66546

--- Comment #1 from David Malcolm dmalcolm at gcc dot gnu.org ---
(In reply to David Malcolm from comment #0)
 instructions, so it should make it easier for client code if they can have a
jit client code, that is, i.e. interpreters linking against libgccjit


[Bug jit/66546] No way to disable check for unreachable blocks

2015-06-15 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66546

--- Comment #2 from David Malcolm dmalcolm at gcc dot gnu.org ---
(In reply to David Malcolm from comment #0)
 Currently libgccjit always issues a hard error about unconditional blocks.
unreachable, that should say