diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-05-22 12:20:10 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-05-22 12:49:18 -0400 |
commit | 305ee902874b49351f4916e303c293523f11570b (patch) | |
tree | bd3e3d479d855cd0cad7fab1ff23b53ad7481b44 /parse.c | |
parent | a3a9a2ed41394c7ae9a1e5f57b0379b2c3a564d0 (diff) | |
download | bfs-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |