From: Bin Cheng Date: Wed, 28 Jul 2021 09:44:35 +0000 (+0800) Subject: Don't skip prologue/epilogue when initializing alias. X-Git-Tag: basepoints/gcc-13~5755 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f95c6b2f7dae35ec8c9f211d63edc42baa1d2b7;p=thirdparty%2Fgcc.git Don't skip prologue/epilogue when initializing alias. Register might be modified in prologue/epilogue, which shouldn't be skipped in alias info analysis. 2021-07-28 Bin Cheng gcc/ * alias.c (init_alias_analysis): Don't skip prologue/epilogue. --- diff --git a/gcc/alias.c b/gcc/alias.c index 69e1eb89ac67..099acabca6b0 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -3406,14 +3406,6 @@ init_alias_analysis (void) rpo = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); rpo_cnt = pre_and_rev_post_order_compute (NULL, rpo, false); - /* The prologue/epilogue insns are not threaded onto the - insn chain until after reload has completed. Thus, - there is no sense wasting time checking if INSN is in - the prologue/epilogue until after reload has completed. */ - bool could_be_prologue_epilogue = ((targetm.have_prologue () - || targetm.have_epilogue ()) - && reload_completed); - pass = 0; do { @@ -3459,10 +3451,6 @@ init_alias_analysis (void) { rtx note, set; - if (could_be_prologue_epilogue - && prologue_epilogue_contains (insn)) - continue; - /* If this insn has a noalias note, process it, Otherwise, scan for sets. A simple set will have no side effects which could change the base value of any other register. */