1 /* strub (stack scrubbing) infrastructure.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
3 Contributed by Alexandre Oliva <oliva@adacore.com>.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 /* Return TRUE if CALLEE can be inlined into CALLER, as far as stack scrubbing
22 constraints are concerned. CALLEE doesn't have to be called directly by
23 CALLER, but the returned value says nothing about intervening functions. */
24 extern bool strub_inlinable_to_p (cgraph_node
*callee
, cgraph_node
*caller
);
26 /* Return FALSE if NODE is a strub context, and TRUE otherwise. */
27 extern bool strub_splittable_p (cgraph_node
*node
);
29 /* Locate and return the watermark_ptr parameter for FNDECL. If FNDECL is not a
30 strub context, return NULL. */
31 extern tree
strub_watermark_parm (tree fndecl
);
33 /* Make a function type or declaration callable. */
34 extern void strub_make_callable (tree fndecl
);
36 /* Return zero iff ID is NOT an acceptable parameter for a user-supplied strub
37 attribute for a function. Otherwise, return >0 if it enables strub, <0 if it
38 does not. Return +/-1 if the attribute-modified type is compatible with the
39 type without the attribute, or +/-2 if it is not compatible. */
40 extern int strub_validate_fn_attr_parm (tree id
);
42 /* Like comptypes, return 0 if t1 and t2 are not compatible, 1 if they are
43 compatible, and 2 if they are nearly compatible. Same strub mode is
44 compatible, interface-compatible strub modes are nearly compatible. */
45 extern int strub_comptypes (tree t1
, tree t2
);