[gcc(refs/users/aoliva/heads/testme)] hardcfr: optionally disable in leaf functions [ada doc]
Alexandre Oliva
aoliva@gcc.gnu.org
Thu Jun 8 04:48:05 GMT 2023
https://gcc.gnu.org/g:26fcd52859ab26c68c5585b929424a1ceebd87d1
commit 26fcd52859ab26c68c5585b929424a1ceebd87d1
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Oct 20 20:27:14 2022 -0300
hardcfr: optionally disable in leaf functions [ada doc]
Document -fhardcfr-skip-leaf.
for gcc/ada/ChangeLog
* doc/gnat_rm/security_hardening_features.rst (Control Flow
Hardening): Document -fhardcfr-skip-leaf.
Diff:
---
gcc/ada/doc/gnat_rm/security_hardening_features.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/ada/doc/gnat_rm/security_hardening_features.rst b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
index 5c45fc2d42a..4ea38b14df1 100644
--- a/gcc/ada/doc/gnat_rm/security_hardening_features.rst
+++ b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
@@ -363,6 +363,11 @@ basic blocks take note as control flows through them, and, before
returning, subprograms verify that the taken notes are consistent with
the control-flow graph.
+The performance impact of verification on leaf subprograms can be much
+higher, while the averted risks are much lower on them.
+Instrumentation can be disabled for leaf subprograms with
+:switch:`-fhardcfr-skip-leaf`.
+
Functions with too many basic blocks, or with multiple return points,
call a run-time function to perform the verification. Other functions
perform the verification inline before returning.
More information about the Gcc-cvs
mailing list