1/* General-purpose hooks.
2 Copyright (C) 2002-2026 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3, or (at your option) any
7 later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>.
17
18 In other words, you are welcome to use, share and improve this program.
19 You are forbidden to forbid anyone else to use, share and improve
20 what you give them. Help stamp out software-hoarding! */
21
22#ifndef GCC_HOOKS_H
23#define GCC_HOOKS_H
24
25
26extern bool hook_bool_void_false (void);
27extern bool hook_bool_void_true (void);
28extern bool hook_bool_bool_false (bool);
29extern bool hook_bool_bool_gcc_optionsp_false (bool, struct gcc_options *);
30extern bool hook_bool_dwcfi_dwcfioprndtyperef_false (dwarf_call_frame_info,
31 dw_cfi_oprnd_type &);
32extern bool hook_bool_FILEptr_dwcfiptr_false (FILE *, dw_cfi_ref);
33extern bool hook_bool_const_int_const_int_true (const int, const int);
34extern bool hook_bool_mode_false (machine_mode);
35extern bool hook_bool_mode_true (machine_mode);
36extern bool hook_bool_mode_mode_true (machine_mode, machine_mode);
37extern bool hook_bool_mode_const_rtx_false (machine_mode, const_rtx);
38extern bool hook_bool_mode_const_rtx_true (machine_mode, const_rtx);
39extern bool hook_bool_mode_int_unsigned_false (machine_mode, int, unsigned);
40extern bool hook_bool_mode_rtx_false (machine_mode, rtx);
41extern bool hook_bool_mode_rtx_true (machine_mode, rtx);
42extern bool hook_bool_const_rtx_insn_const_rtx_insn_true (const rtx_insn *,
43 const rtx_insn *);
44extern bool hook_bool_mode_uhwi_false (machine_mode,
45 unsigned HOST_WIDE_INT);
46extern bool hook_bool_puint64_puint64_true (poly_uint64, poly_uint64);
47extern bool hook_bool_uint_uint_mode_false (unsigned int, unsigned int,
48 machine_mode);
49extern bool hook_bool_uint_mode_true (unsigned int, machine_mode);
50extern bool hook_bool_tree_false (tree);
51extern bool hook_bool_const_tree_false (const_tree);
52extern bool hook_bool_const_tree_const_tree_true (const_tree, const_tree);
53extern bool hook_bool_tree_true (tree);
54extern bool hook_bool_const_tree_true (const_tree);
55extern bool hook_bool_gsiptr_false (gimple_stmt_iterator *);
56extern bool hook_bool_const_tree_hwi_hwi_const_tree_false (const_tree,
57 HOST_WIDE_INT,
58 HOST_WIDE_INT,
59 const_tree);
60extern bool hook_bool_const_tree_hwi_hwi_const_tree_true (const_tree,
61 HOST_WIDE_INT,
62 HOST_WIDE_INT,
63 const_tree);
64extern bool hook_bool_rtx_insn_true (rtx_insn *);
65extern bool hook_bool_rtx_false (rtx);
66extern bool hook_bool_rtx_insn_int_false (rtx_insn *, int);
67extern bool hook_bool_uintp_uintp_false (unsigned int *, unsigned int *);
68extern bool hook_bool_reg_class_t_false (reg_class_t regclass);
69extern bool hook_bool_mode_mode_reg_class_t_true (machine_mode, machine_mode,
70 reg_class_t);
71extern bool hook_bool_mode_reg_class_t_reg_class_t_false (machine_mode,
72 reg_class_t,
73 reg_class_t);
74extern bool hook_bool_rtx_mode_int_int_intp_bool_false (rtx, machine_mode,
75 int, int, int *, bool);
76extern bool hook_bool_tree_tree_false (tree, tree);
77extern bool hook_bool_tree_tree_true (tree, tree);
78extern bool hook_bool_tree_bool_false (tree, bool);
79extern bool hook_bool_wint_wint_uint_bool_true (const widest_int &,
80 const widest_int &,
81 unsigned int, bool);
82
83extern void hook_void_void (void);
84extern void hook_void_constcharptr (const char *);
85extern void hook_void_rtx_insn_int (rtx_insn *, int);
86extern void hook_void_FILEptr_constcharptr (FILE *, const char *);
87extern void hook_void_FILEptr_constcharptr_const_tree (FILE *, const char *,
88 const_tree);
89extern bool hook_bool_FILEptr_rtx_false (FILE *, rtx);
90extern void hook_void_FILEptr_tree (FILE *, tree);
91extern void hook_void_tree (tree);
92extern void hook_void_tree_treeptr (tree, tree *);
93extern void hook_void_int_int (int, int);
94extern void hook_void_gcc_optionsp (struct gcc_options *);
95extern bool hook_bool_uint_true (unsigned int);
96extern bool hook_bool_uint_uintp_false (unsigned int, unsigned int *);
97
98extern int hook_int_uint_mode_1 (unsigned int, machine_mode);
99extern int hook_int_const_tree_0 (const_tree);
100extern int hook_int_const_tree_const_tree_1 (const_tree, const_tree);
101extern int hook_int_rtx_0 (rtx);
102extern int hook_int_rtx_1 (rtx);
103extern int hook_int_rtx_insn_0 (rtx_insn *);
104extern int hook_int_rtx_insn_unreachable (rtx_insn *);
105extern int hook_int_rtx_bool_0 (rtx, bool);
106extern int hook_int_rtx_mode_as_bool_0 (rtx, machine_mode, addr_space_t,
107 bool);
108
109extern HOST_WIDE_INT hook_hwi_void_0 (void);
110
111extern tree hook_tree_const_tree_null (const_tree);
112extern tree hook_tree_void_null (void);
113
114extern tree hook_tree_tree_bool_null (tree, bool);
115extern tree hook_tree_tree_tree_null (tree, tree);
116extern tree hook_tree_tree_tree_tree_null (tree, tree, tree);
117extern tree hook_tree_tree_int_treep_bool_null (tree, int, tree *, bool);
118extern tree hook_tree_treeptr_tree_tree_int_boolptr_null (tree *, tree, tree, int, bool *);
119
120extern unsigned hook_uint_void_0 (void);
121extern unsigned int hook_uint_mode_0 (machine_mode);
122
123extern bool default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT,
124 HOST_WIDE_INT, const_tree);
125
126extern rtx hook_rtx_rtx_identity (rtx);
127extern rtx hook_rtx_rtx_null (rtx);
128extern rtx hook_rtx_tree_int_null (tree, int);
129
130extern char *hook_charptr_void_null (void);
131extern const char *hook_constcharptr_void_null (void);
132extern const char *hook_constcharptr_const_tree_null (const_tree);
133extern const char *hook_constcharptr_const_rtx_insn_null (const rtx_insn *);
134extern const char *hook_constcharptr_const_tree_const_tree_null (const_tree, const_tree);
135extern const char *hook_constcharptr_int_const_tree_null (int, const_tree);
136extern const char *hook_constcharptr_int_const_tree_const_tree_null (int, const_tree, const_tree);
137
138extern opt_machine_mode hook_optmode_mode_uhwi_none (machine_mode,
139 unsigned HOST_WIDE_INT);
140
141extern bool hook_stringslice_locationtptr_true (string_slice, location_t *);
142extern bool hook_stringslice_consttree_stringslice_consttree_unreachable (string_slice, const_tree, string_slice, const_tree);
143
144#endif
145

source code of gcc/hooks.h