diff options
author | Richard Biener <rguenther@suse.de> | 2020-11-13 11:33:22 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-11-13 11:35:01 +0100 |
commit | 4852c3266ec0887316b9fbbb106b8540e3e948d6 (patch) | |
tree | dd05735207cada3ebd0d71d889e99d03a85c0267 /gcc/gimplify-me.c | |
parent | 82990836679f1972141a2f93666bd6d39323a435 (diff) | |
download | gcc-4852c3266ec0887316b9fbbb106b8540e3e948d6.zip gcc-4852c3266ec0887316b9fbbb106b8540e3e948d6.tar.gz gcc-4852c3266ec0887316b9fbbb106b8540e3e948d6.tar.bz2 |
remove almost all users of gimple_expr_code
This replaces the old-school gimple_expr_code with more selective
functions throughout the compiler, in all cases making the code
shorter or more clear.
2020-11-13 Richard Biener <rguenther@suse.de>
* cfgexpand.c (gimple_assign_rhs_to_tree): Use
gimple_assign_rhs_class.
(expand_gimple_stmt_1): Likewise.
* gimplify-me.c (gimple_regimplify_operands): Use
gimple_assign_single_p.
* ipa-icf-gimple.c (func_checker::compare_gimple_assign):
Remove redundant compare.
(func_checker::compare_gimple_cond): Use gimple_cond_code.
* tree-ssa-tail-merge.c (gimple_equal_p): Likewise.
* predict.c (predict_loops): Use gimple_assign_rhs_code.
Diffstat (limited to 'gcc/gimplify-me.c')
-rw-r--r-- | gcc/gimplify-me.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/gimplify-me.c b/gcc/gimplify-me.c index 47148fb..ee84c8b 100644 --- a/gcc/gimplify-me.c +++ b/gcc/gimplify-me.c @@ -230,10 +230,8 @@ gimple_regimplify_operands (gimple *stmt, gimple_stmt_iterator *gsi_p) if (i == 1 && (is_gimple_call (stmt) || is_gimple_assign (stmt))) gimplify_expr (&op, &pre, NULL, is_gimple_lvalue, fb_lvalue); else if (i == 2 - && is_gimple_assign (stmt) - && num_ops == 2 - && get_gimple_rhs_class (gimple_expr_code (stmt)) - == GIMPLE_SINGLE_RHS) + && gimple_assign_single_p (stmt) + && num_ops == 2) gimplify_expr (&op, &pre, NULL, rhs_predicate_for (gimple_assign_lhs (stmt)), fb_rvalue); @@ -255,10 +253,8 @@ gimple_regimplify_operands (gimple *stmt, gimple_stmt_iterator *gsi_p) { bool need_temp = false; - if (is_gimple_assign (stmt) - && num_ops == 2 - && get_gimple_rhs_class (gimple_expr_code (stmt)) - == GIMPLE_SINGLE_RHS) + if (gimple_assign_single_p (stmt) + && num_ops == 2) gimplify_expr (gimple_assign_rhs1_ptr (stmt), &pre, NULL, rhs_predicate_for (gimple_assign_lhs (stmt)), fb_rvalue); |