summaryrefslogtreecommitdiffstats
path: root/src/opt.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-12-05 14:18:53 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-12-05 14:18:53 -0500
commitd1e532ed839c1b2be093c88006fcf4cd3d11805d (patch)
tree192167ec829c5dbd4e73bc5abce535127c481343 /src/opt.c
parentd6a1b97b0eece42bb18a171ccdfcec7082d5f2d0 (diff)
downloadbfs-d1e532ed839c1b2be093c88006fcf4cd3d11805d.tar.xz
expr: Rename bfs_expr_has_children() to _is_parent()
Diffstat (limited to 'src/opt.c')
-rw-r--r--src/opt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/opt.c b/src/opt.c
index 441c611..56d4102 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -847,7 +847,7 @@ static struct bfs_expr *optimize_expr_recursive(struct opt_state *state, struct
return ret;
}
- if (!bfs_expr_has_children(expr) && !expr->pure) {
+ if (!bfs_expr_is_parent(expr) && !expr->pure) {
facts_union(state->facts_when_impure, state->facts_when_impure, &state->facts);
}
@@ -901,7 +901,7 @@ static struct bfs_expr *optimize_expr_recursive(struct opt_state *state, struct
return NULL;
}
- if (bfs_expr_has_children(expr)) {
+ if (bfs_expr_is_parent(expr)) {
struct bfs_expr *lhs = expr->lhs;
struct bfs_expr *rhs = expr->rhs;
if (rhs) {
@@ -980,7 +980,7 @@ static bool reorder_expr(const struct opt_state *state, struct bfs_expr *expr, f
* Whether any subexpression was reordered.
*/
static bool reorder_expr_recursive(const struct opt_state *state, struct bfs_expr *expr) {
- if (!bfs_expr_has_children(expr)) {
+ if (!bfs_expr_is_parent(expr)) {
return false;
}