summaryrefslogtreecommitdiffstats
path: root/opt.c
AgeCommit message (Collapse)Author
2020-11-10opt: Assert that we don't do disabled optimizationsTavian Barnes
2020-11-09opt: Predicates aren't true when they're falseTavian Barnes
This unfortunate typo was mostly harmless; since the predicates were always assumed to be true, they wouldn't conflict. The exception is -user/-group, which set -nouser/-nogroup to false for users/groups that exist. Even -O0 wasn't enough to suppress the bug, due to a missing optlevel check fixed in the previous commit. Fixes: 305ee902874b49351f4916e303c293523f11570b
2020-11-09opt: Check optlevel before removing unreachable expressionsTavian Barnes
2020-11-09Use two newlines for all pre-eval warningsTavian Barnes
2020-09-27Rename struct cmdline to bfs_ctxTavian Barnes
The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.
2020-07-29bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmaskTavian Barnes
2020-06-07opt: Warn when no side effects are reachableTavian Barnes
2020-06-07opt: Dump the command line before optimizing with -D optTavian Barnes
2020-06-07parse: Prohibit actions inside -excludeTavian Barnes
2020-06-07Implement -exclude, a special form for convenient exclusionsTavian Barnes
Fixes #8.
2020-06-07opt: Make sure facts_when_impure sees *all* impure literalsTavian Barnes
2020-06-02diag: Unify debug printingTavian Barnes
2020-05-22opt: Add missing #include <unistd.h>Tavian Barnes
2020-05-22opt: Track data flow information about predicatesTavian Barnes
This allows us to optimize things like -sparse -o -not -sparse <==> -true and -sparse -a -not -sparse <==> -false
2020-03-23opt: Avoid dangling pointers in de_morgan()Tavian Barnes
If optimize_{and,or}_expr() relocates expr, we need to update the parent expr or else we might return garbage. It seems impossible to actually trigger this bug right now, since the {and,or} optimizations are symmetric, but it could be hit if the simplifications in de_morgan() expose more information than was known previously.
2019-04-15Release 1.41.4Tavian Barnes
2019-03-21opt: Optimize redundant comma expressionsTavian Barnes
2019-03-20opt: Replace -a -false/-o -true with -not when possibleTavian Barnes
2019-02-09Add some documentation commentsTavian Barnes
2019-02-04opt: Optimize -samefile together with -inumTavian Barnes
2019-02-01opt: Apply data flow optimizations to more numeric rangesTavian Barnes
2019-01-02color: Check format strings + args for cfprintf()Tavian Barnes
%{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings.
2018-09-24Update copyright datesTavian Barnes
2018-08-18opt: Re-run optimizations after reordering expressionsTavian Barnes
This catches new data flow inferences that can be made after swapping the children of an expression.
2017-12-15Keep track of required FDs per-exprTavian Barnes
2017-09-17opt: More -O4 tweaksTavian Barnes
2017-09-17opt: Use the standard LLONG_MAX instead of the nonstandard LONG_LONG_MAXTavian Barnes
2017-09-17opt: Fix -depth with arguments bigger than INT_MAXTavian Barnes
2017-09-17opt: Move some aggressive optimizations back to -O4Tavian Barnes
2017-09-17opt: Have data flow analysis respect always_{true,false}Tavian Barnes
2017-09-16opt: Implement some data flow optimizationsTavian Barnes
2017-09-16opt: Separate optimization from parsingTavian Barnes