summaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-07 22:14:43 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-07 22:14:43 +0000
commit8a98e28fd9449671250edeefea05ce4868d65ead (patch)
treeb69303dec14643feb1ed9f6714049e127cdb3831 /gcc/cselib.c
parentf98c470c1cbd0b284977ad3bd6b88240f9aff070 (diff)
downloadgcc-8a98e28fd9449671250edeefea05ce4868d65ead.tar.gz
* cselib.c (cselib_current_insn_in_libcall): New static variable.
(new_elt_loc_list, cselib_process_insn, cselib_init): Keep track on whether we are inside libcall. * cselib.h (elt_loc_list): Add in_libcall. * gcse.c (do_local_cprop): Do not copy propagate using insns in libcalls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61023 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 2ef4c575c1b..63fab2233a9 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -85,6 +85,7 @@ static GTY((param_is (cselib_val))) htab_t hash_table;
/* This is a global so we don't have to pass this through every function.
It is used in new_elt_loc_list to set SETTING_INSN. */
static rtx cselib_current_insn;
+static bool cselib_current_insn_in_libcall;
/* Every new unknown value gets a unique number. */
static unsigned int next_unknown_value;
@@ -165,6 +166,7 @@ new_elt_loc_list (next, loc)
el->next = next;
el->loc = loc;
el->setting_insn = cselib_current_insn;
+ el->in_libcall = cselib_current_insn_in_libcall;
return el;
}
@@ -1310,6 +1312,10 @@ cselib_process_insn (insn)
int i;
rtx x;
+ if (find_reg_note (insn, REG_LIBCALL, NULL))
+ cselib_current_insn_in_libcall = true;
+ if (find_reg_note (insn, REG_RETVAL, NULL))
+ cselib_current_insn_in_libcall = false;
cselib_current_insn = insn;
/* Forget everything at a CODE_LABEL, a volatile asm, or a setjmp. */
@@ -1409,6 +1415,7 @@ cselib_init ()
hash_table = htab_create_ggc (31, get_value_hash, entry_and_rtx_equal_p,
NULL);
clear_table (1);
+ cselib_current_insn_in_libcall = false;
}
/* Called when the current user is done with cselib. */