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/cfgexpand.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/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b2d8685..1b7bdbc 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -103,7 +103,7 @@ tree gimple_assign_rhs_to_tree (gimple *stmt) { tree t; - switch (get_gimple_rhs_class (gimple_expr_code (stmt))) + switch (gimple_assign_rhs_class (stmt)) { case GIMPLE_TERNARY_RHS: t = build3 (gimple_assign_rhs_code (stmt), @@ -3741,11 +3741,10 @@ expand_gimple_stmt_1 (gimple *stmt) of binary assigns must be a gimple reg. */ if (TREE_CODE (lhs) != SSA_NAME - || get_gimple_rhs_class (gimple_expr_code (stmt)) - == GIMPLE_SINGLE_RHS) + || gimple_assign_rhs_class (assign_stmt) == GIMPLE_SINGLE_RHS) { tree rhs = gimple_assign_rhs1 (assign_stmt); - gcc_assert (get_gimple_rhs_class (gimple_expr_code (stmt)) + gcc_assert (gimple_assign_rhs_class (assign_stmt) == GIMPLE_SINGLE_RHS); if (gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (rhs) /* Do not put locations on possibly shared trees. */ |