diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/rtlanal.c | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.zip gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.tar.gz gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 0ebde76..1d2874d 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -2480,10 +2480,11 @@ remove_note (rtx_insn *insn, const_rtx note) } /* Remove REG_EQUAL and/or REG_EQUIV notes if INSN has such notes. - Return true if any note has been removed. */ + If NO_RESCAN is false and any notes were removed, call + df_notes_rescan. Return true if any note has been removed. */ bool -remove_reg_equal_equiv_notes (rtx_insn *insn) +remove_reg_equal_equiv_notes (rtx_insn *insn, bool no_rescan) { rtx *loc; bool ret = false; @@ -2500,6 +2501,8 @@ remove_reg_equal_equiv_notes (rtx_insn *insn) else loc = &XEXP (*loc, 1); } + if (ret && !no_rescan) + df_notes_rescan (insn); return ret; } @@ -6588,3 +6591,29 @@ tls_referenced_p (const_rtx x) return true; return false; } + +/* Process recursively X of INSN and add REG_INC notes if necessary. */ +void +add_auto_inc_notes (rtx_insn *insn, rtx x) +{ + enum rtx_code code = GET_CODE (x); + const char *fmt; + int i, j; + + if (code == MEM && auto_inc_p (XEXP (x, 0))) + { + add_reg_note (insn, REG_INC, XEXP (XEXP (x, 0), 0)); + return; + } + + /* Scan all X sub-expressions. */ + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + { + if (fmt[i] == 'e') + add_auto_inc_notes (insn, XEXP (x, i)); + else if (fmt[i] == 'E') + for (j = XVECLEN (x, i) - 1; j >= 0; j--) + add_auto_inc_notes (insn, XVECEXP (x, i, j)); + } +} |