missing_error_code: introduce new check
[smatch.git] / Documentation / TODO.md
blobe2043e481f9975367f386c4d1346ab558e250ec4
1 TODO
2 ====
4 Essential
5 ---------
6 * SSA is broken by simplify_loads() & branches rewriting/simplification
7 * attributes of struct, union & enums are ignored (and possibly in other
8   cases too).
9 * add support for bitwise enums
11 Documentation
12 -------------
13 * document the extensions
14 * document the API
15 * document the limitations of modifying ptrlists during list walking
16 * document the data structures
17 * document flow of data / architecture / code structure
19 Core
20 ----
21 * if a variable has its address taken but in an unreachable BB then
22   its MOD_ADDRESSABLE may be wrong and it won't be SSA converted.
23   - let kill_insn() check killing of SYMADDR,
24   - add the sym into a list and
25   - recalculate the addressability before memops's SSA conversion
26 * bool_ctype should be split into internal 1-bit / external 8-bit
28 Testsuite
29 ---------
30 * there are more than 50 failing tests. They should be fixed
31   (but most are non-trivial to fix).
33 Misc
34 ----
35 * GCC's -Wenum-compare / clangs's -Wenum-conversion -Wassign-enum
36 * parse __attribute_((fallthrough))
37 * add support for format(printf())  (WIP by Ben Dooks)
38 * make use of UNDEFs (issues warnings, simplification, ... ?)
39 * add a pass to inline small functions during simplification.
41 Optimization
42 ------------
43 * the current way of doing CSE uses a lot of time
44 * add SSA based DCE
45 * add SSA based PRE
46 * Add SSA based SCCP
47 * use better/more systematic use of internal verification framework
51 * OP_SET should return a bool, always
52 * add IR instructions for va_arg() & friends
53 * add a possibility to import of file in "IR assembly"
54 * dump the symtable
55 * dump the CFG
57 LLVM
58 ----
59 * fix ...
61 Internal backends
62 -----------------
63 * add some basic register allocation
64 * add a pass to transform 3-addresses code to 2-addresses
65 * what can be done for x86?
67 Longer term/to investigate
68 --------------------------
69 * better architecture handling than current machine.h + target.c
70 * attributes are represented as ctypes's alignment, modifiers & contexts
71   but plenty of attributes doesn't fit, for example they need arguments.
72   * format(printf, ...),
73   * section("...")
74   * assume_aligned(alignment[, offsert])
75   * error("message"), warning("message")
76   * ...
77 * should support "-Werror=..." ?
78 * All warning messages should include the option how to disable it.
79   For example:
81         "warning: Variable length array is used."
83   should be something like:
85         "warning: Variable length array is used. (-Wno-vla)"
87 * ptrlists must not have elements removed while being iterated;
88   this should somehow be enforced.
89 * having 'struct symbol' used to represent symbols *and* types is
90   quite handy but it also creates lots of problems and complications
91 * Possible mixup of symbol for a function designator being not a pointer?
92   This seems to make evaluation of function pointers much more complex
93   than needed.
94 * extend test-inspect to inspect more AST fields.
95 * extend test-inspect to inspect instructions.