On Wed, 2014-11-19 at 09:57 -0700, Jeff Law wrote:
> On 11/19/14 03:46, David Malcolm wrote:
> > This commit updates jit.exp so that if RUN_UNDER_VALGRIND is present
> > in the environment, all of the built client code using libgccjit.so is
> > run under valgrind, w
On Wed, 2014-11-19 at 09:59 -0700, Jeff Law wrote:
> On 11/19/14 03:46, David Malcolm wrote:
> > Fix this leak:
> >
> > 160 bytes in 5 blocks are definitely lost in loss record 154 of 228
> > at 0x4A0645D: malloc (in
> > /usr/lib64/valgrind/vgpreload_me
On Wed, 2014-11-19 at 22:36 +0100, Richard Biener wrote:
> On November 19, 2014 10:09:56 PM CET, Andrew MacLeod
> wrote:
> >On 11/19/2014 03:43 PM, Richard Biener wrote:
> >> On November 19, 2014 8:26:23 PM CET, Andrew MacLeod
> > wrote:
> >>> On 1
On Wed, 2014-11-19 at 17:24 -0500, David Malcolm wrote:
> On Wed, 2014-11-19 at 22:36 +0100, Richard Biener wrote:
> > On November 19, 2014 10:09:56 PM CET, Andrew MacLeod
> > wrote:
> > >On 11/19/2014 03:43 PM, Richard Biener wrote:
> > >> On November 19,
K for trunk?
>From 0901383f1a1ad296b939687298b8321446bc54e3 Mon Sep 17 00:00:00 2001
From: David Malcolm
Date: Thu, 20 Nov 2014 01:06:14 -0500
Subject: [PATCH] PR jit/63969: Fix segfault in error-handling when driver
isn't found
If the driver isn't found on the path, pex_one attempts
On Wed, 2014-11-19 at 23:09 -0800, Mike Stump wrote:
> On Nov 19, 2014, at 10:23 PM, David Malcolm
> wrote:
> > It's not clear to me if I can approve my own patches to the jit
>
> So, to answer that, we look at MAINTAINERS, and look up your name:
>
>
On Fri, 2014-11-21 at 21:13 +0100, Richard Biener wrote:
> On November 21, 2014 8:45:09 PM CET, Diego Novillo
> wrote:
> >On Fri, Nov 21, 2014 at 1:48 PM, Andrew MacLeod
> >wrote:
> >
> >> 1 - introduce a TYPE_REF tree node, which is effectively just a
> >'typed' tree
> >> node, and the TREE_TYPE
On Tue, 2014-11-25 at 10:15 -0700, Jeff Law wrote:
> On 11/25/14 10:14, Segher Boessenkool wrote:
> > On Tue, Nov 25, 2014 at 09:44:35AM -0700, Jeff Law wrote:
> >> On 11/24/14 20:37, Segher Boessenkool wrote:
> >>> `lcc' is not an insn but just a pattern. This caused a build error in
> >>> libgcc
Various fixes/improvements to jit.exp
Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu
(Fedora 20).
OK for trunk?
(am not yet officially blessed as the JIT maintainer, so I require
review for the non-obvious patches)
Various fixes/improvements to jit.exp
Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu
(Fedora 20).
OK for trunk?
(am not yet officially blessed as the JIT maintainer, so I require
review for the non-obvious patches)
DejaGnu's host_execute has an erroneous line that appears to be a
merge conflict that went awry followed up by a reindent, and jit.exp
has inherited this bug within "fixed_host_execute".
Fix it within jit.exp.
Reported to DejaGnu as:
http://lists.gnu.org/archive/html/dejagnu/2014-11/msg1.ht
This makes it easier to compare jit.sum files from different runs
gcc/testsuite/ChangeLog:
* jit.dg/jit.exp (jit-dg-test): Use $name rathen than $prog
when calling jit_check_compile to avoid embedding the full path of
the testcase into the test results.
---
gcc/testsuite/j
This commit updates jit.exp so that if RUN_UNDER_VALGRIND is present
in the environment, all of the built client code using libgccjit.so is
run under valgrind, with --leak-check=full.
Hence:
RUN_UNDER_VALGRIND= make check-jit
will run all jit testcases under valgrind (taking 27 mins on my
machin
Add command-line option-parsing to the testcases, so that we can
manipulate them without needing a recompile (e.g. varying
optimization levels etc).
This uses getopt_long, which is a GNU extension to libc. Is that
acceptable?
Implement a --num-iterations option, to override the default of 5.
Wh
gcc/testsuite/ChangeLog:
* jit.dg/jit.exp (verify_exit_status): New function.
(fixed_host_execute): Verify the exit status of the spawnee.
---
gcc/testsuite/jit.dg/jit.exp | 30 ++
1 file changed, 30 insertions(+)
diff --git a/gcc/testsuite/jit.dg/jit.e
Various fixes/improvements to jit.exp
Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu
(Fedora 20).
OK for trunk?
Running testsuite/jit.dg/test-functions.c under valgrind showed this
leak (amongst others):
400 bytes in 10 blocks are definitely lost in loss record 142 of 181
at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x5DCDF2F: xrealloc (xmalloc.c:177)
by 0x537
Running testsuite/jit.dg/test-functions.c under valgrind showed this
leak (amongst others):
520 (320 direct, 200 indirect) bytes in 5 blocks are definitely lost in loss
record 144 of 181
at 0x4A06965: operator new(unsigned long) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by
Valgrind of testsuite/jit.dg/test-types.c showed this leak in real.c
when converting the strings in init_ext_80387_constants to real.
160 bytes in 5 blocks are definitely lost in loss record 89 of 144
at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x30AF4
Running various JIT testcases under valgrid showed this one-time leak:
8,464 (336 direct, 8,128 indirect) bytes in 1 blocks are definitely lost in
loss record 144 of 147
at 0x4A081D4: calloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x5DF4EA0: xcalloc (xmalloc.c:162)
cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via
fprintf, leaking all of the duplicated buffers.
Is/was there a reason for doing this?
Taking them out fixes these leaks (seen when dumping is enabled):
12 bytes in 1 blocks are definitely lost in loss record 11 of 148
at 0x4A0645
Introduce a struct toyvm_compiled_function so that we can clean things
up fully, avoiding warnings from valgrind.
gcc/jit/ChangeLog:
PR jit/63854
(toyvm_compiled_function): New typedef.
(toyvm_compiled_func) Rename to...
(toyvm_compiled_code) ...this.
(struc
I suspect this is papering over a real problem, but I've been
applying this workaround locally to keep my valgrind output clean.
gcc/ChangeLog:
PR/64003
* final.c (shorten_branches): Allocate insn_lengths with
XCNEWVEC rather than XNEWVEC; remove subsequent per-element
Various functions in tree-pretty-print.c take a param
pretty_printer *buffer
and there's also a static pretty_printer *buffer;
Additionally, pretty_printer instances are not buffers; they
*contain* buffers (inasmuch as they have a field "buffer").
This patch renames such params from "buffer" to
Continue to refactor playback::context::compile, moving the DSO-generation
into its own function.
gcc/jit/ChangeLog:
* jit-playback.c (gcc::jit::playback::context::compile): Move DSO
creation code into...
(gcc::jit::playback::context::convert_to_dso): New function.
Various cleanups of the jit code
Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu
(Fedora 20).
OK for trunk?
(am not yet officially blessed as the JIT maintainer, so I require
review for the non-obvious patches)
a/gcc/jit/jit-result.c b/gcc/jit/jit-result.c
new file mode 100644
index 000..9e1e6d8
--- /dev/null
+++ b/gcc/jit/jit-result.c
@@ -0,0 +1,73 @@
+/* Internals of libgccjit: implementation of gcc_jit_result
+ Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Contributed by David Malcolm
The body of playback::context::compile is rather long, at 200 lines.
Start splitting it out parts of it into smaller member functions.
Also, eliminate a fixed-size buffer with bounds check in favor of an
auto_vec<>.
gcc/jit/ChangeLog:
* jit-playback.c (gcc::jit::playback::context::compil
gcc/jit/ChangeLog:
* docs/examples/tut02-square.c (main): Release the context
earlier, to show that this is possible. Update error-handling
to avoid a double-release of the context, and to avoid
releasing a NULL result.
* docs/intro/tutorial02.rst: Discuss g
Various improvements to jit documentation
Touches one of the tutorial examples, which is also used as part of the
testsuite: successfully bootstrapped & regrtested on
x86_64-unknown-linux-gnu (Fedora 20).
OK for trunk?
(am not yet officially blessed as the JIT maintainer, so I require
review for
gcc/jit/ChangeLog:
PR jit/64018
* docs/intro/tutorial02.rst: Spell out lifetime of generated code.
Add description of error-handling, taken in part from...
* docs/topics/contexts.rst (Error-handling): Expand, and move some
content to tutorial02.rst.
---
gcc/
Various fixes/improvements to builtins-handling within jit.
Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu
(Fedora 20).
OK for trunk?
(am not yet officially blessed as the JIT maintainer, so I require
review for the non-obvious patches)
jit-builtins.c only supports a subset of builtin-types.def, and
can fail if the user requests a builtin that uses the unsupported
types.
Whilst fixing PR jit/64020 I noticed that these failures read through
NULL and segfault.
Fix it by checking for get_type and make_builtin_function returning
NUL
Investigating PR jit/64020 showed that tree-ssa-math-opts.c was
failing to optimize sin/cos operations within the JIT since this:
fndecl = mathfn_built_in (type, BUILT_IN_CEXPI);
was returning NULL.
Several issues were present:
(A) In the JIT we don't pre-build all builtins, just the ones that
On Wed, 2014-11-26 at 09:13 +0100, Uros Bizjak wrote:
> Hello!
>
> > cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via
> > fprintf, leaking all of the duplicated buffers.
> >
> > Is/was there a reason for doing this?
>
> Yes, please see [1] and PR 53136 [2]. As said in [1]:
>
>
On Wed, 2014-11-19 at 12:58 -0700, Jeff Law wrote:
> On 11/19/14 03:46, David Malcolm wrote:
> > This fixes three leaks in IPA seen in jit testcases with valgrind:
> >
> > This one:
> > 96 bytes in 4 blocks are definitely lost in loss record 102 of 205
> > a
On Wed, 2014-11-26 at 10:41 -0700, Jeff Law wrote:
> On 11/25/14 18:39, David Malcolm wrote:
> > I suspect this is papering over a real problem, but I've been
> > applying this workaround locally to keep my valgrind output clean.
> >
> > gcc/ChangeLog:
&g
On Tue, 2014-12-02 at 08:49 +0100, Jakub Jelinek wrote:
Hi!
>
> Here is an attempt to adjust gimple_build_assign* documentation.
> Ok for trunk?
>
> Note, apparently the documentation has not been adjusted for
> the gimple -> gassign * etc. changes, David, can you please work on
> adjusting gimpl
On Mon, 2014-12-01 at 19:31 -0500, Ulrich Drepper wrote:
> I think the jit patches introduced a problem when you rebuild within a
> directory that contains an old build (i.e., no brand new build
> directory). The gcc/Makefile creates a symlink for xgcc with the full
> driver name without first re
On Wed, 2015-02-25 at 16:47 +0100, Arnaud Charlet wrote:
> > > I've added a -I gcc/gcc/ada/doc/gnat_ugn there, that's as far as my
> > > knowledge goes for this script so I hope this is enough.
> >
> > Well, since by default the find command deletes all files except those
> > known to be documenta
On Thu, 2015-02-05 at 21:47 -0500, David Malcolm wrote:
> This patch adds an -level section about libgccjit between the
> sections on languages and targets.
>
> It has various links to the documentation (now that that's on the
> website), and to a couple of 3rd party rep
On Thu, 2015-02-26 at 11:17 -0500, David Malcolm wrote:
> On Fri, 2015-02-20 at 10:29 -0700, Jeff Law wrote:
> > On 02/19/15 14:56, Chris Johns wrote:
> > > On 20/02/2015 8:23 am, Joel Sherrill wrote:
> > >>
> > >> On 2/19/2015 2:56 PM, Sandra Lo
On Fri, 2015-02-27 at 01:06 +0100, Gerald Pfeifer wrote:
> Hi David,
>
> On Thu, 5 Feb 2015, David Malcolm wrote:
> > This patch adds an -level section about libgccjit
> > between the sections on languages and targets.
>
> this is a very nice idea.
>
>
On Thu, 2015-03-05 at 07:37 +0100, Bert Wesarg wrote:
> Hi David,
>
> while reading the very good tutorial at
>
> https://gcc.gnu.org/onlinedocs/jit/intro/tutorial03.html
>
> I noticed that the calls to gcc_jit_block_end_with_conditional()
> misses the on_true and on_false parameters.
Good cat
On Wed, 2015-03-04 at 11:09 -0500, David Malcolm wrote:
> On Tue, 2015-03-03 at 11:49 +0100, Matthias Klose wrote:
> > Both gccjit and gnat now use sphinx to build the documentation. While not a
> > direct part of the build process, it would be nice to document the
> > requi
On Fri, 2015-03-13 at 17:53 +0100, Uros Bizjak wrote:
> Hello!
>
> As documented in [1] asprintf and vasprintf return:
>
> --quote--
> Return value:
>
> Both functions set *ret to be a pointer to a malloc()'d buffer
> sufficiently large to hold the formatted string. This pointer should
> be pass
I've been experimenting with revamping our diagnostics to better show
source locations. Some of the ideas are inspired by Clang's
diagnostics, but I'm going beyond what it does in some areas.
I'm attaching a patch (against r221423), which is very much a
work-in-progress, but in a "release early,
@@ COMPILER_FLAGS = $(ALL_CXXFLAGS)
DEPMODE = $(CXXDEPMODE)
-libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
+libcpp_a_OBJS = charset.o conflict-markers.o directives.o directives-only.o \
+ errors.
On Thu, 2015-03-12 at 14:20 +0100, Richard Biener wrote:
> After noticing tree-parloop.c passing crap to split_block (a tree
> rather than a gimple or an rtx) I noticed those CFG functions simply
> take void * pointers. The following patch fixes that and adds
> two overloads, one for GIMPLE use an
On Sun, 2015-04-05 at 14:32 +0200, Thomas Koenig wrote:
> Hello world,
>
> this is a first draft of a patch to inline matmul (PR 37171). This is
(FWIW, the above PR# looks like it should be PR 37131)
I've committed the following trivial patch to trunk (as r221959).
gcc/jit/ChangeLog:
PR jit/65691
* docs/cp/topics/expressions.rst (Simple expressions): Fix copy
and paste error in description of gccjit::context::one.
* docs/topics/expressions.rst (Simple expression
On Sun, 2015-06-07 at 16:06 -0400, Patrick Palka wrote:
> This patch refactors the entry point of -Wmisleading-indentation
Thanks for working on this. I was hoping to submit a patch to propose
putting -Wmisleading-indentation into -Wall, and have been testing the
warning on the linux kernel to tr
On Tue, 2015-06-09 at 18:19 +0200, Matthias Klose wrote:
> Install the gcc/jit header files without the x bit set. Ok for the trunk and
> the
> 5 branch?
OK.
onment tear-down
[==] 56 tests from 16 test cases ran. (338 ms total)
[ PASSED ] 56 tests.
Thoughts?
Dave
[1] though it's not clear to me if LLVM is actually still using it;
see e.g. http://blog.llvm.org/2009/12/lit-it.html
[2] the test of chain_next/chain_prev in test-ggc.c, which neede
gcc/unittests/ChangeLog:
* test-bitmap.c: New file.
---
gcc/unittests/test-bitmap.c | 117
1 file changed, 117 insertions(+)
create mode 100644 gcc/unittests/test-bitmap.c
diff --git a/gcc/unittests/test-bitmap.c b/gcc/unittests/test-bitmap.c
gcc/unittests/ChangeLog:
* Make-lang.in: New file.
* config-lang.in: New file.
---
gcc/unittests/Make-lang.in | 200 +++
gcc/unittests/config-lang.in | 34
2 files changed, 234 insertions(+)
create mode 100644 gcc/unittests/Make-
gcc/unittests/ChangeLog:
* test-cfg.c: New file.
---
gcc/unittests/test-cfg.c | 319 +++
1 file changed, 319 insertions(+)
create mode 100644 gcc/unittests/test-cfg.c
diff --git a/gcc/unittests/test-cfg.c b/gcc/unittests/test-cfg.c
new file mod
gcc/unittests/ChangeLog:
* test-locations.c: New file.
---
gcc/unittests/test-locations.c | 148 +
1 file changed, 148 insertions(+)
create mode 100644 gcc/unittests/test-locations.c
diff --git a/gcc/unittests/test-locations.c b/gcc/unittests/test-
gcc/unittests/ChangeLog:
* test-tree.c: New file.
---
gcc/unittests/test-tree.c | 102 ++
1 file changed, 102 insertions(+)
create mode 100644 gcc/unittests/test-tree.c
diff --git a/gcc/unittests/test-tree.c b/gcc/unittests/test-tree.c
new file
gcc/unittests/ChangeLog:
* test-hash-set.c: New file.
---
gcc/unittests/test-hash-set.c | 54 +++
1 file changed, 54 insertions(+)
create mode 100644 gcc/unittests/test-hash-set.c
diff --git a/gcc/unittests/test-hash-set.c b/gcc/unittests/test-hash
gcc/unittests/ChangeLog:
* test-rtl.c: New file.
---
gcc/unittests/test-rtl.c | 94
1 file changed, 94 insertions(+)
create mode 100644 gcc/unittests/test-rtl.c
diff --git a/gcc/unittests/test-rtl.c b/gcc/unittests/test-rtl.c
new file mode
gcc/unittests/ChangeLog:
* test-folding.c: New file.
---
gcc/unittests/test-folding.c | 121 +++
1 file changed, 121 insertions(+)
create mode 100644 gcc/unittests/test-folding.c
diff --git a/gcc/unittests/test-folding.c b/gcc/unittests/test-foldin
gcc/unittests/ChangeLog:
* test-functions.c: New file.
---
gcc/unittests/test-functions.c | 634 +
1 file changed, 634 insertions(+)
create mode 100644 gcc/unittests/test-functions.c
diff --git a/gcc/unittests/test-functions.c b/gcc/unittests/test-
gcc/unittests/ChangeLog:
* test-hash-map.c: New file.
---
gcc/unittests/test-hash-map.c | 78 +++
1 file changed, 78 insertions(+)
create mode 100644 gcc/unittests/test-hash-map.c
diff --git a/gcc/unittests/test-hash-map.c b/gcc/unittests/test-hash
gcc/unittests/ChangeLog:
* test-gimple.c: New file.
---
gcc/unittests/test-gimple.c | 179
1 file changed, 179 insertions(+)
create mode 100644 gcc/unittests/test-gimple.c
diff --git a/gcc/unittests/test-gimple.c b/gcc/unittests/test-gimple.c
test-functions.c: representation_test.building_cfg and others
need the call to location_adhoc_data_fini to happen later, otherwise
we get a segfault inside gimple_set_block here due to the
adhoc-location data being finalized:
#0 0x00687800 in ?? ()
#1 0x77504c22 in htab_find_sl
gcc/unittests/ChangeLog:
* unittests-main.c: New file.
---
gcc/unittests/unittests-main.c | 108 +
1 file changed, 108 insertions(+)
create mode 100644 gcc/unittests/unittests-main.c
diff --git a/gcc/unittests/unittests-main.c b/gcc/unittests/unitt
gcc/unittests/ChangeLog:
* test-vec.c: New file.
---
gcc/unittests/test-vec.c | 162 +++
1 file changed, 162 insertions(+)
create mode 100644 gcc/unittests/test-vec.c
diff --git a/gcc/unittests/test-vec.c b/gcc/unittests/test-vec.c
new file mod
gcc/unittests/ChangeLog:
* unittests-frontend.c: New file.
---
gcc/unittests/unittests-frontend.c | 250 +
1 file changed, 250 insertions(+)
create mode 100644 gcc/unittests/unittests-frontend.c
diff --git a/gcc/unittests/unittests-frontend.c
b/gcc/un
gcc/unittests/ChangeLog:
* test-ggc.c: New file.
---
gcc/unittests/test-ggc.c | 292 +++
1 file changed, 292 insertions(+)
create mode 100644 gcc/unittests/test-ggc.c
diff --git a/gcc/unittests/test-ggc.c b/gcc/unittests/test-ggc.c
new file mod
gcc/unittests/ChangeLog:
* test-wide-int.c: New file.
---
gcc/unittests/test-wide-int.c | 186 ++
1 file changed, 186 insertions(+)
create mode 100644 gcc/unittests/test-wide-int.c
diff --git a/gcc/unittests/test-wide-int.c b/gcc/unittests/test-wid
On Wed, 2015-06-10 at 17:34 +0200, Jakub Jelinek wrote:
> On Wed, Jun 10, 2015 at 11:24:41AM -0400, David Malcolm wrote:
> > I picked the Google Test framework:
> > http://code.google.com/p/googletest/
>
> I must say I'm not very excited about using this, it won
On Wed, 2015-06-10 at 17:34 +0200, Jakub Jelinek wrote:
> On Wed, Jun 10, 2015 at 11:24:41AM -0400, David Malcolm wrote:
(...snip...)
> Also, no matter what testsuite framework is used, including any
> headers before #include "config.h" line is a big no-no.
The issue was
gcc_jit_object_get_debug_string wasn't adding parentheses, leading to
misleading dumps for certain compound expressions.
This patch adds:
rvalue::get_debug_string_parens
rvalue::get_precedence
methods, mimicing C's precedence rules, using them in the get_debug_string
implementation so that we
This hunk was omitted from r224531.
Tested with "make check-jit"; takes jit.sum from 7699
to 7829 passes.
Committed to trunk as r224535.
gcc/testsuite/ChangeLog:
PR jit/66539
* jit.dg/all-non-failing-tests.h: Add test-debug-strings.c
to "testcases" array.
---
gcc/testsui
Add a testcase of assignment to structs and unions to the libgccjit
testsuite.
Tested with "make check-jit"; takes jit.sum from 7829 to 7974 passes.
Committed to trunk as r224536.
gcc/testsuite/ChangeLog:
* jit.dg/all-non-failing-tests.h: Add test-compound-assignment.c.
* jit.dg/
gcc_jit_rvalue_dereference_field has error-checking to ensure that the
field is of the correct struct, but it turned out that
gcc_jit_lvalue_access_field and gcc_jit_rvalue_access_field were missing
this check, and this just bit a user.
Add the missing validation, along with testcases.
Takes "mak
On Thu, 2015-06-11 at 00:18 +0200, Jakub Jelinek wrote:
> On Wed, Jun 10, 2015 at 01:16:20PM -0400, David Malcolm wrote:
> > On Wed, 2015-06-10 at 17:34 +0200, Jakub Jelinek wrote:
> > > On Wed, Jun 10, 2015 at 11:24:41AM -0400, David Malcolm wrote:
> > > > I pi
On Tue, 2015-06-09 at 13:31 -0400, Patrick Palka wrote:
> This patch improves the heuristics of the warning in a number of ways.
> The improvements are hopefully adequately documented in the code
> comments.
>
> The additions to the test case also highlight the improvements.
>
> I tested an earli
On Thu, 2015-06-18 at 11:41 -0400, Patrick Palka wrote:
> On Tue, Jun 9, 2015 at 1:31 PM, Patrick Palka wrote:
> > This patch refactors the entry point of -Wmisleading-indentation from:
> >
> > void
> > warn_for_misleading_indentation (location_t guard_loc,
> >
On Tue, 2015-06-23 at 13:17 -0600, Jeff Law wrote:
> On 06/10/2015 09:24 AM, David Malcolm wrote:
> > gcc/unittests/ChangeLog:
> > * test-cfg.c: New file.
> > ---
> > gcc/unittests/test-cfg.c | 319
> > +++
>
I found when implementing switch statements for the jit that it
was much easier to work with libiberty's splay-tree.h by first
wrapping it in a C++ wrapper to add typesafety.
This patch adds such a wrapper, implementing the methods I needed.
It's unused in this patch, but is used in the followup
Some interpreters/VMs support a switch statement (for example the JVM
has opcodes "lookupswitch" and "tableswitch"). GCC has a set of
optimizations for efficiently handling switch statements, so it makes
sense to directly expose switch statements in the libgccjit API.
This patch implements a swit
On Thu, 2015-06-25 at 21:47 +0200, Basile Starynkevitch wrote:
> On 06/25/2015 09:13 PM, David Malcolm wrote:
> > Some interpreters/VMs support a switch statement (for example the JVM
> > has opcodes "lookupswitch" and "tableswitch"). GCC has a set of
> &g
..dump goes here...)
; end of dump from pass_fre (../../src/gcc/tree-ssa-pre.c:4933)
identifying clearly where to look next.
Successfully bootstrapped®rtested on x86_64-unknown-linux-gnu
OK for trunk?
David Malcolm (4):
Add classname/filename/line metadata to struct pass_data
Autogenera
gcc/ChangeLog:
* tree-pass.h (struct pass_data): Add fields "classname",
"filename", "line_num".
(PASS_DATA_INIT): New macro.
---
gcc/tree-pass.h | 27 +++
1 file changed, 27 insertions(+)
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 4545556
This patch adds information to the top and bottom of dumpfiles giving
metadata on the pass that they're associated with e.g.:
; start of dump from pass_forwprop (../../src/gcc/tree-ssa-forwprop.c:2103)
(dump goes here)
; end of dump from pass_forwprop (../../src/gcc/tree-ssa-forwprop.c:2103)
My
gcc/ChangeLog:
* auto-profile.c (pass_data_ipa_auto_profile): Use
PASS_DATA_INIT macro and supply a value for "classname".
* ipa-chkp.c (pass_data_ipa_chkp_versioning): Likewise.
(pass_data_ipa_chkp_early_produce_thunks): Likewise.
(pass_data_ipa_chkp_produce
On Thu, 2015-06-25 at 13:16 -0600, Jeff Law wrote:
> On 06/25/2015 01:13 PM, David Malcolm wrote:
> >
> >* It extends the libgccjit API. It's not clear to me yet how to
> > manage extensions of the libgccjit API: should I use symbol maps
> > and vers
On Fri, 2015-06-26 at 13:57 -0400, David Malcolm wrote:
> On Thu, 2015-06-25 at 13:16 -0600, Jeff Law wrote:
> > On 06/25/2015 01:13 PM, David Malcolm wrote:
> > >
> > >* It extends the libgccjit API. It's not clear to me yet how to
> > > manage
I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
directories in trunk since gcc 5 and backported the following 4 changes
from trunk to the gcc-5-branch:
gcc-5-branch's r225123:
* trunk's r222863 (8120405bda9bf28b004e09b23e74eda57ae1, addition
of test-benchmark.c):
https:/
On Thu, 2015-06-25 at 13:18 -0600, Jeff Law wrote:
> On 06/25/2015 01:13 PM, David Malcolm wrote:
> > I found when implementing switch statements for the jit that it
> > was much easier to work with libiberty's splay-tree.h by first
> > wrapping it in a C++ wrapper to ad
On Mon, 2015-06-29 at 21:57 +0100, Dibyendu Majumdar wrote:
> On 29 June 2015 at 16:44, David Malcolm wrote:
> > I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> > directories in trunk since gcc 5 and backported the following 4 changes
> > from
On Mon, 2015-06-29 at 18:34 -0400, Ulrich Drepper wrote:
> On Mon, Jun 29, 2015 at 5:26 PM, David Malcolm wrote:
> > I'm looking at ways to manage libgccjit API/ABI as per this thread:
> > https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01982.html
> > by transitioning to u
On Tue, 2015-06-30 at 08:43 +0200, Basile Starynkevitch wrote:
> On Mon, Jun 29, 2015 at 11:44:31AM -0400, David Malcolm wrote:
> > I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> > directories in trunk since gcc 5 and backported the following 4 changes
&
gcc/jit/ChangeLog:
* docs/cp/topics/expressions.rst: Remove stray semicolon.
* docs/cp/topics/functions.rst: Remove stray backslash.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
Committed to trunk as r225203.
---
gcc/jit/docs/cp/topics/expressions.rst | 2 +-
gcc/jit
Tested with "make check-jit" and visual inspection; jit.sum continues
to have 8014 passes.
Committed to trunk as r225204.
gcc/jit/ChangeLog:
* jit-recording.c
(gcc::jit::recording::context::dump_reproducer_to_file):
Add pragma to generated reproducers to disable -Wunused-v
ty.rst
new file mode 100644
index 000..dff1d0b
--- /dev/null
+++ b/gcc/jit/docs/topics/compatibility.rst
@@ -0,0 +1,90 @@
+.. Copyright (C) 2015 Free Software Foundation, Inc.
+ Originally contributed by David Malcolm
+
+ This is free software: you can redistribute it and/or modify it
+ under
Normally libgccjit verifies that all blocks within a function are
reachable by some path from the entry block, issuing a hard error
if it encounters an unreachable block, which is useful for the common
case.
However, some bytecode interpreters can generate unreachable bytecodes,
so it's useful whe
This is a revised, combined version of the patches posted here:
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01858.html
("[PATCH 1/2] Add gcc/typed-splay-tree.h")
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01859.html
("[PATCH 2/2] jit: add switch statements")
with the fix to patch
2001 - 2100 of 5457 matches
Mail list logo