aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorZhenqiang Chen <zhenqiang.chen@arm.com>2014-10-21 03:38:37 +0000
committerZhenqiang Chen <zqchen@gcc.gnu.org>2014-10-21 03:38:37 +0000
commit11204b2de523611cf7f1135aa5ff1cfb1bb11001 (patch)
tree095a9c0fd61d03f3ccb70c3d847baf69add08e2e /gcc
parenteb1da98ac659b13a43deed26f424c83f8da92d1d (diff)
downloadgcc-11204b2de523611cf7f1135aa5ff1cfb1bb11001.zip
gcc-11204b2de523611cf7f1135aa5ff1cfb1bb11001.tar.gz
gcc-11204b2de523611cf7f1135aa5ff1cfb1bb11001.tar.bz2
cfgloopanal.c (seq_cost): Delete.
2014-10-21 Zhenqiang Chen <zhenqiang.chen@arm.com> * cfgloopanal.c (seq_cost): Delete. * rtl.h (seq_cost): New prototype. * rtlanal.c (seq_cost): New function. * tree-ssa-loop-ivopts.c (seq_cost): Delete. From-SVN: r216501
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cfgloopanal.c20
-rw-r--r--gcc/rtl.h1
-rw-r--r--gcc/rtlanal.c20
-rw-r--r--gcc/tree-ssa-loop-ivopts.c20
5 files changed, 28 insertions, 40 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cbc899c..f7dedb5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-21 Zhenqiang Chen <zhenqiang.chen@arm.com>
+
+ * cfgloopanal.c (seq_cost): Delete.
+ * rtl.h (seq_cost): New prototype.
+ * rtlanal.c (seq_cost): New function.
+ * tree-ssa-loop-ivopts.c (seq_cost): Delete.
+
2014-10-20 Andrew MacLeod <amacleod@redhat.com>
* cfgrtl.h: New. Add prototypes for cfgrtl.c.
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index 7ea1a5f..006b419 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -302,26 +302,6 @@ get_loop_level (const struct loop *loop)
return mx;
}
-/* Returns estimate on cost of computing SEQ. */
-
-static unsigned
-seq_cost (const rtx_insn *seq, bool speed)
-{
- unsigned cost = 0;
- rtx set;
-
- for (; seq; seq = NEXT_INSN (seq))
- {
- set = single_set (seq);
- if (set)
- cost += set_rtx_cost (set, speed);
- else
- cost++;
- }
-
- return cost;
-}
-
/* Initialize the constants for computing set costs. */
void
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 496d824..2c614c3 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2912,6 +2912,7 @@ extern rtx_insn *find_first_parameter_load (rtx_insn *, rtx_insn *);
extern bool keep_with_call_p (const rtx_insn *);
extern bool label_is_jump_target_p (const_rtx, const rtx_insn *);
extern int insn_rtx_cost (rtx, bool);
+extern unsigned seq_cost (const rtx_insn *, bool);
/* Given an insn and condition, return a canonical description of
the test being made. */
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 75362e4..6459238 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -5051,6 +5051,26 @@ insn_rtx_cost (rtx pat, bool speed)
return cost > 0 ? cost : COSTS_N_INSNS (1);
}
+/* Returns estimate on cost of computing SEQ. */
+
+unsigned
+seq_cost (const rtx_insn *seq, bool speed)
+{
+ unsigned cost = 0;
+ rtx set;
+
+ for (; seq; seq = NEXT_INSN (seq))
+ {
+ set = single_set (seq);
+ if (set)
+ cost += set_rtx_cost (set, speed);
+ else
+ cost++;
+ }
+
+ return cost;
+}
+
/* Given an insn INSN and condition COND, return the condition in a
canonical form to simplify testing by callers. Specifically:
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 400798a..087ca26 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -2842,26 +2842,6 @@ get_use_iv_cost (struct ivopts_data *data, struct iv_use *use,
return NULL;
}
-/* Returns estimate on cost of computing SEQ. */
-
-static unsigned
-seq_cost (rtx_insn *seq, bool speed)
-{
- unsigned cost = 0;
- rtx set;
-
- for (; seq; seq = NEXT_INSN (seq))
- {
- set = single_set (seq);
- if (set)
- cost += set_src_cost (SET_SRC (set), speed);
- else
- cost++;
- }
-
- return cost;
-}
-
/* Produce DECL_RTL for object obj so it looks like it is stored in memory. */
static rtx
produce_memory_decl_rtl (tree obj, int *regno)