]> git.ipfire.org Git - thirdparty/gcc.git/commit
Restore RTL alias analysis for hard frame pointer
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 29 Oct 2022 08:16:18 +0000 (10:16 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Nov 2022 11:31:34 +0000 (12:31 +0100)
commit6e40f57f87c245c6aab361dcabe04c4135cf5f0a
treebdd1404da2ad0c3605d8367000ea7c680f347eb9
parent253a85be59cba7fd9243b0b3e14b1ed5001acc81
Restore RTL alias analysis for hard frame pointer

The change:

2021-07-28  Bin Cheng  <bin.cheng@linux.alibaba.com>

alias.c (init_alias_analysis): Don't skip prologue/epilogue.

broke the alias analysis for the hard frame pointer (when it is used as a
frame pointer, i.e. when the frame pointer is not eliminated) described in
the large comment at the top of the file, because static_reg_base_value is
set for it and, consequently, new_reg_base_value too.

When the instruction saving the stack pointer into the hard frame pointer in
the prologue is processed, it is viewed as a second set of the hard frame
pointer and to a different value by record_set, which then proceeds to reset
new_reg_base_value to 0 and the game is over.

gcc/
* alias.cc (init_alias_analysis): Do not record sets to the hard
frame pointer if the frame pointer has not been eliminated.
gcc/alias.cc