Go to file
David Malcolm 86d0ac8876 jit: New API entrypoint: gcc_jit_context_dump_reproducer_to_file
gcc/jit/ChangeLog:
	* docs/cp/topics/contexts.rst (Debugging): Add
	gccjit::context::dump_reproducer_to_file.
	* docs/internals/index.rst (Design notes): New section,
	discussing input validation and
	gcc_jit_context_dump_reproducer_to_file.
	* docs/topics/contexts.rst (Debugging): Add
	gcc_jit_context_dump_reproducer_to_file.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.
	* jit-common.h (gcc::jit::dump::get_context): New accessor.
	* jit-recording.c: Include "hash-map.h".
	Within namespace ::gcc::jit...
	(dump::write): Flush each line.
	(dump::make_location): Pass false for new param "created_by_user".
	(class allocator): New class.
	(allocator::~allocator): New function.
	(allocator::xstrdup_printf): New function.
	(allocator::xstrdup_printf_va): New function.
	(class reproducer): New subclass of dump.
	(reproducer::reproducer): New function.
	(reproducer::write_params): New function.
	(reproducer::write_args): New function.
	(reproducer::make_identifier): New function.
	(reproducer::make_tmp_identifier): New function.
	(reproducer::get_identifier): New pair of functions.
	(reproducer::get_identifier_as_rvalue): New function.
	(reproducer::get_identifier_as_lvalue): New function.
	(reproducer::get_identifier_as_type): New function.
	(reproducer::xstrdup_printf): New function.
	(recording::context::context): Initialize m_toplevel_ctxt.
	(recording::context::new_location): Add param created_by_user.
	(str_option_reproducer_strings): New table of strings.
	(int_option_reproducer_strings): Likewise.
	(bool_option_reproducer_strings): Likewise.
	(get_type_enum_strings): Likewise.
	(names_of_function_kinds): Likewise.
	(global_kind_reproducer_strings): Likewise.
	(unary_op_reproducer_strings): Likewise.
	(binary_op_reproducer_strings): Likewise.
	(comparison_reproducer_strings): Likewise.
	Within namespace ::gcc::jit::recording::...
	(context::dump_reproducer_to_file): New function.
	(string::write_reproducer): Likewise.
	(location::write_reproducer): Likewise.
	(type::access_as_type): Likewise.
	(memento_of_get_type::write_reproducer): Likewise.
	(memento_of_get_pointer::write_reproducer): Likewise.
	(memento_of_get_const::write_reproducer): Likewise.
	(memento_of_get_volatile::write_reproducer): Likewise.
	(array_type::write_reproducer): Likewise.
	(function_type::write_reproducer): Likewise.
	(function_type::write_deferred_reproducer): Likewise.
	(field::write_reproducer): Likewise.
	(struct_::access_as_type): Likewise.
	(struct_::write_reproducer): Likewise.
	(union_::write_reproducer): Likewise.
	(fields::write_reproducer): Likewise.
	(rvalue::access_as_rvalue): Likewise.
	(lvalue::access_as_rvalue): Likewise.
	(lvalue::access_as_lvalue): Likewise.
	(param::access_as_rvalue): Likewise.
	(param::access_as_lvalue): Likewise.
	(param::write_reproducer): Likewise.
	(function::write_reproducer): Likewise.
	(block::write_reproducer): Likewise.
	(global::write_reproducer): Likewise.
	(memento_of_new_rvalue_from_const <int>::write_reproducer):
	Likewise.
	(memento_of_new_rvalue_from_const <long>::write_reproducer):
	Likewise.
	(memento_of_new_rvalue_from_const <double>::write_reproducer):
	Likewise.
	(memento_of_new_rvalue_from_const <void *>::write_reproducer):
	Likewise.
	(memento_of_new_string_literal::write_reproducer): Likewise.
	(unary_op::write_reproducer): Likewise.
	(binary_op::write_reproducer): Likewise.
	(comparison::write_reproducer): Likewise.
	(cast::write_reproducer): Likewise.
	(call::write_reproducer): Likewise.
	(call_through_ptr::write_reproducer): Likewise.
	(array_access::write_reproducer): Likewise.
	(access_field_of_lvalue::write_reproducer): Likewise.
	(access_field_rvalue::write_reproducer): Likewise.
	(dereference_field_rvalue::write_reproducer): Likewise.
	(dereference_rvalue::write_reproducer): Likewise.
	(get_address_of_lvalue::write_reproducer): Likewise.
	(local::write_reproducer): Likewise.
	(eval::write_reproducer): Likewise.
	(assignment::write_reproducer): Likewise.
	(assignment_op::write_reproducer): Likewise.
	(comment::write_reproducer): Likewise.
	(conditional::write_reproducer): Likewise.
	(jump::write_reproducer): Likewise.
	(return_::write_reproducer): Likewise.
	* jit-recording.h (gcc::jit::reproducer): New forward declararion.
	Within namespace ::gcc::jit::recording::...
	(context::new_location): Add "created_by_user" param.
	(context::dump_reproducer_to_file): New method.
	(context::m_toplevel_ctxt): New field.
	(memento::write_reproducer): New pure virtual function.
	(memento::dyn_cast_location): New virtual function.
	(string::write_reproducer):
	(location::location): Add "created_by_user" param.
	(location::dyn_cast_location): New function.
	(location::created_by_user): New accessor.
	(location::write_reproducer): New function.
	(location::m_created_by_user): New field.
	(type::access_as_type): New virtual function.
	(location::write_reproducer): Likewise.
	(type::access_as_type): Likewise.
	(memento_of_get_type::write_reproducer): Likewise.
	(memento_of_get_pointer::write_reproducer): Likewise.
	(memento_of_get_const::write_reproducer): Likewise.
	(memento_of_get_volatile::write_reproducer): Likewise.
	(array_type::write_reproducer): Likewise.
	(function_type::write_reproducer): Likewise.
	(function_type::write_deferred_reproducer): Likewise.
	(field::write_reproducer): Likewise.
	(struct_::access_as_type): Likewise.
	(struct_::write_reproducer): Likewise.
	(union_::write_reproducer): Likewise.
	(union_::m_fields): Remove stray unused field.
	(fields::length): New accessor.
	(fields::get_field): New accessor.
	(fields::write_reproducer): New function.
	(rvalue::access_as_rvalue): Likewise.
	(lvalue::access_as_rvalue): Likewise.
	(lvalue::access_as_lvalue): Likewise.
	(param::access_as_rvalue): Likewise.
	(param::access_as_lvalue): Likewise.
	(param::write_reproducer): Likewise.
	(function::write_reproducer): Likewise.
	(block::write_reproducer): Likewise.
	(global::write_reproducer): Likewise.
	(memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
	Likewise.
	(memento_of_new_string_literal::write_reproducer): Likewise.
	(unary_op::write_reproducer): Likewise.
	(binary_op::write_reproducer): Likewise.
	(comparison::write_reproducer): Likewise.
	(cast::write_reproducer): Likewise.
	(call::write_reproducer): Likewise.
	(call_through_ptr::write_reproducer): Likewise.
	(array_access::write_reproducer): Likewise.
	(access_field_of_lvalue::write_reproducer): Likewise.
	(access_field_rvalue::write_reproducer): Likewise.
	(dereference_field_rvalue::write_reproducer): Likewise.
	(dereference_rvalue::write_reproducer): Likewise.
	(get_address_of_lvalue::write_reproducer): Likewise.
	(local::write_reproducer): Likewise.
	(eval::write_reproducer): Likewise.
	(assignment::write_reproducer): Likewise.
	(assignment_op::write_reproducer): Likewise.
	(comment::write_reproducer): Likewise.
	(conditional::write_reproducer): Likewise.
	(jump::write_reproducer): Likewise.
	(return_::write_reproducer): Likewise.
	* libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
	* libgccjit.c (gcc_jit_context_new_location): Pass "true" as
	param "created_by_user".
	(gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
	* libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
	entrypoint.
	* libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
	entrypoint.

gcc/testsuite/ChangeLog:
	* jit.dg/harness.h (set_up_logging): Move string concatenation
	into...
	(concat_strings): New function.
	(dump_reproducer): New function.
	(test_jit): Call dump_reproducer.
	* jit.dg/jit.exp (is_testcase_meant_to_generate_a_reproducer): New
	function.
	(jit-dg-test): Delete any generated reproducer from previous runs.
	Verify that a generated reproducer was created, and verify that it
	compiles.
	* jit.dg/test-nested-contexts.c (main): Call
	gcc_jit_context_dump_reproducer_to_file.

From-SVN: r219564
2015-01-13 22:14:46 +00:00
INSTALL
boehm-gc Include target-utils.exp in boehm-gc testing 2014-12-18 09:42:22 +00:00
config isl.m4: Don't pass -DCLOOG_INT_GMP on islinc. 2014-12-04 08:45:33 +00:00
contrib check_GNU_style.sh: Support patches coming from stdin. 2015-01-12 08:40:16 +00:00
fixincludes server.c (server_setup): Check return value of getcwd and in case of error set buff[0] to 0. 2014-12-15 09:10:41 +01:00
gcc jit: New API entrypoint: gcc_jit_context_dump_reproducer_to_file 2015-01-13 22:14:46 +00:00
gnattools
gotools Makefile.am (GOCOMPILER): Set to GOC or GOC_FOR_TARGET depending on whether this is a native build or not. 2015-01-10 00:23:48 +00:00
include xasprintf.c: New file. 2014-12-24 17:22:51 +01:00
intl
libada Update copyright years. 2015-01-05 13:33:28 +01:00
libatomic configure.ac: Don't add ${libgcj} for arm*-*-freebsd*. 2015-01-09 15:06:02 +01:00
libbacktrace Update copyright years. 2015-01-05 13:33:28 +01:00
libcc1 re PR rtl-optimization/64536 (Undefined .L* symbol starting with jump2 on s390x) 2015-01-09 22:17:10 +01:00
libcilkrts Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
libcpp Update copyright years. 2015-01-05 13:33:28 +01:00
libdecnumber Update copyright years. 2015-01-05 13:33:28 +01:00
libffi Set TARGET to X86_64 if __x86_64__ is defined 2015-01-13 07:57:27 -08:00
libgcc configure.ac: Don't add ${libgcj} for arm*-*-freebsd*. 2015-01-09 15:06:02 +01:00
libgfortran Update copyright years. 2015-01-05 13:33:28 +01:00
libgo cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" toolchain). 2015-01-10 01:01:10 +00:00
libgomp libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
libiberty xasprintf.c: New file. 2014-12-24 17:22:51 +01:00
libitm Update copyright years. 2015-01-05 13:33:28 +01:00
libjava re PR libgcj/64219 (Rename libgcj-5.0.pc to libgcj-5.pc) 2015-01-13 09:23:31 +01:00
libobjc Added PR libobjc/51891. 2015-01-09 18:12:51 +00:00
liboffloadmic libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
libquadmath gcc.c (process_command): Update copyright notice dates. 2015-01-05 13:05:46 +01:00
libsanitizer sanitizer_deadlock_detector.h: Cherry pick upstream r224518 and r224519. 2015-01-13 18:01:30 +01:00
libssp Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
libstdc++-v3 re PR c++/64356 (Some constexpr expressions not recognized as constexpr) 2015-01-13 16:04:43 -05:00
libvtv Add load of target-utils.exp to libatomic, libitm, libvtv, libgo testsuite drivers 2014-12-12 12:00:01 +00:00
lto-plugin lto-wrapper.c (compile_offload_image): Start processing in_argv from 0 instead of 1. 2014-12-09 22:44:16 +00:00
maintainer-scripts
zlib Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
.dir-locals.el
.gitignore Local Vim config with GNU formatting. 2014-12-09 13:45:47 +00:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog update to add myself to Objective-c/c++ maintainers 2015-01-13 11:23:46 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS update to add myself to Objective-c/c++ maintainers 2015-01-13 11:23:46 +00:00
Makefile.def configure.ac (host_tools): Add gotools. 2015-01-09 21:23:09 +00:00
Makefile.in configure.ac (host_tools): Add gotools. 2015-01-09 21:23:09 +00:00
Makefile.tpl Bug #63539 2015-01-03 14:50:48 -08:00
README
compile
config-ml.in
config.guess config.sub: Update from upstream, to 2015-01-01 version. 2015-01-02 09:30:21 +00:00
config.rpath
config.sub config.sub: Update from upstream, to 2015-01-01 version. 2015-01-02 09:30:21 +00:00
configure configure.ac (host_tools): Add gotools. 2015-01-09 21:23:09 +00:00
configure.ac configure.ac (host_tools): Add gotools. 2015-01-09 21:23:09 +00:00
depcomp
install-sh
libtool-ldflags
libtool.m4 Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
symlink-tree
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.