aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/plugins.texi
AgeCommit message (Collapse)AuthorFilesLines
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-06-03plugins.texi (enum plugin_event): New event.Andres Tiraboschi1-0/+2
* doc/plugins.texi (enum plugin_event): New event. * plugin.c (register_callback): Handle PLUGIN_START_PARSE_FUNCTION and PLUGIN_FINISH_FUNCTION. * plugin.def (PLUGIN_START_PARSE_FUNCTION): Add plugin event (PLUGIN_FINISH_PARSE_FUNCTION): Likewise. cp/ * decl.c (start_function): Call plugin before parsing. (finish_function): Call plugin after parsing. c/ * c-decl.c (start_function): Call plugin before parsing. (finish_function): Call plugin after parsing. testsuite/ * g++.dg/plugin/plugin.exp: Add def-plugin-test.C. * g++.dg/plugin/def_plugin.c: New file. * g++.dg/plugin/def-plugin-test.C: New file. From-SVN: r224078
2015-04-13* doc/plugins.texi: Rewrite first introductory paragraph.Gerald Pfeifer1-3/+3
From-SVN: r222065
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-12-10remove gengtype support for param_is use_param, if_marked and splay tree ↵Trevor Saunders1-14/+13
allocators gcc/ * plugin.c, plugin.def, ggc.h, ggc-common.c, gengtype.h, gengtype.c, gengtype-state.c, gengtype-parse.c, gentype-lex.l, gcc-plugin.h, doc/plugins.texi, doc/gty.texi: Remove support for if_marked and param_is. include/ * hashtab.h, splay-tree.h: Remove GTY markers. From-SVN: r218558
2014-03-18plugin.def: Improve comment for PLUGIN_INCLUDE_FILE.Basile Starynkevitch1-11/+38
2014-03-18 Basile Starynkevitch <basile@starynkevitch.net> * plugin.def: Improve comment for PLUGIN_INCLUDE_FILE. * doc/plugins.texi (Plugin callbacks): Mention PLUGIN_INCLUDE_FILE. Italicize plugin event names in description. Explain that PLUGIN_PRAGMAS has no sense for lto1. Explain PLUGIN_INCLUDE_FILE. Remind that no GCC functions should be called after PLUGIN_FINISH. Explain what pragmas with expansion are. From-SVN: r208660
2014-01-14plugin.texi (Building GCC plugins): Update to C++.Joey Ye1-10/+10
2014-01-14 Joey Ye <joey.ye@arm.com> * doc/plugin.texi (Building GCC plugins): Update to C++. From-SVN: r206597
2014-01-02Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r206289
2013-01-10Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r195098
2013-01-04Update Copyright years for files modified in 2011 and/or 2012.Jakub Jelinek1-1/+1
From-SVN: r194903
2012-09-24lto.texi: Separate sections.Jia Liu1-0/+33
2012-09-24 Jia Liu <proljc@gmail.com> * doc/lto.texi: Separate sections. * doc/plugins.texi: Likewise. From-SVN: r191659
2012-05-29LANGUAGES: Fix typos.Joseph Myers1-1/+1
* LANGUAGES: Fix typos. * Makefile.in: Fix typos. * alias.c: Fix typos. * auto-inc-dec.c: Fix typos. * bb-reorder.c: Fix typos. * cfgcleanup.c: Fix typos. * cgraph.c: Fix typos. * cgraph.h: Fix typos. * cgraphunit.c: Fix typos. * collect2-aix.h: Fix typos. * collect2.c: Fix typos. * compare-elim.c: Fix typos. * config/alpha/vms.h: Fix typos. * config/arm/README-interworking: Fix typos. * config/arm/arm.c: Fix typos. * config/arm/iterators.md: Fix typos. * config/arm/vxworks.h: Fix typos. * config/avr/avr.c: Fix typos. * config/avr/avr.h: Fix typos. * config/avr/avr.md: Fix typos. * config/avr/builtins.def: Fix typos. * config/c6x/c6x.c: Fix typos. * config/cr16/cr16.c: Fix typos. * config/cr16/cr16.md: Fix typos. * config/cris/cris.md: Fix typos. * config/darwin.c: Fix typos. * config/darwin.opt: Fix typos. * config/i386/i386-c.c: Fix typos. * config/i386/i386.c: Fix typos. * config/ia64/ia64.c: Fix typos. * config/m68k/cf.md: Fix typos. * config/mep/mep.c: Fix typos. * config/microblaze/microblaze.c: Fix typos. * config/microblaze/microblaze.h: Fix typos. * config/mn10300/mn10300.c: Fix typos. * config/mn10300/mn10300.md: Fix typos. * config/pa/pa.c: Fix typos. * config/picochip/picochip.h: Fix typos. * config/rs6000/a2.md: Fix typos. * config/rs6000/rs6000.c: Fix typos. * config/rs6000/vector.md: Fix typos. * config/rx/rx.md: Fix typos. * config/rx/rx.opt: Fix typos. * config/s390/2097.md: Fix typos. * config/s390/s390.c: Fix typos. * config/s390/s390.h: Fix typos. * config/sh/sh.c: Fix typos. * config/sh/sh.md: Fix typos. * config/sparc/sync.md: Fix typos. * config/spu/spu.c: Fix typos. * config/spu/spu.md: Fix typos. * config/vms/vms.c: Fix typos. * config/vxworks-dummy.h: Fix typos. * config/vxworks.h: Fix typos. * cselib.c: Fix typos. * df-scan.c: Fix typos. * df.h: Fix typos. * doc/extend.texi: Fix typos. * doc/install.texi: Fix typos. * doc/invoke.texi: Fix typos. * doc/md.texi: Fix typos. * doc/plugins.texi: Fix typos. * doc/rtl.texi: Fix typos. * dse.c: Fix typos. * dwarf2asm.c: Fix typos. * dwarf2out.c: Fix typos. * except.h: Fix typos. * expr.c: Fix typos. * fold-const.c: Fix typos. * gcc.c: Fix typos. * gcse.c: Fix typos. * genautomata.c: Fix typos. * gengtype-state.c: Fix typos. * gengtype.c: Fix typos. * genhooks.c: Fix typos. * gimple-fold.c: Fix typos. * gimple-pretty-print.c: Fix typos. * gimple.c: Fix typos. * gimple.h: Fix typos. * gimplify.c: Fix typos. * graphite-interchange.c: Fix typos. * graphite-sese-to-poly.c: Fix typos. * ifcvt.c: Fix typos. * input.c: Fix typos. * ipa-cp.c: Fix typos. * ipa-inline-analysis.c: Fix typos. * ipa-inline-transform.c: Fix typos. * ipa-inline.c: Fix typos. * ipa-pure-const.c: Fix typos. * ipa-ref.h: Fix typos. * ipa-reference.c: Fix typos. * ipa-utils.c: Fix typos. * ipa.c: Fix typos. * ira-emit.c: Fix typos. * ira-lives.c: Fix typos. * lto-streamer.c: Fix typos. * lto-streamer.h: Fix typos. * lto-wrapper.c: Fix typos. * mcf.c: Fix typos. * mode-switching.c: Fix typos. * modulo-sched.c: Fix typos. * plugin.c: Fix typos. * postreload.c: Fix typos. * sched-deps.c: Fix typos. * sel-sched-ir.c: Fix typos. * sel-sched-ir.h: Fix typos. * sel-sched.c: Fix typos. * sese.c: Fix typos. * stor-layout.c: Fix typos. * target-hooks-macros.h: Fix typos. * target.def: Fix typos. * trans-mem.c: Fix typos. * tree-eh.c: Fix typos. * tree-predcom.c: Fix typos. * tree-sra.c: Fix typos. * tree-ssa-address.c: Fix typos. * tree-ssa-loop-ivopts.c: Fix typos. * tree-ssa-loop-niter.c: Fix typos. * tree-ssa-math-opts.c: Fix typos. * tree-ssa-pre.c: Fix typos. * tree-ssa-propagate.c: Fix typos. * tree-ssa-reassoc.c: Fix typos. * tree-ssa-sccvn.c: Fix typos. * tree-ssa-ter.c: Fix typos. * tree-ssa-uninit.c: Fix typos. * tree-ssanames.c: Fix typos. * tree-vect-generic.c: Fix typos. * tree-vect-slp.c: Fix typos. * tree.c: Fix typos. * tree.h: Fix typos. * varasm.c: Fix typos. * varpool.c: Fix typos. From-SVN: r187959
2011-08-11plugin.def: Add event for finish_decl.Romain Geissler1-0/+1
2011-08-11 Romain Geissler <romain.geissler@gmail.com> Brian Hackett <bhackett1024@gmail.com> gcc/ChangeLog: * plugin.def: Add event for finish_decl. * plugin.c (register_callback, invoke_plugin_callbacks): Same. * c-decl.c (finish_decl): Invoke callbacks on above event. * doc/plugins.texi: Document above event. gcc/cp/ChangeLog: * decl.c (cp_finish_decl): Invoke callbacks on finish_decl event. gcc/testsuite/ChangeLog: * g++.dg/plugin/decl_plugin.c: New. * g++.dg/plugin/decl-plugin-test.C: New. * g++.dg/plugin/plugin.exp: Add above testcase. Co-Authored-By: Brian Hackett <bhackett1024@gmail.com> From-SVN: r177674
2011-07-15plugins.texi (Building GCC plugins): gengtype needs its gtype.state.Basile Starynkevitch1-3/+3
2011-07-15 Basile Starynkevitch <basile@starynkevitch.net> * doc/plugins.texi (Building GCC plugins): gengtype needs its gtype.state. From-SVN: r176329
2011-07-06configure.ac (plugin-version.h): Generate GCCPLUGIN_VERSION_MAJOR...Basile Starynkevitch1-0/+11
2011-07-06 Basile Starynkevitch <basile@starynkevitch.net> * configure.ac (plugin-version.h): Generate GCCPLUGIN_VERSION_MAJOR, GCCPLUGIN_VERSION_MINOR, GCCPLUGIN_VERSION_PATCHLEVEL, GCCPLUGIN_VERSION constant integer macros. * configure: Regenerate. * doc/plugins.texi (Building GCC plugins): Mention GCCPLUGIN_VERSION ... constant macros in plugin-version.h. From-SVN: r175923
2011-05-04Remove extra spacing at the end of the line.Mike Stump1-7/+7
From-SVN: r173401
2011-03-21ChangeLog gcc/Kai Tietz1-1/+1
2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * doc/plugins.texi: Adjust documentation for plugin register_callback. * tree.h (attribute_spec): Add new member affects_type_identity. - Zitierten Text anzeigen - * attribs.c (empty_attribute_table): Adjust attribute_spec initializers. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin.h: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/cygming.h: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/sh/sh.c: Likewise. * config/sol2.h: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850.c: Likewise. ChangeLog gcc/cp 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * tree.c (cxx_attribute_table): Adjust table. ChangeLog gcc/testsuite 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * g++.dg/plugin/attribute_plugin.c: Adjust test. ChangeLog gcc/java 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lang.c (java_attribute_table): Adjust table. ChangeLog gcc/lto 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lto-lang.c (lto_attribute_table): Adjust table. ChangeLog gcc/ada 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * gcc-interface/utils.c (gnat_internal_attribute_table): Add new element. ChangeLog gcc/c-family 2011-03-17 Kai Tietz PR target/12171 * c-common.c (c_common_attribute_table): Add new element. (c_common_format_attribute_table): Likewise. From-SVN: r171209
2010-12-20doc: @var fixes.Ralf Wildenhues1-6/+6
gcc/: * doc/cppopts.texi: Use @var when appropriate. * doc/extend.texi (Structure-Packing Pragmas): Likewise. * doc/gimple.texi (Logical Operators) (Adding a new GIMPLE statement code): Likewise. * doc/invoke.texi (Target Options, Precompiled Headers): Likewise. * doc/plugins.texi (Plugins): Likewise. From-SVN: r168081
2010-06-09re PR testsuite/42843 (--enable-build-with-cxx plugin tests fail)Joern Rennecke1-2/+4
gcc: PR testsuite/42843 * gcc-plugin.h (int plugin_is_GPL_compatible): Declare as extern "C". * doc/plugins.texi (Plugin license check): Update information on type of plugin_is_GPL_compatible. * Makefile.in (PLUGINCC): Define as $(COMPILER). (PLUGINCFLAGS): Define as $(COMPILER_FLAGS). gcc/testsuite: PR testsuite/42843 * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Use enumerator TV_NONE to initialize tv_id field. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise. * gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Likewise. Include toplev.h . * gcc.dg/plugin/finish_unit_plugin.c: Include cgraph.h. * g++.dg/plugin/attribute_plugin.c: Include toplev.h and plugin.h . * g++.dg/plugin/pragma_plugin.c: Include toplev.h . From-SVN: r160461
2010-04-12gcc.c (cc1_options): Handle -iplugindir before processing the cc1 spec.Matthias Klose1-0/+8
gcc/ 2010-04-13 Matthias Klose <doko@ubuntu.com> * gcc.c (cc1_options): Handle -iplugindir before processing the cc1 spec. Only add -iplugindir once. (cpp_unique_options): Add -iplugindir option if -fplugin* options found. * common.opt (iplugindir): Remove `Separate' property, initialize. * plugin.c (default_plugin_dir_name): Error with missing -iplugindir option. * Makefile.in (check-%, check-parallel-%): Create plugin dir. (distclean): Remove plugin dir. 2010-04-13 Basile Starynkevitch <basile@starynkevitch.net> * doc/plugins.texi (Loading Plugins): Document short -fplugin=foo option. (Plugin API): Mention default_plugin_dir_name function. * gcc.c (find_file_spec_function): Add new declaration. (static_spec_func): Use it for "find-file". (find_file_spec_function): Add new function. (cc1_options): Add -iplugindir option if -fplugin* options found. * gcc-plugin.h (default_plugin_dir_name): Added new declaration. * plugin.c (add_new_plugin): Updated comment, and handle short plugin name. (default_plugin_dir_name): Added new function. * common.opt (iplugindir): New option to set the plugin directory. gcc/testsuite/ 2010-04-13 Matthias Klose <doko@ubuntu.com> * gcc.dg/plugindir1.c: New testcase. * gcc.dg/plugindir2.c: New testcase. * gcc.dg/plugindir3.c: New testcase. * gcc.dg/plugindir4.c: New testcase. From-SVN: r158247
2010-04-02Make-lang.in, [...]: Update copyright years.Steven Bosscher1-1/+1
* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h, collect2.h, config/alpha/alpha.c, config/alpha/alpha.md, config/alpha/predicates.md, config/arm/arm.md, config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c, config/darwin9.h, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h, config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c, config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c, config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c, config/mips/mips.md, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md, config/rs6000/aix.h, config/rs6000/dfp.md, config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c, config/rs6000/vector.md, config/rtems.h, config/rx/rx.md, config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md, config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c, config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in, c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c, diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi, doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi, doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c, fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h, gensupport.c, gimple.h, gimple-iterator.c, graphite.c, graphite-clast-to-gimple.c, graphite-clast-to-gimple.h, graphite-dependences.c, graphite-poly.c, graphite-poly.h, graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c, intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h, ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c, ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c, loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c, objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk, opt-functions.awk, opth-gen.awk, params.def, passes.c, postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h, rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h, store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h, tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c, tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c, unwind-dw2-fde-darwin.c, varpool.c: Update copyright years. From-SVN: r157950
2010-02-28Fix typos in documentation.Ralf Wildenhues1-6/+6
gcc/: * doc/invoke.texi (Warning Options, RX Options): Fix typos. (Warning Options): -Wno-conversion-null is valid for Objective-C++ as well. * doc/tm.texi (Named Address Spaces): Likewise. * doc/plugins.texi (Plugins): Replace TABs with spaces. * doc/tree-ssa.texi (Tree SSA): Likewise. From-SVN: r157121
2009-12-22plugins.texi: Rename pre-genericize event.Brian Hackett1-1/+1
2009-12-22 Brian Hackett <bhackett1024@gmail.com> * doc/plugins.texi: Rename pre-genericize event. 2009-12-22 Brian Hackett <bhackett1024@gmail.com> * g++.dg/plugin/attribute_plugin.c: Rename pre-genericize event. * g++.dg/plugin/dumb_plugin.c: Same. From-SVN: r155401
2009-12-16invoke.texi, [...]: Fix typos.Kazu Hirata1-1/+1
* doc/invoke.texi, doc/options.texi, doc/plugins.texi, doc/tm.texi: Fix typos. From-SVN: r155281
2009-12-15Replace tabs with spaces in .texi files.Ralf Wildenhues1-1/+1
gcc/: * doc/extend.texi (Function Attributes, Extended Asm): Replace TABs with spaces. * doc/md.texi (Standard Names): Likewise. * doc/plugins.texi (Plugins): Likewise. From-SVN: r155264
2009-12-01cgraphunit.c (plugin.h): Include.Grigori Fursin1-2/+61
2009-12-01 Grigori Fursin <grigori.fursin@inria.fr> Joern Rennecke <amylaar@spamcop.net> * cgraphunit.c (plugin.h): Include. (ipa_passes): Invoke PLUGIN_ALL_IPA_PASSES_START / PLUGIN_ALL_IPA_PASSES_END at start / end of processing. * gcc-plugin.h (highlev-plugin-common.h, hashtab.h): Include. (enum plugin_event): Define by including plugin.def. Last enumerator is now called PLUGIN_EVENT_FIRST_DYNAMIC. (plugin_event_name): Change type to const char **. (get_event_last, get_named_event_id, unregister_callback): Declare. (register_callback): Change type of event argument to int. (highlev-plugin-common.h): New file. * Makefile.in (GCC_PLUGIN_H): Add highlev-plugin-common.h and $(HASHTAB_H) (tree-optimize.o passes.o): Depend on $(PLUGIN_H). (PLUGIN_HEADERS): Add opts.h, $(PARAMS_H) and plugin.def. (s-header-vars): New rule. (install-plugin): Depend on s-header-vars. Install b-header-vars. * params.c (get_num_compiler_params): New function. * params.h (get_num_compiler_params): Declare. * passes.c (plugin.h): Include. (make_pass_instance): Invoke PLUGIN_NEW_PASS. (do_per_function_toporder, pass_init_dump_file): No longer static. (pass_fini_dump_file): Likewise. (execute_one_pass): Likewise. Invoke PLUGIN_OVERRIDE_GATE and PLUGIN_PASS_EXECUTION. (execute_ipa_pass_list): Invoke PLUGIN_EARLY_GIMPLE_PASSES_START and PLUGIN_EARLY_GIMPLE_PASSES_END. * plugin.c (plugin_event_name_init): New array, defined by including plugin.def. (FMT_FOR_PLUGIN_EVENT): Update. (plugin_event_name): Change type to const char ** and initialize to plugin_event_name_init. (event_tab, event_last, event_horizon): New variable. (get_event_last): New function. (plugin_callbacks_init): New array. (plugin_callbacks: Change type to struct callback_info **. Initialize to plugin_callbacks_init. (htab_event_eq, get_named_event_id, unregister_callback): New function. (invoke_plugin_va_callbacks): Likewise. (register_callback): Change type of event argument to int. Handle new events. Allow dynamic events. (invoke_plugin_callbacks): Likewise. Return success status. (plugins_active_p): Allow dynamic callbacks. * plugin.def: New file. * plugin.h (invoke_plugin_callbacks): Update prototype. (invoke_plugin_va_callbacks): Declare. * tree-optimize.c (plugin.h): Include. (tree_rest_of_compilation): Invoke PLUGIN_ALL_PASSES_START and PLUGIN_ALL_PASSES_END. * tree-pass.h (execute_one_pass, pass_init_dump_file): Declare. (pass_fini_dump_file, do_per_function_toporder): Likewise. * doc/plugin.texi: Document new event types. Co-Authored-By: Joern Rennecke <amylaar@spamcop.net> From-SVN: r154877
2009-11-19[multiple changes]Rafael Espindola1-0/+19
2009-11-19 Rafael Avila de Espindola <espindola@google.com> * g++.dg/plugin/selfassign.c: Include plugin-version.h. (plugin_init): Pass correct version to plugin_default_version_check. * gcc.dg/plugin/ggcplug.c: Include plugin-version.h. (plugin_init): Pass correct version to plugin_default_version_check. * gcc.dg/plugin/selfassign.c: Include plugin-version.h. (plugin_init): Pass correct version to plugin_default_version_check. 2009-11-19 Basile Starynkevitch <basile@starynkevitch.net> Rafael Avila de Espindola <espindola@google.com> * doc/plugins.texi (Plugin initialization): Added advices for retrieving the version of GCC at plugin compilation and loading times. From-SVN: r154342
2009-11-11plugins.texi (Registering custom attributes): section renamed as ↵Basile Starynkevitch1-2/+25
(Registering custom attributes or pragmas). 2009-11-11 Basile Starynkevitch <basile@starynkevitch.net> * gcc/doc/plugins.texi (Registering custom attributes): section renamed as (Registering custom attributes or pragmas). Mentions custom attributes & pragmas, and c_register_pragma, with a small example. * gcc/doc/cpp.texi (Pragmas): Mentions that plugins can provide their pragmas. * gcc/doc/extend.texi (Function Attributes): Mentions that plugin can provide their attributes. From-SVN: r154097
2009-11-06plugins.texi (Plugin callbacks): added PLUGIN_PRAGMAS.Basile Starynkevitch1-0/+6
2009-11-06 Basile Starynkevitch <basile@starynkevitch.net> * doc/plugins.texi (Plugin callbacks): added PLUGIN_PRAGMAS. * c-pragma.c: Include "plugin.h". (init_pragma): Invoke PLUGIN_PRAGMAS. * gcc-plugin.h: Added PLUGIN_PRAGMAS. * plugin.c (plugin_event_name): Added PLUGIN_PRAGMAS & the missing PLUGIN_ATTRIBUTES. (register_callback): Added PLUGIN_PRAGMAS. Fixed typo in message error for unknown callback event. (invoke_plugin_callbacks): Added PLUGIN_PRAGMAS. * Makefile.in (c-pragma.o): Added dependency upon plugin.h. (PLUGIN_HEADERS): added plugin.h. 2009-11-06 Basile Starynkevitch <basile@starynkevitch.net> * g++.dg/plugin/pragma_plugin-test-1.C: new testcase for PLUGIN_PRAGMAS. * g++.dg/plugin/pragma_plugin.c: new test plugin for PLUGIN_PRAGMAS. * g++.dg/plugin/plugin.exp (plugin_test_list): Add pragma_plugin.c and pragma_plugin-test-1.C. From-SVN: r153975
2009-10-05plugins.texi: Change plugin_pass to register_pass_info.Sriraman Tallam1-3/+3
./: * doc/plugins.texi: Change plugin_pass to register_pass_info. testsuite/: * gcc.dg/plugin/selfassign.c (plugin_init): Change plugin_pass to register_pass_info. * gcc.dg/plugin/one_time_plugin.c (plugin_init): Change plugin_pass to register_pass_info. * g++.dg/plugin/selfassign.c (plugin_init): Change plugin_pass to register_pass_info. * g++.dg/plugin/dumb_plugin.c (plugin_init): Change plugin_pass to register_pass_info. From-SVN: r152456
2009-09-28Add support for using ggc cache tables from plugins.Duncan Sands1-10/+14
Approved by Ian Lance Taylor. From-SVN: r152232
2009-06-29plugins.texi: Document PLUGIN_START_UNIT.Olatunji Ruwase1-0/+1
2009-06-29 Olatunji Ruwase <tjruwase@google.com> * doc/plugins.texi: Document PLUGIN_START_UNIT. * toplev.c (compile_file): Call PLUGIN_START_UNIT. * gcc-plugin.h (PLUGIN_START_UNIT): Added new event. * plugin.c (plugin_event_name): Added PLUGIN_START_UNIT. (register_callback): Handle PLUGIN_START_UNIT. (invoke_plugin_callbacks): Handle PLUGIN_START_UNIT. From-SVN: r149064
2009-06-25plugins.texi (Building GCC plugins): Corrected typo in Makefile excerpt - @ ↵Basile Starynkevitch1-1/+1
should be doubled for texinfo. 2009-06-25 Basile Starynkevitch <basile@starynkevitch.net> * doc/plugins.texi (Building GCC plugins): Corrected typo in Makefile excerpt - @ should be doubled for texinfo. From-SVN: r148929
2009-06-18plugins.texi: Document plugin_is_GPL_compatible.Diego Novillo1-0/+20
* doc/plugins.texi: Document plugin_is_GPL_compatible. * plugin.c (str_license): Declare. (try_init_one_plugin): Assert that the symbol 'plugin_is_GPL_compatible' exists. testsuite/ChangeLog * gcc.dg/plugin/selfassign.c: Declare plugin_is_GPL_compatible. * gcc.dg/plugin/ggcplug.c: Likewise. * gcc.dg/plugin/one_time_plugin.c: Likewise. * g++.dg/plugin/selfassign.c: Likewise. * g++.dg/plugin/attribute_plugin.c: Likewise. * g++.dg/plugin/dumb_plugin.c: Likewise. From-SVN: r148667
2009-06-17plugins.texi (Building GCC plugins): Added new section.Basile Starynkevitch1-0/+34
2009-06-17 Basile Starynkevitch <basile@starynkevitch.net> * gcc/doc/plugins.texi (Building GCC plugins): Added new section. From-SVN: r148612
2009-06-16plugins.texi (Interacting with the GCC Garbage Collector): Mention the ↵Basile Starynkevitch1-4/+6
plugin mode of gengtype. 2009-06-16 Basile Starynkevitch <basile@starynkevitch.net> * gcc/doc/plugins.texi (Interacting with the GCC Garbage Collector): Mention the plugin mode of gengtype. * gcc/doc/gty.texi (Source Files Containing Type Information): Likewise. * gcc/gengtype.c: Updated copyright. (plugin_files, nb_plugin_files) Added new static variables. (measure_input_list) Care about plugin_files. (write_rtx_next): Added early return in plugin mode. (create_file): Updated copyright year in generated file. Added asserts. (oprintf): Added early return if NULL outf. (get_output_file_with_visibility): Care of plugin_files. (get_output_file_name): May return null. (write_local): Added early return. (put_mangled_filename): Ditto. (finish_root_table): Added check for base_files. (write_roots): Care about null when plugins. (main): Added plugin mode. From-SVN: r148515
2009-05-27attribute_plugin.c: Include gcc-plugin.h first.Rafael Avila de Espindola1-0/+2
2009-05-27 Rafael Avila de Espindola <espindola@google.com> * g++.dg/plugin/attribute_plugin.c: Include gcc-plugin.h first. * g++.dg/plugin/dumb_plugin.c: Include gcc-plugin.h first. * g++.dg/plugin/selfassign.c: Include gcc-plugin.h first. * gcc.dg/plugin/selfassign.c: Include gcc-plugin.h first. 2009-05-27 Rafael Avila de Espindola <espindola@google.com> * Makefile.in (GCC_PLUGIN_H): New. Replace all uses of gcc-plugin.h with it. * doc/plugins.texi: Document that gcc-plugin.h must be the first to be included. * gcc-plugin.h: Include config.h and system.h. (IN_GCC): Define if not defined. From-SVN: r147908
2009-05-26plugins.texi (Loading plugins): typo.Basile Starynkevitch1-2/+75
2009-05-26 Basile Starynkevitch <basile@starynkevitch.net> * gcc/doc/plugins.texi (Loading plugins): typo. (Plugin callbacks): Documented PLUGIN_INFO, PLUGIN_GGC_START, PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS. (Interacting with the GCC Garbage Collector): Added new section. (Giving information about a plugin): Added new section for PLUGIN_INFO. * gcc/testsuite/gcc.dg/plugin/plugin.exp: Added ggcplug.c test plugin with ggcplug-test-1.c for testing PLUGIN_GGC_MARKING etc... * gcc/testsuite/gcc.dg/plugin/ggcplug-test-1.c: Added new file. * gcc/testsuite/gcc.dg/plugin/ggcplug.c: Added new file. * gcc/ggc.h (ggc_register_root_tab): Added declaration. * gcc/gcc-plugin.h (PLUGIN_GGC_START, PLUGIN_GGC_MARKING) (PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS): Added new events. (register_callback): Improved comment in declaration. * gcc/ggc-common.c (const_ggc_root_tab_t) Added new typedef for vectors. (extra_root_vec) Added static variable for dynamic roots registration. (ggc_register_root_tab) Added new routine. (ggc_mark_roots) Added iteration inside extra_root_vec, and invoke PLUGIN_GGC_MARKING event. * gcc/ggc-zone.c: Include plugin.h. (ggc_collect): Invoke PLUGIN_GGC_START & PLUGIN_GGC_END events. * gcc/ggc-page.c: Include plugin.h. (ggc_collect): Invoke PLUGIN_GGC_START & PLUGIN_GGC_END events. * gcc/plugin.c (plugin_event_name): added names of PLUGIN_GGC_START, PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS (register_callback): check lack of callbacks for pseudo-events. Added handling of PLUGIN_REGISTER_GGC_ROOTS, PLUGIN_GGC_START, PLUGIN_GGC_MARKING, PLUGIN_GGC_END. (invoke_plugin_callbacks): Handle PLUGIN_GGC_START, PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS. * gcc/Makefile.in (ggc-common.o, ggc-zone.o, ggc-page.o): Added dependency on plugin.h. (plugin.o): Added dependency on ggc.h... From-SVN: r147878
2009-05-21plugin.c (try_init_one_plugin): Updated to new plugin_init API.Taras Glek1-5/+22
gcc/ChangeLog * plugin.c (try_init_one_plugin): Updated to new plugin_init API. * gcc-plugin.h (plugin_init): Updated signature. * gcc-plugin.h (plugin_name_args): Moved to this header. * doc/plugins.texi (plugin_init): Updated documention to reflect API change. * doc/plugins.texi (plugin_name_args): Added to documention. gcc/testsuite/ChangeLog * gcc.dg/plugin/selfassign.c (plugin_init): Updated to new plugin_init signature. * g++.dg/plugin/selfassign.c (plugin_init): Updated to new plugin_init signature. * g++.dg/plugin/dumb_plugin.c (plugin_init): Updated to new plugin_init signature. * g++.dg/plugin/attribute_plugin.c (plugin_init): Updated to new plugin_init signature. From-SVN: r147772
2009-05-142009-05-13 Taras Glek <tglek@mozilla.com>Taras Glek1-0/+33
gcc/ * attribs.c moved out attribute registration into register_attribute * doc/plugins.texi Documented register_attribute and PLUGIN_ATTRIBUTES * gcc-plugin.h Added forward decl for register_attribute * plugin.c Added PLUGIN_ATTRIBUTES boilerplate * plugin.h Added PLUGIN_ATTRIBUTES gcc/testsuite/ * g++.dg/plugin/attribute_plugin-test-1.C Testcase input for custom attributes and decl smashing * g++.dg/plugin/attribute_plugin.c Testcase plugin to test user attributes * g++.dg/plugin/dumb_plugin.c Fixed typo * g++.dg/plugin/plugin.exp Added attribute_plugin test From-SVN: r147516
2009-04-14[multiple changes]Diego Novillo1-0/+137
2009-04-14 Diego Novillo <dnovillo@google.com> Le-Chun Wu <lcwu@google.com> * configure.ac: Add --enable-plugin support. Define ENABLE_PLUGIN and PLUGINLIBS when specified. * Makefile.in (PLUGIN_H): Define. Export ENABLE_PLUGIN and GMPINC to site.exp. Add PLUGINLIBS to link command. Add/modify dependencies for plugin.o and files including plugin.h. (plugin.o): New. * config.in: Regenerate. * opts.c (common_handle_option): Handle OPT_fplugin_ and OPT_fplugin_arg_. 2009-04-14 Le-Chun Wu <lcwu@google.com> * tree-pass.h (register_one_dump_file): Add a prototype for register_one_dump_file. * toplev.c (compile_file): Call initialize_plugins. (do_compile): Call invoke_plugin_callbacks. (toplev_main): Call invoke_plugin_callbacks. * common.opt: Add -fplugin= and -fplugin-arg-. * gcc-plugin.h: New public header file for plugins to include. * plugin.c: New source file. * plugin.h: New internal header file. * passes.c (register_one_dump_file): Make it external. * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks. 2009-04-14 Diego Novillo <dnovillo@google.com> * doc/plugins.texi: New. * doc/gccint.texi: Add reference to Plugins chapter. * doc/invoke.texi: Document -fplugin and -fplugin-arg * diagnostic.c (diagnostic_report_diagnostic): Warn about loaded plugins, if any. * timevar.def (TV_PLUGIN_INIT): Define. (TV_PLUGIN_RUN): Define. * plugin.c: Include timevar.h (plugins_active_p): New. (dump_active_plugins): New. (debug_active_plugins): New. cp/ChangeLog 2009-04-14 Le-Chun Wu <lcwu@google.com> * Make-lang.in: Modify dependencies of files including plugin.h. * decl.c (finish_function): Call invoke_plugin_callbacks. * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks. From-SVN: r146059