[jit] New test case: test-nested-loops.c

2014-09-09 Thread David Malcolm
Committed to branch dmalcolm/jit: gcc/testsuite/ChangeLog.jit: * jit.dg/test-nested-loops.c: New test case. * jit.dg/all-non-failing-tests.h: Add test-nested-loops.c. * jit.dg/test-combination.c (create_code): Likewise. (verify_code): Likewise. * jit.dg/test

[PATCH, committed] insn_extract takes an rtx_insn

2014-09-10 Thread David Malcolm
: gcc/ChangeLog === --- gcc/ChangeLog (revision 215131) +++ gcc/ChangeLog (revision 215132) @@ -1,3 +1,10 @@ +2014-09-10 David Malcolm + + * genextract.c (print_header): When writing out insn_extract to + insn-extract.c, strengthen the param "insn&q

[PATCH, committed] error_for_asm and warning_for_asm take const rtx_insn *

2014-09-10 Thread David Malcolm
insn *this_is_asm_operands; /* Number of operands of this insn, for an `asm' with operands. */ static unsigned int insn_noperands; Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 215132) +++ gcc/ChangeLog (revision 21

[jit] Merger from trunk into dmalcolm/jit

2014-09-10 Thread David Malcolm
I've merged svn trunk r215090 (2014-09-09) into the dmalcolm/jit git branch [1], bringing in all changes since r203980 (2013-10-23); i.e. about 10.5 months of changes from trunk. Various manual fixes were necessary to enable the code to compile, and for the test suite to run successfully. With the

[jit] Update the TODO

2014-09-10 Thread David Malcolm
index 0e663cd..029e29a 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,9 @@ 2014-09-10 David Malcolm + * TODO.rst (Test suite): Multithreaded test is done. + +2014-09-10 David Malcolm + * dummy-frontend.c: Fix up for the header file flattening on

Re: [PATCH] gcc parallel make check

2014-09-10 Thread David Malcolm
On Wed, 2014-09-10 at 11:19 -0700, Mike Stump wrote: > On Sep 9, 2014, at 8:14 AM, VandeVondele Joost > wrote: > > Attached is a further revision of the patch, now dealing with > check-c++. > > So when last I played in this area, I wanted a command line tool that > would bin-pack from the command

[PATCH] Introduce LABEL_REF_LABEL

2014-09-10 Thread David Malcolm
The following patch adds a macro: /* Get the label that a LABEL_REF references. */ #define LABEL_REF_LABEL(LABREF) XCEXP (LABREF, 0, LABEL_REF) and uses it in place of XEXP (foo, 0) for "foo" known to be a LABEL_REF, throughout the "gcc" directory, in the hope of (A) improving the clarity of

[jit] MAINTAINERS: Add myself as jit maintainer

2014-09-11 Thread David Malcolm
| 1 + gcc/jit/ChangeLog.jit | 5 + gcc/jit/TODO.rst | 2 -- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.jit b/ChangeLog.jit index 131f5a5..5d2db3f 100644 --- a/ChangeLog.jit +++ b/ChangeLog.jit @@ -1,3 +1,7 @@ +2014-09-11 David Malcolm

Re: [PATCH 2/2] add static typed insn_deleted_p

2014-09-11 Thread David Malcolm
On Thu, 2014-09-11 at 18:49 -0400, tsaund...@mozilla.com wrote: > From: Trevor Saunders > > Hi, > > This changes all callers of INSN_DELETED_P to use one of insn->deleted () > insn->set_deleted () or insn->set_undeleted () depending on what they're > doing (set_deleted / set_undeleted seem som

[PATCH, committed] params 2 and 3 of reg_set_between_p

2014-09-12 Thread David Malcolm
1) +++ gcc/ChangeLog (revision 215222) @@ -1,3 +1,13 @@ +2014-09-12 David Malcolm + + * config/alpha/alpha.c (alpha_ra_ever_killed): Replace NULL_RTX + with NULL when dealing with an insn. + * config/sh/sh.c (sh_reorg): Strengthen local "last_float_move" + from rtx to rtx_insn *. + * rtl.h (

[PATCH 1/4] deps_start_bb takes an insn

2014-09-12 Thread David Malcolm
gcc/ChangeLog: * sched-deps.c (deps_start_bb): Strengthen param "head" and local "insn" from rtx to rtx_insn *. * sched-int.h (deps_start_bb): Likewise for 2nd param. --- gcc/sched-deps.c | 4 ++-- gcc/sched-int.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) d

[PATCH 0/4] Use rtx_insn * for instruction attributes

2014-09-12 Thread David Malcolm
for all working configurations (currently 187 successfully-built configurations). OK for trunk? David Malcolm (4): deps_start_bb takes an insn The TARGET_CAN_FOLLOW_JUMP hook takes insns The various TARGET_ASM_..._MAX_SKIP hooks take an insn Instruction attributes take an rtx_insn * gcc/config/a

