summaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-13 23:31:48 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-13 23:31:48 +0000
commit2af89801635506744c58a179cebbd0c1ad2225d2 (patch)
tree15cbb5d3f14d62dfccb279c6d3b924cdce7aeabd /gcc/cselib.c
parent6e3803fb5313ee4761000a5bf4492300c723911d (diff)
downloadlinaro-gcc-2af89801635506744c58a179cebbd0c1ad2225d2.tar.gz
linaro-gcc-2af89801635506744c58a179cebbd0c1ad2225d2.tar.bz2
linaro-gcc-2af89801635506744c58a179cebbd0c1ad2225d2.zip
PR bootstrap/52172
* cselib.h (cselib_subst_to_values_from_insn): New prototype. * cselib.c (cselib_subst_to_values_from_insn): New function. * sched-deps.c (add_insn_mem_dependence, sched_analyze_1, sched_analyze_2): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 7d3e4ca52d8..d7cb355fc33 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -1905,6 +1905,19 @@ cselib_subst_to_values (rtx x, enum machine_mode memmode)
return copy;
}
+/* Wrapper for cselib_subst_to_values, that indicates X is in INSN. */
+
+rtx
+cselib_subst_to_values_from_insn (rtx x, enum machine_mode memmode, rtx insn)
+{
+ rtx ret;
+ gcc_assert (!cselib_current_insn);
+ cselib_current_insn = insn;
+ ret = cselib_subst_to_values (x, memmode);
+ cselib_current_insn = NULL;
+ return ret;
+}
+
/* Look up the rtl expression X in our tables and return the value it
has. If CREATE is zero, we return NULL if we don't know the value.
Otherwise, we create a new one if possible, using mode MODE if X