Move ici specific files to new directory ici; add new file ici/ici.c
[official-gcc.git] / gcc / ici / highlev-plugin-internal.h
blob3f7109fbe96a0b1269ff9db8b0b539d5698f4242
1 /* Compiler-side interface for high-level plugins in GCC.
2 Copyright (C) 2009 Free Software Foundation, Inc.
4 Contributed by Inria.
6 Authors: Grigori Fursin <grigori.fursin@inria.fr>, Cupertino Miranda
7 <cupertinomiranda@gmail.com>, Zbigniew Chamski <zbigniew.chamski@gmail.com>.
9 This file is part of GCC.
11 GCC is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free
13 Software Foundation; either version 3, or (at your option) any later
14 version.
16 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
17 WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 for more details.
21 You should have received a copy of the GNU General Public License
22 along with GCC; see the file COPYING3. If not see
23 <http://www.gnu.org/licenses/>. */
25 #ifndef HIGHLEV_PLUGIN_INTERNAL
26 #define HIGHLEV_PLUGIN_INTERNAL
28 #include "highlev-plugin-common.h"
30 /* Callback type for high-level argument-less event callbacks */
31 typedef void (*event_callback_t) (void);
33 /* Manipulation of events and event handlers */
34 extern void register_plugin_event (const char *name, event_callback_t func);
35 extern void unregister_plugin_event (const char *name);
36 extern const char **list_plugin_events (void);
37 extern int invoke_named_callbacks (const char *event_name, ...);
39 /* Manipulation of event parameters (callback arguments) */
40 extern void register_event_parameter (const char *name, void *param,
41 event_parameter_type type);
42 extern void unregister_event_parameter (const char *name);
43 extern const char **list_event_parameters (void);
44 extern void *get_event_parameter (const char *name);
45 extern event_parameter_type get_event_parameter_type (const char *name);
47 /* ICI-specific, environment-based plugin loading */
48 extern void load_ici_plugin (void);
50 /* ICI implementation internal functions. */
51 extern void ici_refresh_internal_callbacks (int);
52 struct opt_pass;
53 extern void execute_one_ipa_summary_pass (struct opt_pass *pass);
55 /* Info needed by adaptation. */
56 typedef struct {
57 int numofclonefun;
58 char **clone_function_list;
59 char **function_filename_list;
60 int *clones;
61 char **clone_extension;
62 char **adaptation_function;
63 char **clone_option;
64 char *external_libraries;
65 } cloneinfo ;
67 typedef struct {
68 int numofinstrfun;
69 char **instrument_function_list;
70 char **function_filename_list;
71 char **timer1;
72 char **timer2;
73 char *cloned;
74 } instrinfo ;
76 #endif /* HIGHLEV_PLUGIN_INTERNAL_H*/