All other cost helper functions are using signed int to hold cost
while seq_cost is using unsigned int.
This fix this. bootstrap OK on x86.
OK for trunk?
2015-09-08 Jiong Wang <[email protected]>
gcc/
* rtl.h (seq_cost): Change return type from "unsigned" to "int".
* rtlanal.c (seq_cost): Likewise.
--
Regards,
Jiong
diff --git a/gcc/rtl.h b/gcc/rtl.h
index ac56133..ded054c 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -3050,7 +3050,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);
+extern int 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 ef98f4b..2f14b93 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -5160,10 +5160,10 @@ insn_rtx_cost (rtx pat, bool speed)
/* Returns estimate on cost of computing SEQ. */
-unsigned
+int
seq_cost (const rtx_insn *seq, bool speed)
{
- unsigned cost = 0;
+ int cost = 0;
rtx set;
for (; seq; seq = NEXT_INSN (seq))