[PATCH 2/4] The TARGET_CAN_FOLLOW_JUMP hook takes insns

2014-09-12 Thread David Malcolm
gcc/ChangeLog: * config/arc/arc.c (arc_can_follow_jump): Strengthen both params from const_rtx to const rtx_insn *. Update union members from rtx to rtx_insn *. * doc/tm.texi (TARGET_CAN_FOLLOW_JUMP): Autogenerated change. * hooks.c (hook_bool_const_rtx_cons

[PATCH 3/4] The various TARGET_ASM_..._MAX_SKIP hooks take an insn

2014-09-12 Thread David Malcolm
gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_loop_align_max_skip): Strengthen param "label" from rtx to rtx_insn *. * config/rx/rx.c (rx_max_skip_for_label): Likewise for param "lab" and local "op". * doc/tm.texi (TARGET_ASM_JUMP_ALIGN_MAX_SKIP): Autogener

[PATCH 4/4] Instruction attributes take an rtx_insn *

2014-09-12 Thread David Malcolm
This patch strengthens the params of the all of the various generated get_attr_* functions from rtx to rtx_insn *, along with various other functions relating to instruction attributes and scheduling. As well as the changes to genattr.c, genattrtab.c and genautomata.c, the bulk of the patch makes

[jit] Add sphinx-based documentation for libgccjit

2014-09-17 Thread David Malcolm
.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,23 @@ +2014-09-17 David Malcolm + + * docs/Makefile: New file. + * docs/conf.py: New file. + * docs/examples/install-hello-world.c: New file. + * docs/examples/tut01-square.c: New file. + * docs/examples/tut02-sum-of-s

[jit] Build the example files from the documentation when running the testsuite

