diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-01-14 13:01:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-14 13:01:01 +0100 |
commit | a49a975f0eaf49d9882ba4bf4b583f99d56d0d3a (patch) | |
tree | 5d19df5d6e01eac1ed1c0504b50a318c3e91f688 /gcc/cfgexpand.c | |
parent | 7227b597ac26b10aa51d334d72bd74365047182c (diff) | |
download | gcc-a49a975f0eaf49d9882ba4bf4b583f99d56d0d3a.zip gcc-a49a975f0eaf49d9882ba4bf4b583f99d56d0d3a.tar.gz gcc-a49a975f0eaf49d9882ba4bf4b583f99d56d0d3a.tar.bz2 |
re PR rtl-optimization/88796 (-fstack-protector* kills RTL DSE opportunities)
PR rtl-optimization/88796
* emit-rtl.h (struct rtl_data): Add stack_protect_guard_decl field.
* cfgexpand.c (stack_protect_prologue): Initialize
crtl->stack_protect_guard_decl.
* function.c (stack_protect_epilogue): Use it instead of calling
targetm.stack_protect_guard again.
* dse.c (check_mem_read_rtx): Ignore MEM_VOLATILE_P reads from
MEMs with MEM_EXPR equal to crtl->stack_protect_guard or
crtl->stack_protect_guard_decl.
* config/i386/i386.c (ix86_stack_protect_guard): Set TREE_THIS_VOLATILE
on the returned MEM_EXPR.
* gcc.target/i386/pr88796.c: New test.
From-SVN: r267916
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index f4786d5..3b7a6e5 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -6219,6 +6219,7 @@ stack_protect_prologue (void) tree guard_decl = targetm.stack_protect_guard (); rtx x, y; + crtl->stack_protect_guard_decl = guard_decl; x = expand_normal (crtl->stack_protect_guard); if (targetm.have_stack_protect_combined_set () && guard_decl) |