| 1 |
-*- mode: Text -*- |
| 2 |
|
| 3 |
-------------------------------------------------------------------- |
| 4 |
|
| 5 |
C-Reduce pre-release list: |
| 6 |
|
| 7 |
- make sure copyright years are up to date |
| 8 |
- test on Windows, Linux, OS X |
| 9 |
|
| 10 |
-------------------------------------------------------------------- |
| 11 |
|
| 12 |
C-Reduce TODO list: |
| 13 |
|
| 14 |
CMake: |
| 15 |
make creduce from creduce.in at build time, not configure time |
| 16 |
|
| 17 |
turn |
| 18 |
if (foo) goto bar; baz; bar: |
| 19 |
into |
| 20 |
if (!foo) baz |
| 21 |
|
| 22 |
reduce try-catch |
| 23 |
|
| 24 |
it would be nice to have a way to glue multiple C/C++ files into a |
| 25 |
single compilation unit, as an alternative to multi-file reduction |
| 26 |
- CIL can do this but it's pretty invasive |
| 27 |
|
| 28 |
testing via lit |
| 29 |
|
| 30 |
make llvm-svn-compatible build against a specific LLVM version |
| 31 |
the CI is the problem here |
| 32 |
could solve it like we do in Souper with a pre-built LLVM tarball |
| 33 |
|
| 34 |
add modes for Rust and Javascript |
| 35 |
|
| 36 |
add optional pass timeout? |
| 37 |
|
| 38 |
more shortcut keys? |
| 39 |
|
| 40 |
constant folding |
| 41 |
|
| 42 |
partial #define processing |
| 43 |
|
| 44 |
remove zero-length files at the end of reduction? |
| 45 |
|
| 46 |
in localize_headers, correctly deal with the case where the |
| 47 |
original C/C++ file is in the current dir |
| 48 |
|
| 49 |
specify passes using a config file? |
| 50 |
|
| 51 |
maybe implement passes to: |
| 52 |
ensure that identifiers first appear in sorted order |
| 53 |
identifiers are dense |
| 54 |
reduce the non-header-file part first, and use PCHs |
| 55 |
merge adjacent strings |
| 56 |
|
| 57 |
consider re-implementing caching |
| 58 |
|
| 59 |
maybe add a format string reduction pass that eliminates a format |
| 60 |
specifier and also the corresponding argument |
| 61 |
|
| 62 |
write some documentation about creating a c-reduce pass: side effects, |
| 63 |
directory restrictions, etc. |
| 64 |
|
| 65 |
Konstantin suggestion: |
| 66 |
deal with un-preprocessed code in a smart way, for example by |
| 67 |
incrementally preprocessing files from inside c-reduce |
| 68 |
|
| 69 |
implement suggestion from Joerg Sonnenberger: |
| 70 |
do transformations in chunks, like the line-reducer pass already does |
| 71 |
requires a good model of when this will be profitable |
| 72 |
|
| 73 |
-------------------------------------------------------------------- |
| 74 |
|
| 75 |
clang_delta TODO list: |
| 76 |
|
| 77 |
keep working to eliminate template stuff |
| 78 |
|
| 79 |
replace for-loops with expressions guessed from initializers |
| 80 |
guess that it executes 0 and 1 times |
| 81 |
|
| 82 |
change operators to other operators, e.g., replace / with + |
| 83 |
|
| 84 |
- From Konstantin Tokarev |
| 85 |
|
| 86 |
As you may know, there is a clang-based tool "Include What You Use" |
| 87 |
[1]. I think similar approach could be useful in C-Reduce to remove |
| 88 |
whole header files instead of separate lines. Though I'm not sure it's |
| 89 |
feasible without non-preprocessed source file and compilation command |
| 90 |
line available. |
| 91 |
|
| 92 |
I can imagine the next algorithm of reduction: |
| 93 |
|
| 94 |
1. Reduce only the last section of translation unit corresponding to |
| 95 |
original source file without #includes using all available passes. |
| 96 |
2. Try to remove sections corresponding to "unused" headers |
| 97 |
3. Move to section N-1 and proceed. |
| 98 |
|
| 99 |
Assuming that "interesting" fragment of code is located in sections |
| 100 |
with big numbers (source file and local headers) while first sections |
| 101 |
contain library headers, this approach might be more efficient than |
| 102 |
traditional line-based reduction. |
| 103 |
|
| 104 |
[1] http://code.google.com/p/include-what-you-use |
| 105 |
|
| 106 |
- (low priority) format string reductions: |
| 107 |
|
| 108 |
* remove anything that's not a %d or whatever from the format string |
| 109 |
|
| 110 |
* remove a %d directive and also the corresponding argument from a printf |
| 111 |
|
| 112 |
- (low priority) constant-propagation |
| 113 |
|
| 114 |
- (low priority) replace peephole passes in c_reduce |
| 115 |
|
| 116 |
-------------------------------------------------------------------- |