Skip to content

Commit 35485da

Browse files
author
David Malcolm
committed
Merger of dmalcolm/jit branch from git
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. From-SVN: r217374
1 parent 970a9ca commit 35485da

File tree

136 files changed

+39772
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+39772
-6
lines changed

ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-11-11 David Malcolm <[email protected]>
2+
3+
* ChangeLog.jit: New.
4+
* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.
5+
16
2014-11-11 Francois-Xavier Coudert <[email protected]>
27

38
PR target/63610

ChangeLog.jit

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2014-10-02 David Malcolm <[email protected]>
2+
3+
* MAINTAINERS: Update jit entry to match formatting change on
4+
trunk: "Put all email addresses between '<' and '>'."
5+
6+
2014-09-24 David Malcolm <[email protected]>
7+
8+
* ChangeLog.jit: Add copyright footer.
9+
10+
2014-09-11 David Malcolm <[email protected]>
11+
12+
* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.
13+
14+
2013-10-03 David Malcolm <[email protected]>
15+
16+
* configure.ac: Add --enable-host-shared
17+
* configure: Regenerate.
18+
19+
Copyright (C) 2013-2014 Free Software Foundation, Inc.
20+
21+
Copying and distribution of this file, with or without modification,
22+
are permitted in any medium without royalty provided the copyright
23+
notice and this notice are preserved.

MAINTAINERS

+1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ testsuite Janis Johnson <[email protected]>
260260
register allocation Vladimir Makarov <[email protected]>
261261
gdbhooks.py David Malcolm <[email protected]>
262262
SLSR Bill Schmidt <[email protected]>
263+
jit David Malcolm <[email protected]>
263264

264265
Note that individuals who maintain parts of the compiler need approval to
265266
check in changes outside of the parts of the compiler they maintain.

contrib/ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2014-11-11 David Malcolm <[email protected]>
2+
3+
* ChangeLog.jit: New.
4+
* jit-coverage-report.py: New file: a script to print crude
5+
code-coverage information for the libgccjit API.
6+
17
2014-11-11 Marat Zakirov <[email protected]>
28

39
* mklog: Symbol '}' stops search for changes.

contrib/ChangeLog.jit

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2014-09-24 David Malcolm <[email protected]>
2+
3+
* ChangeLog.jit: Add copyright footer.
4+
5+
2014-01-23 David Malcolm <[email protected]>
6+
7+
* jit-coverage-report.py: New file: a script to print crude
8+
code-coverage information for the libgccjit API.
9+
10+
Copyright (C) 2014 Free Software Foundation, Inc.
11+
12+
Copying and distribution of this file, with or without modification,
13+
are permitted in any medium without royalty provided the copyright
14+
notice and this notice are preserved.

contrib/jit-coverage-report.py

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#! /usr/bin/python
2+
#
3+
# Print a report on which libgccjit.so symbols are used in which test
4+
# cases, and which lack test coverage. Tested with Python 2.7 and 3.2
5+
# To be run from the root directory of the source tree.
6+
#
7+
# Copyright (C) 2014 Free Software Foundation, Inc.
8+
# Written by David Malcolm <[email protected]>.
9+
#
10+
# This script is Free Software, and it can be copied, distributed and
11+
# modified as defined in the GNU General Public License. A copy of
12+
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
13+
14+
from collections import Counter
15+
import glob
16+
import re
17+
import sys
18+
19+
def parse_map_file(path):
20+
"""
21+
Parse libgccjit.map, returning the symbols in the API as a list of str.
22+
"""
23+
syms = []
24+
with open(path) as f:
25+
for line in f:
26+
m = re.match('^\s+([a-z_]+);$', line)
27+
if m:
28+
syms.append(m.group(1))
29+
return syms
30+
31+
def parse_test_case(path):
32+
"""
33+
Locate all symbol-like things in a C test case, yielding
34+
them as a sequence of str.
35+
"""
36+
with open(path) as f:
37+
for line in f:
38+
for m in re.finditer('([_A-Za-z][_A-Za-z0-9]*)', line):
39+
yield m.group(1)
40+
41+
def find_test_cases():
42+
for path in glob.glob('gcc/testsuite/jit.dg/*.[ch]'):
43+
yield path
44+
45+
api_syms = parse_map_file('gcc/jit/libgccjit.map')
46+
47+
syms_in_test_cases = {}
48+
for path in find_test_cases():
49+
syms_in_test_cases[path] = list(parse_test_case(path))
50+
51+
uses = Counter()
52+
for sym in sorted(api_syms):
53+
print('symbol: %s' % sym)
54+
uses[sym] = 0
55+
for path in syms_in_test_cases:
56+
count = syms_in_test_cases[path].count(sym)
57+
uses[sym] += count
58+
if count:
59+
print(' uses in %s: %i' % (path, count))
60+
if uses[sym] == 0:
61+
print(' NEVER USED')
62+
sys.stdout.write('\n')
63+
64+
layout = '%40s %5s %s'
65+
print(layout % ('SYMBOL', 'USES', 'HISTOGRAM'))
66+
for sym, count in uses.most_common():
67+
print(layout % (sym, count, '*' * count if count else 'UNUSED'))

gcc/ChangeLog

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
2014-11-11 David Malcolm <[email protected]>
2+
3+
* ChangeLog.jit: New.
4+
* Makefile.in (doc_build_sys): New variable, set to "sphinx" if
5+
sphinx is installed, falling back to "texinfo" otherwise.
6+
(FULL_DRIVER_NAME): New variable, adapted from the
7+
install-driver target. New target, a symlink within the builddir,
8+
linked to "xgcc", for use when running the JIT library from the
9+
builddir.
10+
(MOSTLYCLEANFILES): Add FULL_DRIVER_NAME.
11+
(install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it
12+
out.
13+
* configure.ac (doc_build_sys): New variable, set to "sphinx" if
14+
sphinx is installed, falling back to "texinfo" otherwise.
15+
(GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing
16+
GCC_DRIVER_NAME for the benefit of jit/internal-api.c.
17+
* configure: Regenerate.
18+
* doc/install.texi (--enable-host-shared): Specify that this is
19+
required when building libgccjit.
20+
(Tools/packages necessary for modifying GCC): Add Sphinx.
21+
* timevar.def (TV_JIT_REPLAY): New.
22+
(TV_ASSEMBLE): New.
23+
(TV_LINK): New.
24+
(TV_LOAD): New.
25+
126
2014-11-11 Francois-Xavier Coudert <[email protected]>
227

328
PR target/63610

0 commit comments

Comments
 (0)