summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-05-22 12:20:10 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-05-22 12:49:18 -0400
commit305ee902874b49351f4916e303c293523f11570b (patch)
treebd3e3d479d855cd0cad7fab1ff23b53ad7481b44 /parse.c
parenta3a9a2ed41394c7ae9a1e5f57b0379b2c3a564d0 (diff)
downloadbfs-305ee902874b49351f4916e303c293523f11570b.tar.xz
opt: Track data flow information about predicates
This allows us to optimize things like -sparse -o -not -sparse <==> -true and -sparse -a -not -sparse <==> -false
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index d5c0128..8269d22 100644
--- a/parse.c
+++ b/parse.c
@@ -1759,7 +1759,7 @@ static struct expr *parse_nogroup(struct parser_state *state, int arg1, int arg2
struct expr *expr = parse_nullary_test(state, eval_nogroup);
if (expr) {
- expr->cost = 9000.0;
+ expr->cost = STAT_COST;
expr->probability = 0.01;
}
return expr;
@@ -1793,7 +1793,7 @@ static struct expr *parse_nouser(struct parser_state *state, int arg1, int arg2)
struct expr *expr = parse_nullary_test(state, eval_nouser);
if (expr) {
- expr->cost = 9000.0;
+ expr->cost = STAT_COST;
expr->probability = 0.01;
}
return expr;