aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-02-05 13:11:44 +0100
committerMartin Liska <mliska@suse.cz>2021-02-08 12:31:24 +0100
commit0d701e3eb89870237669ef7bf41394d90c35ae70 (patch)
tree1b07829e072abb7fee500525bdeb3a4b11e3e022 /gcc/cfgexpand.c
parentfe2034e9c039c998fc5da730ed531c61cf2e0b7d (diff)
downloadgcc-0d701e3eb89870237669ef7bf41394d90c35ae70.zip
gcc-0d701e3eb89870237669ef7bf41394d90c35ae70.tar.gz
gcc-0d701e3eb89870237669ef7bf41394d90c35ae70.tar.bz2
opts: fix handling of -fpatchable-function-entries option
gcc/ChangeLog: PR lto/98971 * cfgexpand.c (pass_expand::execute): Parse per-function option flag_patchable_function_entry and use it. * common.opt: Remove function_entry_patch_area_size and function_entry_patch_area_start global variables. * opts.c (parse_and_check_patch_area): New function. (common_handle_option): Use it. * opts.h (parse_and_check_patch_area): New function. * toplev.c (process_options): Parse and use function_entry_patch_area_size.
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 8d20ca6..aef9e91 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-address.h"
#include "output.h"
#include "builtins.h"
+#include "opts.h"
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
@@ -6845,8 +6846,9 @@ pass_expand::execute (function *fun)
if (crtl->tail_call_emit)
fixup_tail_calls ();
- unsigned HOST_WIDE_INT patch_area_size = function_entry_patch_area_size;
- unsigned HOST_WIDE_INT patch_area_entry = function_entry_patch_area_start;
+ HOST_WIDE_INT patch_area_size, patch_area_entry;
+ parse_and_check_patch_area (flag_patchable_function_entry, false,
+ &patch_area_size, &patch_area_entry);
tree patchable_function_entry_attr
= lookup_attribute ("patchable_function_entry",