summaryrefslogtreecommitdiffstats
path: root/opt.c
Commit message (Collapse)AuthorAgeFilesLines
* Include what I useTavian Barnes2020-11-121-0/+2
| | | | Thanks to https://github.com/include-what-you-use/include-what-you-use
* opt: Assert that we don't do disabled optimizationsTavian Barnes2020-11-101-0/+2
|
* opt: Predicates aren't true when they're falseTavian Barnes2020-11-091-2/+2
| | | | | | | | | | | | 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
* opt: Check optlevel before removing unreachable expressionsTavian Barnes2020-11-091-2/+4
|
* Use two newlines for all pre-eval warningsTavian Barnes2020-11-091-1/+1
|
* Rename struct cmdline to bfs_ctxTavian Barnes2020-09-271-38/+39
| | | | | The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.
* bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmaskTavian Barnes2020-07-291-2/+2
|
* opt: Warn when no side effects are reachableTavian Barnes2020-06-071-4/+4
|
* opt: Dump the command line before optimizing with -D optTavian Barnes2020-06-071-0/+2
|
* parse: Prohibit actions inside -excludeTavian Barnes2020-06-071-0/+4
|
* Implement -exclude, a special form for convenient exclusionsTavian Barnes2020-06-071-14/+43
| | | | Fixes #8.
* opt: Make sure facts_when_impure sees *all* impure literalsTavian Barnes2020-06-071-2/+4
|
* diag: Unify debug printingTavian Barnes2020-06-021-68/+51
|
* opt: Add missing #include <unistd.h>Tavian Barnes2020-05-221-0/+1
|
* opt: Track data flow information about predicatesTavian Barnes2020-05-221-23/+174
| | | | | | | | | | This allows us to optimize things like -sparse -o -not -sparse <==> -true and -sparse -a -not -sparse <==> -false
* opt: Avoid dangling pointers in de_morgan()Tavian Barnes2020-03-231-5/+7
| | | | | | | | 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.
* Release 1.41.4Tavian Barnes2019-04-151-1/+1
|
* opt: Optimize redundant comma expressionsTavian Barnes2019-03-211-3/+5
|
* opt: Replace -a -false/-o -true with -not when possibleTavian Barnes2019-03-201-0/+17
|
* Add some documentation commentsTavian Barnes2019-02-091-0/+25
|
* opt: Optimize -samefile together with -inumTavian Barnes2019-02-041-0/+9
|
* opt: Apply data flow optimizations to more numeric rangesTavian Barnes2019-02-011-79/+208
|
* color: Check format strings + args for cfprintf()Tavian Barnes2019-01-021-1/+1
| | | | | | %{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.
* Update copyright datesTavian Barnes2018-09-241-1/+1
|
* opt: Re-run optimizations after reordering expressionsTavian Barnes2018-08-181-24/+57
| | | | | This catches new data flow inferences that can be made after swapping the children of an expression.
* Keep track of required FDs per-exprTavian Barnes2017-12-151-0/+13
|
* opt: More -O4 tweaksTavian Barnes2017-09-171-24/+15
|
* opt: Use the standard LLONG_MAX instead of the nonstandard LONG_LONG_MAXTavian Barnes2017-09-171-1/+1
|
* opt: Fix -depth with arguments bigger than INT_MAXTavian Barnes2017-09-171-4/+8
|
* opt: Move some aggressive optimizations back to -O4Tavian Barnes2017-09-171-10/+18
|
* opt: Have data flow analysis respect always_{true,false}Tavian Barnes2017-09-171-6/+21
|
* opt: Implement some data flow optimizationsTavian Barnes2017-09-161-108/+322
|
* opt: Separate optimization from parsingTavian Barnes2017-09-161-0/+410