Commit f1544089 by Marek Polacek Committed by Marek Polacek

re PR middle-end/66353 (Missing bb_has_abnormal_call_pred in basic-block.h)

	PR middle-end/66353
	* basic-block.h	(has_abnormal_call_or_eh_pred_edge_p): New function.
	* ira-lives.c (bb_has_abnormal_call_pred): Remove function.
	(process_bb_node_lives): Call has_abnormal_call_or_eh_pred_edge_p
	rather than bb_has_abnormal_call_pred.
	* lra-lives.c (bb_has_abnormal_call_pred): Remove function.
	(process_bb_lives): Call has_abnormal_call_or_eh_pred_edge_p
	rather than bb_has_abnormal_call_pred.

From-SVN: r225711
parent 15015c1a
2015-07-11 Marek Polacek <polacek@redhat.com>
PR middle-end/66353
* basic-block.h (has_abnormal_call_or_eh_pred_edge_p): New function.
* ira-lives.c (bb_has_abnormal_call_pred): Remove function.
(process_bb_node_lives): Call has_abnormal_call_or_eh_pred_edge_p
rather than bb_has_abnormal_call_pred.
* lra-lives.c (bb_has_abnormal_call_pred): Remove function.
(process_bb_lives): Call has_abnormal_call_or_eh_pred_edge_p
rather than bb_has_abnormal_call_pred.
2015-07-10 Anatoly Sokolov <aesok@post.ru> 2015-07-10 Anatoly Sokolov <aesok@post.ru>
* config/v850/v850.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, * config/v850/v850.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P,
......
...@@ -632,4 +632,21 @@ has_abnormal_or_eh_outgoing_edge_p (basic_block bb) ...@@ -632,4 +632,21 @@ has_abnormal_or_eh_outgoing_edge_p (basic_block bb)
return false; return false;
} }
/* Return true when one of the predecessor edges of BB is marked with
EDGE_ABNORMAL_CALL or EDGE_EH. */
static inline bool
has_abnormal_call_or_eh_pred_edge_p (basic_block bb)
{
edge e;
edge_iterator ei;
FOR_EACH_EDGE (e, ei, bb->preds)
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
return true;
return false;
}
#endif /* GCC_BASIC_BLOCK_H */ #endif /* GCC_BASIC_BLOCK_H */
...@@ -968,22 +968,6 @@ process_single_reg_class_operands (bool in_p, int freq) ...@@ -968,22 +968,6 @@ process_single_reg_class_operands (bool in_p, int freq)
} }
} }
/* Return true when one of the predecessor edges of BB is marked with
EDGE_ABNORMAL_CALL or EDGE_EH. */
static bool
bb_has_abnormal_call_pred (basic_block bb)
{
edge e;
edge_iterator ei;
FOR_EACH_EDGE (e, ei, bb->preds)
{
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
return true;
}
return false;
}
/* Look through the CALL_INSN_FUNCTION_USAGE of a call insn INSN, and see if /* Look through the CALL_INSN_FUNCTION_USAGE of a call insn INSN, and see if
we find a SET rtx that we can use to deduce that a register can be cheaply we find a SET rtx that we can use to deduce that a register can be cheaply
caller-saved. Return such a register, or NULL_RTX if none is found. */ caller-saved. Return such a register, or NULL_RTX if none is found. */
...@@ -1343,7 +1327,8 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node) ...@@ -1343,7 +1327,8 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
/* No need to record conflicts for call clobbered regs if we /* No need to record conflicts for call clobbered regs if we
have nonlocal labels around, as we don't ever try to have nonlocal labels around, as we don't ever try to
allocate such regs in this case. */ allocate such regs in this case. */
if (!cfun->has_nonlocal_label && bb_has_abnormal_call_pred (bb)) if (!cfun->has_nonlocal_label
&& has_abnormal_call_or_eh_pred_edge_p (bb))
for (px = 0; px < FIRST_PSEUDO_REGISTER; px++) for (px = 0; px < FIRST_PSEUDO_REGISTER; px++)
if (call_used_regs[px] if (call_used_regs[px]
#ifdef REAL_PIC_OFFSET_TABLE_REGNUM #ifdef REAL_PIC_OFFSET_TABLE_REGNUM
......
...@@ -508,22 +508,6 @@ static lra_insn_recog_data_t curr_id; ...@@ -508,22 +508,6 @@ static lra_insn_recog_data_t curr_id;
/* The insn static data. */ /* The insn static data. */
static struct lra_static_insn_data *curr_static_id; static struct lra_static_insn_data *curr_static_id;
/* Return true when one of the predecessor edges of BB is marked with
EDGE_ABNORMAL_CALL or EDGE_EH. */
static bool
bb_has_abnormal_call_pred (basic_block bb)
{
edge e;
edge_iterator ei;
FOR_EACH_EDGE (e, ei, bb->preds)
{
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
return true;
}
return false;
}
/* Vec containing execution frequencies of program points. */ /* Vec containing execution frequencies of program points. */
static vec<int> point_freq_vec; static vec<int> point_freq_vec;
...@@ -965,7 +949,8 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) ...@@ -965,7 +949,8 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p)
/* No need to record conflicts for call clobbered regs if we /* No need to record conflicts for call clobbered regs if we
have nonlocal labels around, as we don't ever try to have nonlocal labels around, as we don't ever try to
allocate such regs in this case. */ allocate such regs in this case. */
if (!cfun->has_nonlocal_label && bb_has_abnormal_call_pred (bb)) if (!cfun->has_nonlocal_label
&& has_abnormal_call_or_eh_pred_edge_p (bb))
for (px = 0; px < FIRST_PSEUDO_REGISTER; px++) for (px = 0; px < FIRST_PSEUDO_REGISTER; px++)
if (call_used_regs[px] if (call_used_regs[px]
#ifdef REAL_PIC_OFFSET_TABLE_REGNUM #ifdef REAL_PIC_OFFSET_TABLE_REGNUM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment