Commit d6be0d7f by Jeff Law Committed by Jeff Law

tree-cfg.c (edge_to_cases): Renamed from edge_to_case_leader.


	* tree-cfg.c (edge_to_cases): Renamed from edge_to_case_leader.
	(edge_to_cases_elt): Renamed from edge_to_case_leader.
	(edge_to_cases_hash): Renamed from edge_to_case_leader_hash.
	(edge_to_cases_eq): Renamed from edge_to_case_leader_eq.
	(edge_to_cases_cleanup, recording_case_labels_p): New functions.
	(get_cases_for_edge): New function.
	(start_recording_case_labels, end_recording_case_labels): Similarly.
	(record_switch_edge): Don't muck with the CASE_LABEL.  Instead
	chain equivalent CASE_LABEL_EXPRs together.
	(get_case_leader_for_edge, get_case_leader_for_edge_hash): Kill.
	(make_switch_expr_edges): Do not record edge/cases here.
	(cleanup_tree_cfg): Record cases around the call to thread_jumps.
	(split_critical_edges): Record cases around the edge splitting code.
	(cleanup_dead_labels): Use CASE_LABEL again.
	(tree_redirect_edge_and_branch): If we have a mapping from edge
	to cases, use it to handle redirections.  Else do it the slow way.
	* tree.h (CASE_LEADER_OR_LABEL): Kill.
	(CASE_LABEL): Revert to just looking at the tree's second operand.
	* tree.c (get_case_label): Kill.

From-SVN: r90817
parent 730bddf2
2004-11-17 Jeff Law <law@redhat.com>
* tree-cfg.c (edge_to_cases): Renamed from edge_to_case_leader.
(edge_to_cases_elt): Renamed from edge_to_case_leader.
(edge_to_cases_hash): Renamed from edge_to_case_leader_hash.
(edge_to_cases_eq): Renamed from edge_to_case_leader_eq.
(edge_to_cases_cleanup, recording_case_labels_p): New functions.
(get_cases_for_edge): New function.
(start_recording_case_labels, end_recording_case_labels): Similarly.
(record_switch_edge): Don't muck with the CASE_LABEL. Instead
chain equivalent CASE_LABEL_EXPRs together.
(get_case_leader_for_edge, get_case_leader_for_edge_hash): Kill.
(make_switch_expr_edges): Do not record edge/cases here.
(cleanup_tree_cfg): Record cases around the call to thread_jumps.
(split_critical_edges): Record cases around the edge splitting code.
(cleanup_dead_labels): Use CASE_LABEL again.
(tree_redirect_edge_and_branch): If we have a mapping from edge
to cases, use it to handle redirections. Else do it the slow way.
* tree.h (CASE_LEADER_OR_LABEL): Kill.
(CASE_LABEL): Revert to just looking at the tree's second operand.
* tree.c (get_case_label): Kill.
2004-11-17 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/18307
......
......@@ -6061,19 +6061,6 @@ signed_type_for (tree type)
return lang_hooks.types.signed_type (type);
}
/* Return the LABEL_DECL associated with T, which must be a
CASE_LABEL_EXPR. This will walk through any CASE_LABEL_EXPRs
appearing in operand 2 until it finds a CASE_LABEL_EXPR with
a LABEL_DECL in operand 2. */
tree
get_case_label (tree t)
{
while (TREE_CODE (CASE_LEADER_OR_LABEL (t)) == CASE_LABEL_EXPR)
t = CASE_LEADER_OR_LABEL (t);
return CASE_LEADER_OR_LABEL (t);
}
/* Returns the largest value obtainable by casting something in INNER type to
OUTER type. */
......
......@@ -1231,15 +1231,7 @@ struct tree_vec GTY(())
of a case label, respectively. */
#define CASE_LOW(NODE) TREE_OPERAND ((NODE), 0)
#define CASE_HIGH(NODE) TREE_OPERAND ((NODE), 1)
/* Operand 2 has two uses, it may either be a LABEL_DECL node or a
another CASE_LABEL_EXPR node. This accessor gets direct access
to that operand. Use it when you want to assign a value to
operand 2 or when you want to conditionalize actions based on
whether operand 2 is a LABEL_DECL or CASE_LABEL_EXPR. */
#define CASE_LEADER_OR_LABEL(NODE) TREE_OPERAND ((NODE), 2)
#define CASE_LABEL(NODE) get_case_label (NODE)
#define CASE_LABEL(NODE) TREE_OPERAND ((NODE), 2)
/* The operands of a BIND_EXPR. */
#define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0))
......
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