2014-09-18 Thread David Malcolm
gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,10 @@ +2014-09-18 David Malcolm + + * docs/examples/install-hello-world.c (main): Fix missing + "return". + * docs/examples/tut01-square.c (main): Likewise. + * docs/examples/tut02-sum-of-squares.c (

[jit] Markup fixes within documentation

2014-09-18 Thread David Malcolm
@@ 2014-09-18 David Malcolm + * docs/intro/install.rst: Markup fixes. + * docs/intro/tutorial01.rst: Likewise. + * docs/intro/tutorial02.rst: Likewise. + * docs/topics/contexts.rst: Likewise. + * docs/topics/expressions.rst: Likewise. + * docs/topics

[jit] Use the "pyramid" theme for generated HTML docs

2014-09-18 Thread David Malcolm
angeLog.jit b/gcc/jit/ChangeLog.jit index 11c9298..06734db 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,10 @@ 2014-09-18 David Malcolm + * docs/conf.py (Options for HTML output): Update html_theme from + "default" to "pyramid"

[jit] Add the generated texinfo to the source tree

2014-09-18 Thread David Malcolm
2 @@ 2014-09-18 David Malcolm + * docs/_build/texinfo/Makefile: New file, generated by Sphinx, by + running "make texinfo" in docs directory. + * docs/_build/texinfo/libgccjit.texi: Likewise. + * docs/_build/texinfo/sum-of-squares.png: Likewise. + +2014-09-18

[jit] Split docs out more formally into "Tutorial" vs "Topic Reference"

2014-09-18 Thread David Malcolm
Malcolm + * docs/index.rst: Split index out into two new files... + * docs/intro/index.rst: New file. + * docs/topics/index.rst: New file. + * docs/_build/texinfo/libgccjit.texi: Regenerate. + +2014-09-18 David Malcolm + * docs/_build/texinfo/Makefile: New file

[jit] Add a libgccjit.pc file for use by pkg-config

2014-09-18 Thread David Malcolm
Regenerate. + 2014-09-10 David Malcolm * cgraph.c (cgraph_c_finalize): Update to reflect the movement of diff --git a/gcc/Makefile.in b/gcc/Makefile.in index e86382f..f56fa96 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -585,6 +585,8 @@ bindir = @bindir@ libdir = @libdir@

[jit] Improvements to documentation

2014-09-22 Thread David Malcolm
ngeLog.jit b/gcc/jit/ChangeLog.jit index 8e546e6..14576f2 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,18 @@ +2014-09-22 David Malcolm + + * docs/_build/texinfo/libgccjit.texi: Regenerate. + * docs/intro/install.rst: Reduce width of listing. + * doc

Re: [patch] moving macro definitions to defaults.h

2014-09-22 Thread David Malcolm
On Mon, 2014-09-22 at 12:26 -0400, Andrew MacLeod wrote: > After being reminded of the tm.h issues brought up last november (here: > https://gcc.gnu.org/ml/gcc-patches/2013-11/msg01731.html ), I started > looking back into it. > > The general summary is the any header file which has a condition

[jit] Add notes on internals to documentation

2014-09-22 Thread David Malcolm
/jit/ChangeLog.jit index 14576f2..7bc0d20 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,12 @@ 2014-09-22 David Malcolm + * docs/index.rst: Add internals/index.rst. + * docs/internals/index.rst: New. + * notes.txt: Update to reflect renaming of

[jit] Fix segfault in ipa-pure-const.c during LTO

2014-09-23 Thread David Malcolm
Committed to branch dmalcolm/jit: In the initial commit on the JIT branch I moved gcc/ipa-pure-const.c: register_hooks to be a method of class pass_ipa_pure_const and the static local "init_p" within it to be member data of the class, to ensure that the pass can be rerun by separate invocations wi

[jit] Don't hardcode documentation version/release

2014-09-23 Thread David Malcolm
nsertions(+), 3 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index ca9a44d..2c6e5e3 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,16 @@ +2014-09-23 David Malcolm + + * docs/conf.py (__read_file): New helper function, for +

[jit] Fix toyvm.c to run within the testsuite

2014-09-23 Thread David Malcolm
+- 2 files changed, 115 insertions(+), 3 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 2c6e5e3..279050b 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,18 @@ 2014-09-23 David Malcolm + * docs/examples/tut03-toyvm/toyvm.c: Includ

[jit] Update TODO.rst

2014-09-23 Thread David Malcolm
t/ChangeLog.jit index 279050b..1f408b3 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,17 @@ 2014-09-23 David Malcolm + * TODO.rst: Rename "Initial Release" section to "API", and + remove completed items: builtins, docs, pkgconfig f

[jit] Add shift operators

2014-09-23 Thread David Malcolm
/jit/ChangeLog.jit @@ -1,5 +1,13 @@ 2014-09-23 David Malcolm + * TODO.rst (API): Shift operators are done. + * docs/topics/expressions.rst (Binary): Add shift operators. + * internal-api.c (binary_op_strings): Likewise. + (gcc::jit::playback::context::new_binary_op

[jit] Update the various "*_c_finalize" functions

2014-09-24 Thread David Malcolm
Joseph - thanks for looking through the jit diff. I plan to fix the issues you raise as a series of separate patches. Here's the first: On Tue, 2014-09-23 at 23:27 +, Joseph S. Myers wrote: > Various *_finalize functions are missing comments explaining their > semantics. Also the return t

[jit] Add copyright and license headers and footers

2014-09-24 Thread David Malcolm
+++ b/ChangeLog.jit @@ -1,3 +1,7 @@ +2014-09-24 David Malcolm + + * ChangeLog.jit: Add copyright footer. + 2014-09-11 David Malcolm * MAINTAINERS (Various Maintainers): Add myself as jit maintainer. @@ -6,3 +10,9 @@ * configure.ac: Add --enable-host-shared

[jit] Use standard initial includes

2014-09-24 Thread David Malcolm
51771..4ddd3cb 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,14 @@ 2014-09-24 David Malcolm + * dummy-frontend.c: Update copyright year. Follow standard for + initial includes by removing redundant include of "ansidecl.h". + * inter

[jit] Eliminate fixed-size buffers used with vsnprintf

2014-09-24 Thread David Malcolm
n error on the relevant context if a malloc failure occurs. --- gcc/jit/ChangeLog.jit | 15 +++ gcc/jit/internal-api.c | 50 ++ 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 4ddd3cb..3cadaab 100644

[jit] Add internal API documention and rename some variables

2014-09-24 Thread David Malcolm
- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,24 @@ 2014-09-24 David Malcolm + * dummy-frontend.c (my_walker): Rename to... + (my_ggc_walker): ...this. + (my_root_tab): Rename to... + (jit_root_tab): ...this. + (jit_langhook_init): Update f

[jit] Flesh out the "Overview of code structure" in the docs

2014-09-24 Thread David Malcolm
rnals/index.rst | 28 gcc/jit/internal-api.h | 11 +++ 3 files changed, 47 insertions(+) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 3b33e0d..b4700e4 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,13 @@ 2014-

[jit] Expose choose_tmpdir and use it when building tmpdir for jit compilation

2014-09-25 Thread David Malcolm
/jit/ChangeLog.jit index b4700e4..d66203a 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,10 @@ +2014-09-25 David Malcolm + + * internal-api.c (make_tempdir_path_template): New. + (gcc::jit::playback::context::compile): Call + make_tempdir_path_template to

[jit] Use pex_one rather than system when assembling/linking

2014-09-25 Thread David Malcolm
++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,11 @@ 2014-09-25 David Malcolm + * internal-api.c (gcc::jit::playback::context::compile): Use + pex_one rather than system when invoking "gcc" to go from a .s + file to a .so file. + +2014-09-25 David Malcolm + * inter

[jit] Avoiding hardcoding "gcc"; supporting accelerators?

2014-09-25 Thread David Malcolm
On Tue, 2014-09-23 at 23:27 +, Joseph S. Myers wrote: [...] > The code for compiling a .s file should: [...] > * use the $(target_noncanonical)-gcc-$(version) name for the driver rather > than plain "gcc", to maximise the chance that it is actually the same > compiler the JIT library was buil

[jit] Eliminate fixed-size buffer for a context's first error message

2014-09-26 Thread David Malcolm
On Wed, 2014-09-24 at 22:04 -0600, Jeff Law wrote: On 09/24/14 14:24, Joseph S. Myers wrote: > > On Wed, 24 Sep 2014, David Malcolm wrote: > > > >> The ideal I'm aiming for here is that a well-behaved library should > >> never abort, so I've rewritt

[jit] Add a test of using very long names

2014-09-26 Thread David Malcolm
Committed to branch dmalcolm/jit: gcc/testsuite/ChangeLog.jit: * jit.dg/test-long-names.c: New test case. * jit.dg/all-non-failing-tests.h: Add test-long-names.c * jit.dg/test-combination.c (create_code): Likewise. (verify_code): Likewise. * jit.dg/test-thre

Re: [jit] Add a test of using very long names

2014-09-26 Thread David Malcolm
On Fri, 2014-09-26 at 11:45 -0700, Mike Stump wrote: > On Sep 26, 2014, at 8:14 AM, David Malcolm > wrote: > > * jit.dg/test-long-names.c: New test case. > > > +/* 65KB */ > > +#define NAME_LENGTH (65 * 1024) > > 65K was a tiny name back in 1999, 16M was a

[jit] Experimental in-process embedding of the gcc driver into the jit

2014-09-26 Thread David Malcolm
On Tue, 2014-09-23 at 23:27 +, Joseph S. Myers wrote: [...] > The code for compiling a .s file should: [...] > * use libiberty's pexecute to run subprocesses, not "system" (building up > a string to pass to the shell always looks like a security hole, though in > this case it may in fact be s

[jit] Documentation tweaks

2014-09-29 Thread David Malcolm
Committed to branch dmalcolm/jit: gcc/jit/ChangeLog.jit: * TODO.rst: Update. * docs/topics/expressions.rst (gcc_jit_context_new_call): Add a note clarifying the behavior of this entrypoint. * docs/topics/functions.rst (Creating and using functions): Markup f

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-09-29 Thread David Malcolm
On Mon, 2014-09-29 at 20:24 +0100, Jiong Wang wrote: > On 29/09/14 19:32, Richard Henderson wrote: > > On 09/29/2014 11:12 AM, Jiong Wang wrote: > >> +inline rtx single_set_no_clobber_use (const rtx_insn *insn) > >> +{ > >> + if (!INSN_P (insn)) > >> +return NULL_RTX; > >> + > >> + if (GET_CO

[PATCH, committed] PR 63410: Fix missing plugin headers

2014-09-30 Thread David Malcolm
/ChangeLog (revision 215727) @@ -1,3 +1,9 @@ +2014-09-30 David Malcolm + + PR plugins/63410 + * Makefile.in (PRETTY_PRINT_H): Add wide-int-print.h. + (PLUGIN_HEADERS): Add pass-instances.def. + 2014-09-30 James Greenhalgh * config/aarch64/aarch64-simd-builtins.

Re: RFA: RTL typesafety improvements for ira.c

2014-10-01 Thread David Malcolm
On Wed, 2014-10-01 at 16:34 -0600, Jeff Law wrote: > This was inspired by a discussion with Felix who was making changes in > this area. > > Basically this promotes the "init_insns" field within struct equivalence > from an rtx to an rtx_insn_list. > > The only thing that's really interesting h

[jit] Implement documentation targets within jit/Make-lang.in

2014-10-02 Thread David Malcolm
On Tue, 2014-09-23 at 23:27 +, Joseph S. Myers wrote: [...] > Shouldn't the jit.pdf, jit.install-html etc. Make-lang.in hooks actually > build / install the documentation for this JIT? [...] I've committed the following to the branch dmalcolm/jit: This patch implements the documentation targ

[jit] Merger of trunk r215803 into jit branch

2014-10-02 Thread David Malcolm
I've merged the last ~3 weeks of changes of svn trunk to the git branch dmalcolm/jit, pushing it as dbfbacdbbf727e8ab3a8cff2d5650d8000de0449. Specifically, this is from trunk r215803 aka 68874c5d021dd6b8b740ffd23960e46e333270b5 (2014-10-02) bringing in all changes since r215090 aka65d8ffc23985

[PATCH] gcc.c: Split up the driver's "main" into smaller functions

2014-10-03 Thread David Malcolm
The "main" function for the driver in gcc.c has grown from ~200 lines in its original form (way back in r262) to ~1000 lines today, with a dozen locals (if we include the params). The following patch splits it up into 15 smaller functions, moving the various locals into the places where they're ne

[jit] Fix memory leak within diagnostic.c

2014-10-03 Thread David Malcolm
Committed to branch dmalcolm/jit: Running e.g. test-factorial.exe under valgrind shows that libgccjit.so was leaking ~13.5KB of RAM per invocation of the compiler here: ==57074== 21,440 bytes in 4 blocks are definitely lost in loss record 896 of 907 ==57074==at 0x4A0645D: malloc (in /usr/lib

[PATCH] Fix build on darwin (was Re: [PATCH] gcc.c: Split up the driver's "main" into smaller functions)

2014-10-03 Thread David Malcolm
On Fri, 2014-10-03 at 11:02 -0400, David Malcolm wrote: > The "main" function for the driver in gcc.c has grown from ~200 lines > in its original form (way back in r262) to ~1000 lines today, with a > dozen locals (if we include the params). > > The following patch spl

Re: [PATCH] Proof of concept: multiple gc heaps

2013-06-16 Thread David Malcolm
On Sat, 2013-06-15 at 12:09 -0700, Mike Stump wrote: > On Jun 14, 2013, at 8:21 PM, David Malcolm > wrote: [...snip discussion of approaches to GC and state...] > > I'm attaching a patch which converts all state within ggc into a > gc_heap > > class, so that you can

Re: [PATCH] Proof of concept: multiple gc heaps

2013-06-16 Thread David Malcolm
On Sun, 2013-06-16 at 11:18 +0200, Basile Starynkevitch wrote: > On Fri, Jun 14, 2013 at 11:21:06PM -0400, David Malcolm wrote: > > I'm hoping that gcc 4.9 can support multiple "parallel universes" of gcc > > state within one process, to ultimately support gcc

Re: [PATCH] ggc-page.c : remove erroneous ATTRIBUTE_UNUSED

2013-06-17 Thread David Malcolm
On Mon, 2013-06-17 at 11:18 +0200, Richard Biener wrote: > On Fri, Jun 14, 2013 at 11:17 PM, David Malcolm wrote: > > ggc_pch_write_object's parameter "d" is marked with ATTRIBUTE_UNUSED, > > but in fact it is used in 4 places at the end of the function. > &

[C++ PATCH] Implement new "force_static" attribute

2013-07-01 Thread David Malcolm
My plan for removal of global variables in gcc 4.9 [1] calls for several hundred new classes, which will be singletons in a classic monolithic build, but have multiple instances in a shared-library build. In order to avoid the register pressure of passing a redundant "this" pointer around for the

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-01 Thread David Malcolm
On Mon, 2013-07-01 at 11:36 -0400, David Malcolm wrote: Sorry, I forgot the ChangeLog entries: gcc/ 2013-07-01 David Malcolm * doc/extend.texi (Type Attributes): Document new "force_static" attribute. gcc/cp/ 2013-07-01 David Malcolm * cp-tree

Re: Remove global state from gcc/tracer.c

2013-07-01 Thread David Malcolm
e-removal work on trunk for 4.9, but if I have to do it on a branch, is this kind of "enabling" patch OK for trunk? FWIW I'm using this pass as my example of a pass with no GTY markings and with only "per-invocation" state (i.e. setup/cleaned up at the start/end of eac

[PATCH] Make all usage of "input_location" be explicit

2013-07-02 Thread David Malcolm
hed* build; upon manually rerunning them they pass (32-core parallel build, maybe some kind of race in the test harness?) OK for trunk? gcc/ 2013-07-02 David Malcolm * builtins.c (c_strlen): Remove use of EXPR_LOC_OR_HERE macro. * config/bfin/bfin.c (output_file_

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 06:37 -0500, Gabriel Dos Reis wrote: > On Tue, Jul 2, 2013 at 1:16 AM, Marc Glisse wrote: > > On Mon, 1 Jul 2013, Gabriel Dos Reis wrote: > > > >> On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm > >> wrote: > >>> > >>&

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 08:16 +0200, Marc Glisse wrote: > On Mon, 1 Jul 2013, Gabriel Dos Reis wrote: > > > On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm wrote: > >> My plan for removal of global variables in gcc 4.9 [1] calls for several > >> hundred new classes,

Re: [PATCH] Make all usage of "input_location" be explicit

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 10:33 -0600, Tom Tromey wrote: > >>>>> "David" == David Malcolm writes: > > David> gcc/java/ > David> 2013-07-02 David Malcolm > David>* class.c (maybe_layout_super_class): Update comment. > David>

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 13:54 -0700, Andrew Pinski wrote: > On Mon, Jul 1, 2013 at 8:36 AM, David Malcolm wrote: > > My plan for removal of global variables in gcc 4.9 [1] calls for several > > hundred new classes, which will be singletons in a classic monolithic > > bui

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 20:49 +, Joseph S. Myers wrote: > On Tue, 2 Jul 2013, David Malcolm wrote: > > > So I envisage a "--enable-shared" configuration switch to opt-in to the > > shared library code, but I want as minimize the difference between the > > two c

Re: List of dead links.

2013-07-10 Thread David Malcolm
On Wed, 2013-07-10 at 16:00 +0200, Ondřej Bílka wrote: > Dead link: http://fedora.linux.duke.edu/fc1_x86_64 FWIW, this link occurs in historical notes at the top of these files: zlib/contrib/inflate86/inffas86.c zlib/contrib/masmx64/inffas8664.c dated Dec-29-2003 describing specific testing d

[PATCH 3/4] Introduce NEXT_PASS_NUM macro

2013-07-17 Thread David Malcolm
gcc/ Explicitly number the instances of passes within passes.def. This is needed by a subsequent patch so that we can create fields within the pipeline class for each pass instance (to help locate pass instances when debugging). * passes.c (NEXT_PASS_NUM):

[PATCH 2/4] Move the construction of the pass hierarchy into a new passes.def file.

2013-07-17 Thread David Malcolm
gcc/ * passes.def: New. * passes.c (init_optimization_passes): Move the construction of the pass hierarchy into a new passes.def file. * Makefile.in (passes.o): Add dependency on passes.def. --- gcc/Makefile.in | 2 +- gcc/passes.c| 378 +

[PATCH 1/4] Introduce macros when constructing the tree of passes

2013-07-17 Thread David Malcolm
gcc/ * passes.c (init_optimization_passes): Introduce macros for constructing the tree of passes (INSERT_PASSES_AFTER, PUSH_INSERT_PASSES_WITHIN, POP_INSERT_PASSES, TERMINATE_PASS_LIST). --- gcc/passes.c | 108 +++-

[PATCH 4/4] Add contrib/check_passes.py script

2013-07-17 Thread David Malcolm
contrib/ * check_passes.py: New. --- contrib/check_passes.py | 58 + 1 file changed, 58 insertions(+) create mode 100644 contrib/check_passes.py diff --git a/contrib/check_passes.py b/contrib/check_passes.py new file mode 100755 index

[PATCH 0/4] Move pass-creation logic into a passes.def file

2013-07-17 Thread David Malcolm
OK to commit these to trunk? David Malcolm (4): Introduce macros when constructing the tree of passes Move the construction of the pass hierarchy into a new passes.def file. Introduce NEXT_PASS_NUM macro Add contrib/check_passes.py script contrib/check_passes.py | 58

[PATCH] Rename callback in ipa-pure-const.c

2013-07-17 Thread David Malcolm
e successfully bootstrapped and tested this on x86_64-unknown-linux-gnu: all testcases show the same results as an unpatched build (relative to r201011). OK to commit to trunk? commit 126c2275e2fa0aaee13d095be04ba4e3111f2cc9 Author: David Malcolm Date: Wed Jul 17 11:28:14 2013 -0400 Rename trou

Re: [PATCH] Rename callback in ipa-pure-const.c

2013-07-17 Thread David Malcolm
On Thu, 2013-07-18 at 03:34 +0200, Jakub Jelinek wrote: > On Wed, Jul 17, 2013 at 09:32:29PM -0400, David Malcolm wrote: > > * ipa-pure-const.c (generate_summary): Rename to... > > (pure_const_generate_summary): ... this. > > Ok, thanks. Thanks; comm

Re: [PATCH 3/4] Introduce NEXT_PASS_NUM macro

2013-07-18 Thread David Malcolm
On Thu, 2013-07-18 at 00:08 -0700, Andrew Pinski wrote: > On Wed, Jul 17, 2013 at 6:18 PM, David Malcolm wrote: > > gcc/ > > > > Explicitly number the instances of passes within passes.def. > > > > This is needed by a subsequent patch so that

[PATCH] Remove redundant decl of pass_ipa_lto_wpa_fixup

2013-07-18 Thread David Malcolm
n :) ] Thanks Dave >From da20870a2220873df67067fcae9a00bace75d376 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 17 Jul 2013 23:27:36 -0400 Subject: [PATCH] Remove redundant decl of pass_ipa_lto_wpa_fixup --- gcc/tree-pass.h | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/tree-pass.h b/gcc/tree-p

Re: [PATCH] Remove redundant decl of pass_ipa_lto_wpa_fixup

2013-07-18 Thread David Malcolm
On Thu, 2013-07-18 at 10:11 -0600, Jeff Law wrote: > On 07/18/2013 10:03 AM, David Malcolm wrote: > > pass_ipa_lto_wpa_fixup was removed in r158622: > > > > 2010-04-21 Jan Hubicka > > [...snip...] > > * passes.c (init_optimization_passes): Remove pa

Re: [PATCH 1/4] Introduce macros when constructing the tree of passes

2013-07-18 Thread David Malcolm
On Thu, 2013-07-18 at 10:18 -0600, Jeff Law wrote: > On 07/17/2013 07:18 PM, David Malcolm wrote: > > gcc/ > > * passes.c (init_optimization_passes): Introduce macros for > > constructing the tree of passes (INSERT_PASSES_AFTER, > > PUSH_INSERT_PASSE

Re: [PATCH 2/4] Move the construction of the pass hierarchy into a new passes.def file.

2013-07-18 Thread David Malcolm
On Thu, 2013-07-18 at 10:21 -0600, Jeff Law wrote: > On 07/17/2013 07:18 PM, David Malcolm wrote: > > gcc/ > > * passes.def: New. > > > > * passes.c (init_optimization_passes): Move the construction of > > the pass hierarchy into a new passes.de

Re: [PATCH 3/4] Introduce NEXT_PASS_NUM macro

2013-07-22 Thread David Malcolm
On Mon, 2013-07-22 at 20:25 +0200, Martin Jambor wrote: > Hi, > > On Wed, Jul 17, 2013 at 09:18:22PM -0400, David Malcolm wrote: > > gcc/ > > > > Explicitly number the instances of passes within passes.def. > > > > This is needed by a

Re: [PATCH 3/4] Introduce NEXT_PASS_NUM macro

2013-07-23 Thread David Malcolm
On Tue, 2013-07-23 at 16:46 +0200, Martin Jambor wrote: > Hi, > > On Mon, Jul 22, 2013 at 03:22:33PM -0400, David Malcolm wrote: > > On Mon, 2013-07-22 at 20:25 +0200, Martin Jambor wrote: > > > On Wed, Jul 17, 2013 at 09:18:22PM -0400, David Ma

[PATCH 1/2] Introduce context class

2013-07-24 Thread David Malcolm
gcc/ Introduce context class. * Makefile.in (CONTEXT_H): New. (OBJS): Add context.o. (toplev.o): Add CONTEXT_H to dependencies. (context.o): New. * toplev.c (general_init): Create the singleton gcc::context instance. * context.c: N

[PATCH 0/2] Introduce context and pipeline classes

2013-07-24 Thread David Malcolm
ng] Thanks Dave [1] http://gcc.gnu.org/wiki/cauldron2013?action=AttachFile&do=view&target=removing-global-state-from-gcc.txt (the class was named "universe" in my Cauldron talk, but I now prefer "gcc::context"). David Malcolm (2): Introduce context class

[PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-24 Thread David Malcolm
gcc/ * Makefile.in (PIPELINE_H): New. (lto-cgraph.o): Depend on CONTEXT_H and PIPELINE_H. (passes.o): Likewise. (statistics.o): Likewise. (cgraphunit.o): Likewise. (context.o): Depend on PIPELINE_H. * pipeline.h: New. * cgraphunit.c

Re: [PATCH 1/2] Introduce context class

2013-07-24 Thread David Malcolm
On Wed, 2013-07-24 at 18:55 -0400, Diego Novillo wrote: > On Wed, Jul 24, 2013 at 11:09 AM, David Malcolm wrote: > > gcc/ > > > > Introduce context class. > > > > * Makefile.in (CONTEXT_H): New. > > (OBJS): Add context.o. &

Re: [PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-24 Thread David Malcolm
On Wed, 2013-07-24 at 19:10 -0400, Diego Novillo wrote: > On Wed, Jul 24, 2013 at 6:56 PM, Diego Novillo wrote: > > Could you please add a description of what this does? > > Sorry. You did, but in a previous message that I had managed to miss. > Maybe include a reference to it in future posting

[PATCH] docs/install.texi: Add note about not relying on gawk extensions

2013-07-25 Thread David Malcolm
OK for trunk? ("make info" and "make dvi" seem to work, though I don't have a dvi viewer handy). commit fb34f52e9f9f1dcce416cb45dab23ec10625ad16 Author: David Malcolm Date: Thu Jul 25 12:07:26 2013 -0400 gcc/ * doc/install.texi (A POSIX or SVR4 awk): Add no

[PATCH] Fix missing deps for tree-sra.o

2013-07-25 Thread David Malcolm
Successfully bootstrapped on x86_64-unknown-linux-gnu OK for trunk? commit 4d7b6e5cf8e7f2613f516c9b9fe1f888b1193f8d Author: David Malcolm Date: Tue Jul 23 16:11:14 2013 -0400 Add missing deps to tree-sra.o gcc/ * Makefile.in (tree-sra.o): Add missing deps on TREE_PASS_H and

[PATCH 00/11] Rewrite of pass management

2013-07-26 Thread David Malcolm
the above logical groups of patches before committing). Thanks Dave David Malcolm (11): Introduce beginnings of a pipeline class. Generate pass-instances.def Handwritten part of conversion of passes to C++ classes Automated conversion of passes to C++ classes Add -fno-rtti when buildi

[PATCH 04/11] Automated conversion of passes to C++ classes

2013-07-26 Thread David Malcolm
This is the automated part of the conversion of passes from C structs to C++ classes. It is generated by the refactor_passes.py script in https://github.com/davidmalcolm/gcc-refactoring-scripts The script has its own test suite: test_refactor_passes.py, and you can get an idea of the behavior of

[PATCH 01/11] Introduce beginnings of a pipeline class.

2013-07-26 Thread David Malcolm
This patch introduces a gcc::pipeline class and moves various non-GTY globals relating to pass management into it. The gcc::context gains its first field: a pointer to the gcc::pipeline instance. It was previously sent as: http://gcc.gnu.org/ml/gcc-patches/2013-07/msg01090.html as part of: ht

[PATCH 05/11] Add -fno-rtti when building plugins.

2013-07-26 Thread David Malcolm
With the conversion of passes to C++ classes, plugins that add custom passes must create them by creating their own derived classes of the relevant subclass of opt_pass. gcc itself is built with -fno-rtti, hence there is no RTTI available for the opt_pass class hierarchy. Hence plugins that creat

[PATCH 03/11] Handwritten part of conversion of passes to C++ classes

2013-07-26 Thread David Malcolm
This patch is the hand-written part of the conversion of passes from C structs to C++ classes. It does not work without the subsequent autogenerated part, which is huge. Given that the autogenerated part of the conversion is very large (500k), for the sake of human comprehension I have kept the c

[PATCH 06/11] Rewrite how instances of passes are cloned

2013-07-26 Thread David Malcolm
gcc/ Rewrite how instances of passes are cloned to remove assumptions about their sizes (thus allowing pass subclasses to have additional data fields, albeit non-GC-managed ones at this point). * passes.c (make_pass_instance): Now that passes have clone met

[PATCH 07/11] Introduce virtual functions in testsuite/gcc.dg/plugin/one_time_plugin.c

2013-07-26 Thread David Malcolm
This is an example of converting the "gate" and "execute" functions of a pass into C++ virtual functions, so that in the next patch we can move a variable into member data of the opt_pass subclass. gcc/testsuite/ * gcc.dg/plugin/one_time_plugin.c: (one_pass_gate): convert to membe

[PATCH 08/11] Example of converting global state to per-pass state

2013-07-26 Thread David Malcolm
gcc/testsuite/ Example of converting global state to per-pass state. * gcc.dg/plugin/one_time_plugin.c (one_pass::execute): Convert global state "static int counter" to... (one_pass::counter): ...this instance data. --- gcc/testsuite/gcc.dg/plugin/one_time_plugin.

[PATCH 10/11] Make gcc::context be GC-managed

2013-07-26 Thread David Malcolm
This patch makes gcc::context instances be allocated within the GC-heap, and adds traversal hooks for GC/PCH so that a gcc::context can own refs to other GC-allocated objects. gcc/ * Makefile.in (GTFILES): Add context.h. * context.c (gcc::context::operator new): New. (gcc::

[PATCH 09/11] Support "gcc" namespace in gengtype

2013-07-26 Thread David Malcolm
This patch adds enough special-casing to gengtype to allow it to cope with types that are within the gcc namespace. gcc/ * gengtype.c (type_for_name): Add special-case support for locating types within the "gcc::" namespace. (open_base_files): Emit a "using namespace gcc"

[PATCH 11/11] Make opt_pass and gcc::pipeline be GC-managed

2013-07-26 Thread David Malcolm
This patch makes gcc::pipeline and opt_pass instances be allocated within the GC-heap, and adds traversal hooks for GC/PCH, so that passes can own refs to other GC-allocated objects. gcc/ Make opt_pass and gcc::pipeline be GC-managed, so that pass instances can own GC refs.

[PATCH 02/11] Generate pass-instances.def

2013-07-26 Thread David Malcolm
Introduce a new gen-pass-instances.awk script, and use it at build time to make a pass-instances.def from passes.def. An example of the result can be seen at: http://dmalcolm.fedorapeople.org/gcc/2013-07-25/pass-instances.def The generated pass-instances.def contains similar content to passes.

[PATCH 02/11] Generate pass-instances.def

2013-07-26 Thread David Malcolm
Introduce a new gen-pass-instances.awk script, and use it at build time to make a pass-instances.def from passes.def. An example of the result can be seen at: http://dmalcolm.fedorapeople.org/gcc/2013-07-25/pass-instances.def The generated pass-instances.def contains similar content to passes.

Re: [PATCH 00/11] Rewrite of pass management

2013-07-29 Thread David Malcolm
On Mon, 2013-07-29 at 11:19 +0100, Richard Earnshaw wrote: > On 26/07/13 16:04, David Malcolm wrote: > > The following patch series eliminates the mutable global variables > > representing GCC's passes, allowing for multiple compilation contexts in > > one process,

<    31   32   33   34   35   36   37   38   39   40   >