xref: /dragonfly/contrib/gcc-8.0/gcc/plugin.def (revision 38fd1498)
1*38fd1498Szrj/* This file contains the definitions for plugin events in GCC.
2*38fd1498Szrj   Copyright (C) 2009-2018 Free Software Foundation, Inc.
3*38fd1498Szrj
4*38fd1498SzrjThis file is part of GCC.
5*38fd1498Szrj
6*38fd1498SzrjGCC is free software; you can redistribute it and/or modify it under
7*38fd1498Szrjthe terms of the GNU General Public License as published by the Free
8*38fd1498SzrjSoftware Foundation; either version 3, or (at your option) any later
9*38fd1498Szrjversion.
10*38fd1498Szrj
11*38fd1498SzrjGCC is distributed in the hope that it will be useful, but WITHOUT ANY
12*38fd1498SzrjWARRANTY; without even the implied warranty of MERCHANTABILITY or
13*38fd1498SzrjFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14*38fd1498Szrjfor more details.
15*38fd1498Szrj
16*38fd1498SzrjYou should have received a copy of the GNU General Public License
17*38fd1498Szrjalong with GCC; see the file COPYING3.  If not see
18*38fd1498Szrj<http://www.gnu.org/licenses/>.  */
19*38fd1498Szrj
20*38fd1498Szrj/* Called before parsing the body of a function.  */
21*38fd1498SzrjDEFEVENT (PLUGIN_START_PARSE_FUNCTION)
22*38fd1498Szrj
23*38fd1498Szrj/* After finishing parsing a function. */
24*38fd1498SzrjDEFEVENT (PLUGIN_FINISH_PARSE_FUNCTION)
25*38fd1498Szrj
26*38fd1498Szrj/* To hook into pass manager.  */
27*38fd1498SzrjDEFEVENT (PLUGIN_PASS_MANAGER_SETUP)
28*38fd1498Szrj
29*38fd1498Szrj/* After finishing parsing a type.  */
30*38fd1498SzrjDEFEVENT (PLUGIN_FINISH_TYPE)
31*38fd1498Szrj
32*38fd1498Szrj/* After finishing parsing a declaration. */
33*38fd1498SzrjDEFEVENT (PLUGIN_FINISH_DECL)
34*38fd1498Szrj
35*38fd1498Szrj/* Useful for summary processing.  */
36*38fd1498SzrjDEFEVENT (PLUGIN_FINISH_UNIT)
37*38fd1498Szrj
38*38fd1498Szrj/* Allows to see low level AST in C and C++ frontends. */
39*38fd1498SzrjDEFEVENT (PLUGIN_PRE_GENERICIZE)
40*38fd1498Szrj
41*38fd1498Szrj/* Called before GCC exits.  */
42*38fd1498SzrjDEFEVENT (PLUGIN_FINISH)
43*38fd1498Szrj
44*38fd1498Szrj/* Information about the plugin. */
45*38fd1498SzrjDEFEVENT (PLUGIN_INFO)
46*38fd1498Szrj
47*38fd1498Szrj/* Called at start of GCC Garbage Collection. */
48*38fd1498SzrjDEFEVENT (PLUGIN_GGC_START)
49*38fd1498Szrj
50*38fd1498Szrj/* Extend the GGC marking. */
51*38fd1498SzrjDEFEVENT (PLUGIN_GGC_MARKING)
52*38fd1498Szrj
53*38fd1498Szrj/* Called at end of GGC. */
54*38fd1498SzrjDEFEVENT (PLUGIN_GGC_END)
55*38fd1498Szrj
56*38fd1498Szrj/* Register an extra GGC root table. */
57*38fd1498SzrjDEFEVENT (PLUGIN_REGISTER_GGC_ROOTS)
58*38fd1498Szrj
59*38fd1498Szrj/* Called during attribute registration.  */
60*38fd1498SzrjDEFEVENT (PLUGIN_ATTRIBUTES)
61*38fd1498Szrj
62*38fd1498Szrj/* Called before processing a translation unit.  */
63*38fd1498SzrjDEFEVENT (PLUGIN_START_UNIT)
64*38fd1498Szrj
65*38fd1498Szrj/* Called during pragma registration.  */
66*38fd1498SzrjDEFEVENT (PLUGIN_PRAGMAS)
67*38fd1498Szrj
68*38fd1498Szrj/* Called before first pass from all_passes.  */
69*38fd1498SzrjDEFEVENT (PLUGIN_ALL_PASSES_START)
70*38fd1498Szrj
71*38fd1498Szrj/* Called after last pass from all_passes.  */
72*38fd1498SzrjDEFEVENT (PLUGIN_ALL_PASSES_END)
73*38fd1498Szrj
74*38fd1498Szrj/* Called before first ipa pass.  */
75*38fd1498SzrjDEFEVENT (PLUGIN_ALL_IPA_PASSES_START)
76*38fd1498Szrj
77*38fd1498Szrj/* Called after last ipa pass.  */
78*38fd1498SzrjDEFEVENT (PLUGIN_ALL_IPA_PASSES_END)
79*38fd1498Szrj
80*38fd1498Szrj/* Allows to override pass gate decision for current_pass.  */
81*38fd1498SzrjDEFEVENT (PLUGIN_OVERRIDE_GATE)
82*38fd1498Szrj
83*38fd1498Szrj/* Called before executing a pass.  */
84*38fd1498SzrjDEFEVENT (PLUGIN_PASS_EXECUTION)
85*38fd1498Szrj
86*38fd1498Szrj/* Called before executing subpasses of a GIMPLE_PASS in
87*38fd1498Szrj   execute_ipa_pass_list.  */
88*38fd1498SzrjDEFEVENT (PLUGIN_EARLY_GIMPLE_PASSES_START)
89*38fd1498Szrj
90*38fd1498Szrj/* Called after executing subpasses of a GIMPLE_PASS in
91*38fd1498Szrj   execute_ipa_pass_list.  */
92*38fd1498SzrjDEFEVENT (PLUGIN_EARLY_GIMPLE_PASSES_END)
93*38fd1498Szrj
94*38fd1498Szrj/* Called when a pass is first instantiated.  */
95*38fd1498SzrjDEFEVENT (PLUGIN_NEW_PASS)
96*38fd1498Szrj
97*38fd1498Szrj/* Called when a file is #include-d or given via the #line directive.
98*38fd1498Szrj   this could happen many times.  The event data is the included file path,
99*38fd1498Szrj   as a const char* pointer.  */
100*38fd1498SzrjDEFEVENT (PLUGIN_INCLUDE_FILE)
101*38fd1498Szrj
102*38fd1498Szrj/* When adding a new hard-coded plugin event, don't forget to edit in
103*38fd1498Szrj   file plugin.c the functions register_callback and
104*38fd1498Szrj   invoke_plugin_callbacks_full accordingly!  */
105*38fd1498Szrj
106*38fd1498Szrj/* After the hard-coded events above, plugins can dynamically allocate events
107*38fd1498Szrj   at run time.
108*38fd1498Szrj   PLUGIN_EVENT_FIRST_DYNAMIC only appears as last enum element.  */
109