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