| 1 |
/* strub (stack scrubbing) infrastructure. |
| 2 |
Copyright (C) 2021-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by Alexandre Oliva <[email protected]>. |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 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 |
| 10 |
version. |
| 11 |
|
| 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 |
| 15 |
for more details. |
| 16 |
|
| 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/>. */ |
| 20 |
|
| 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); |
| 25 |
|
| 26 |
/* Return FALSE if NODE is a strub context, and TRUE otherwise. */ |
| 27 |
extern bool strub_splittable_p (cgraph_node *node); |
| 28 |
|
| 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); |
| 32 |
|
| 33 |
/* Make a function type or declaration callable. */ |
| 34 |
extern void strub_make_callable (tree fndecl); |
| 35 |
|
| 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); |
| 41 |
|
| 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); |