Skip to content

Commit

Permalink
Merger of dmalcolm/jit branch from git
Browse files Browse the repository at this point in the history
ChangeLog:
	* ChangeLog.jit: New.
	* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.

contrib/ChangeLog:
	* ChangeLog.jit: New.
	* jit-coverage-report.py: New file: a script to print crude
	code-coverage information for the libgccjit API.

gcc/ChangeLog:
	* ChangeLog.jit: New.
	* Makefile.in (doc_build_sys): New variable, set to "sphinx" if
	sphinx is installed, falling back to "texinfo" otherwise.
	(FULL_DRIVER_NAME): New variable, adapted from the
	install-driver target.  New target, a symlink within the builddir,
	linked to "xgcc", for use when running the JIT library from the
	builddir.
	(MOSTLYCLEANFILES): Add FULL_DRIVER_NAME.
	(install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it
	out.
	* configure.ac (doc_build_sys): New variable, set to "sphinx" if
	sphinx is installed, falling back to "texinfo" otherwise.
	(GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing
	GCC_DRIVER_NAME for the benefit of jit/internal-api.c.
	* configure: Regenerate.
	* doc/install.texi (--enable-host-shared): Specify that this is
	required when building libgccjit.
	(Tools/packages necessary for modifying GCC): Add Sphinx.
	* timevar.def (TV_JIT_REPLAY): New.
	(TV_ASSEMBLE): New.
	(TV_LINK): New.
	(TV_LOAD): New.

gcc/java/ChangeLog:
	* gcc/ChangeLog.jit: New.

gcc/jit/ChangeLog:
	* ChangeLog.jit: New.
	* ChangeLog: New.
	* Make-lang.in: New.
	* TODO.rst: New.
	* config-lang.in: New.
	* docs/Makefile: New.
	* docs/_build/texinfo/Makefile: New.
	* docs/_build/texinfo/factorial.png: New.
	* docs/_build/texinfo/libgccjit.texi: New.
	* docs/_build/texinfo/sum-of-squares.png: New.
	* docs/conf.py: New.
	* docs/examples/tut01-hello-world.c: New.
	* docs/examples/tut02-square.c: New.
	* docs/examples/tut03-sum-of-squares.c: New.
	* docs/examples/tut04-toyvm/Makefile: New.
	* docs/examples/tut04-toyvm/factorial.toy: New.
	* docs/examples/tut04-toyvm/fibonacci.toy: New.
	* docs/examples/tut04-toyvm/toyvm.c: New.
	* docs/index.rst: New.
	* docs/internals/index.rst: New.
	* docs/intro/factorial.png: New.
	* docs/intro/index.rst: New.
	* docs/intro/sum-of-squares.png: New.
	* docs/intro/tutorial01.rst: New.
	* docs/intro/tutorial02.rst: New.
	* docs/intro/tutorial03.rst: New.
	* docs/intro/tutorial04.rst: New.
	* docs/topics/contexts.rst: New.
	* docs/topics/expressions.rst: New.
	* docs/topics/functions.rst: New.
	* docs/topics/index.rst: New.
	* docs/topics/locations.rst: New.
	* docs/topics/objects.rst: New.
	* docs/topics/results.rst: New.
	* docs/topics/types.rst: New.
	* dummy-frontend.c: New.
	* jit-builtins.c: New.
	* jit-builtins.h: New.
	* jit-common.h: New.
	* jit-playback.c: New.
	* jit-playback.h: New.
	* jit-recording.c: New.
	* jit-recording.h: New.
	* libgccjit++.h: New.
	* libgccjit.c: New.
	* libgccjit.h: New.
	* libgccjit.map: New.
	* notes.txt: New.

gcc/testsuite/ChangeLog:
	* ChangeLog.jit: New.
	* jit.dg/all-non-failing-tests.h: New.
	* jit.dg/harness.h: New.
	* jit.dg/jit.exp: New.
	* jit.dg/test-accessing-struct.c: New.
	* jit.dg/test-accessing-union.c: New.
	* jit.dg/test-array-as-pointer.c: New.
	* jit.dg/test-arrays.c: New.
	* jit.dg/test-calling-external-function.c: New.
	* jit.dg/test-calling-function-ptr.c: New.
	* jit.dg/test-combination.c: New.
	* jit.dg/test-dot-product.c: New.
	* jit.dg/test-empty.c: New.
	* jit.dg/test-error-accessing-field-in-other-struct.c: New.
	* jit.dg/test-error-adding-to-terminated-block.c: New.
	* jit.dg/test-error-array-as-pointer.c: New.
	* jit.dg/test-error-bad-cast.c: New.
	* jit.dg/test-error-block-in-wrong-function.c: New.
	* jit.dg/test-error-call-through-ptr-with-mismatching-args.c: New.
	* jit.dg/test-error-call-through-ptr-with-non-function.c: New.
	* jit.dg/test-error-call-through-ptr-with-non-pointer.c: New.
	* jit.dg/test-error-call-through-ptr-with-not-enough-args.c: New.
	* jit.dg/test-error-call-through-ptr-with-too-many-args.c: New.
	* jit.dg/test-error-call-with-mismatching-args.c: New.
	* jit.dg/test-error-call-with-not-enough-args.c: New.
	* jit.dg/test-error-call-with-too-many-args.c: New.
	* jit.dg/test-error-dereference-field-of-non-pointer.c: New.
	* jit.dg/test-error-dereference-read-of-non-pointer.c: New.
	* jit.dg/test-error-get-type-bad-enum.c: New.
	* jit.dg/test-error-index-not-a-numeric-type.c: New.
	* jit.dg/test-error-mismatching-types-in-assignment.c: New.
	* jit.dg/test-error-mismatching-types-in-call.c: New.
	* jit.dg/test-error-missing-return.c: New.
	* jit.dg/test-error-new-binary-op-bad-op.c: New.
	* jit.dg/test-error-new-function-bad-kind.c: New.
	* jit.dg/test-error-new-unary-op-bad-op.c: New.
	* jit.dg/test-error-null-passed-to-api.c: New.
	* jit.dg/test-error-return-within-void-function.c: New.
	* jit.dg/test-error-unreachable-block.c: New.
	* jit.dg/test-error-unterminated-block.c: New.
	* jit.dg/test-error-value-not-a-numeric-type.c: New.
	* jit.dg/test-expressions.c: New.
	* jit.dg/test-factorial.c: New.
	* jit.dg/test-fibonacci.c: New.
	* jit.dg/test-functions.c: New.
	* jit.dg/test-fuzzer.c: New.
	* jit.dg/test-hello-world.c: New.
	* jit.dg/test-linked-list.c: New.
	* jit.dg/test-long-names.c: New.
	* jit.dg/test-nested-contexts.c: New.
	* jit.dg/test-nested-loops.c: New.
	* jit.dg/test-operator-overloading.cc: New.
	* jit.dg/test-quadratic.c: New.
	* jit.dg/test-quadratic.cc: New.
	* jit.dg/test-reading-struct.c: New.
	* jit.dg/test-string-literal.c: New.
	* jit.dg/test-sum-of-squares.c: New.
	* jit.dg/test-threads.c: New.
	* jit.dg/test-types.c: New.
	* jit.dg/test-using-global.c: New.
	* jit.dg/test-volatile.c: New.

include/ChangeLog:
	* ChangeLog.jit: New.

libbacktrace/ChangeLog:
	* ChangeLog.jit: New.

libcpp/ChangeLog:
	* ChangeLog.jit: New.

libdecnumber/ChangeLog:
	* ChangeLog.jit: New.

libiberty/ChangeLog:
	* ChangeLog.jit: New.

zlib/ChangeLog:
	* ChangeLog.jit: New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217374 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
dmalcolm committed Nov 11, 2014
1 parent abad5ed commit 863e76f
Show file tree
Hide file tree
Showing 136 changed files with 39,772 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014-11-11 David Malcolm <[email protected]>

* ChangeLog.jit: New.
* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.

2014-11-11 Francois-Xavier Coudert <[email protected]>

PR target/63610
Expand Down
23 changes: 23 additions & 0 deletions ChangeLog.jit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
2014-10-02 David Malcolm <[email protected]>

* MAINTAINERS: Update jit entry to match formatting change on
trunk: "Put all email addresses between '<' and '>'."

2014-09-24 David Malcolm <[email protected]>

* ChangeLog.jit: Add copyright footer.

2014-09-11 David Malcolm <[email protected]>

* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.

2013-10-03 David Malcolm <[email protected]>

* configure.ac: Add --enable-host-shared
* configure: Regenerate.

Copyright (C) 2013-2014 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ testsuite Janis Johnson <[email protected]>
register allocation Vladimir Makarov <[email protected]>
gdbhooks.py David Malcolm <[email protected]>
SLSR Bill Schmidt <[email protected]>
jit David Malcolm <[email protected]>

Note that individuals who maintain parts of the compiler need approval to
check in changes outside of the parts of the compiler they maintain.
Expand Down
6 changes: 6 additions & 0 deletions contrib/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2014-11-11 David Malcolm <[email protected]>

* ChangeLog.jit: New.
* jit-coverage-report.py: New file: a script to print crude
code-coverage information for the libgccjit API.

2014-11-11 Marat Zakirov <[email protected]>

* mklog: Symbol '}' stops search for changes.
Expand Down
14 changes: 14 additions & 0 deletions contrib/ChangeLog.jit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2014-09-24 David Malcolm <[email protected]>

* ChangeLog.jit: Add copyright footer.

2014-01-23 David Malcolm <[email protected]>

* jit-coverage-report.py: New file: a script to print crude
code-coverage information for the libgccjit API.

Copyright (C) 2014 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
67 changes: 67 additions & 0 deletions contrib/jit-coverage-report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#! /usr/bin/python
#
# Print a report on which libgccjit.so symbols are used in which test
# cases, and which lack test coverage. Tested with Python 2.7 and 3.2
# To be run from the root directory of the source tree.
#
# Copyright (C) 2014 Free Software Foundation, Inc.
# Written by David Malcolm <[email protected]>.
#
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html

from collections import Counter
import glob
import re
import sys

def parse_map_file(path):
"""
Parse libgccjit.map, returning the symbols in the API as a list of str.
"""
syms = []
with open(path) as f:
for line in f:
m = re.match('^\s+([a-z_]+);$', line)
if m:
syms.append(m.group(1))
return syms

def parse_test_case(path):
"""
Locate all symbol-like things in a C test case, yielding
them as a sequence of str.
"""
with open(path) as f:
for line in f:
for m in re.finditer('([_A-Za-z][_A-Za-z0-9]*)', line):
yield m.group(1)

def find_test_cases():
for path in glob.glob('gcc/testsuite/jit.dg/*.[ch]'):
yield path

api_syms = parse_map_file('gcc/jit/libgccjit.map')

syms_in_test_cases = {}
for path in find_test_cases():
syms_in_test_cases[path] = list(parse_test_case(path))

uses = Counter()
for sym in sorted(api_syms):
print('symbol: %s' % sym)
uses[sym] = 0
for path in syms_in_test_cases:
count = syms_in_test_cases[path].count(sym)
uses[sym] += count
if count:
print(' uses in %s: %i' % (path, count))
if uses[sym] == 0:
print(' NEVER USED')
sys.stdout.write('\n')

layout = '%40s %5s %s'
print(layout % ('SYMBOL', 'USES', 'HISTOGRAM'))
for sym, count in uses.most_common():
print(layout % (sym, count, '*' * count if count else 'UNUSED'))
25 changes: 25 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
2014-11-11 David Malcolm <[email protected]>

* ChangeLog.jit: New.
* Makefile.in (doc_build_sys): New variable, set to "sphinx" if
sphinx is installed, falling back to "texinfo" otherwise.
(FULL_DRIVER_NAME): New variable, adapted from the
install-driver target. New target, a symlink within the builddir,
linked to "xgcc", for use when running the JIT library from the
builddir.
(MOSTLYCLEANFILES): Add FULL_DRIVER_NAME.
(install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it
out.
* configure.ac (doc_build_sys): New variable, set to "sphinx" if
sphinx is installed, falling back to "texinfo" otherwise.
(GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing
GCC_DRIVER_NAME for the benefit of jit/internal-api.c.
* configure: Regenerate.
* doc/install.texi (--enable-host-shared): Specify that this is
required when building libgccjit.
(Tools/packages necessary for modifying GCC): Add Sphinx.
* timevar.def (TV_JIT_REPLAY): New.
(TV_ASSEMBLE): New.
(TV_LINK): New.
(TV_LOAD): New.

2014-11-11 Francois-Xavier Coudert <[email protected]>

PR target/63610
Expand Down
Loading

0 comments on commit 863e76f

Please sign in to comment.