smatch_data/kernel.clears_argument: add more functions
[smatch.git] / Documentation / TODO.md
blob3f00bb1104d139dfb85cc7511cea0744ebf5194c
1 TODO
2 ====
4 Essential
5 ---------
6 * SSA is broken by simplify_loads() & branches rewriting/simplification
7 * add support for bitwise enums (wip)
9 Documentation
10 -------------
11 * document the API
12 * document the limitations of modifying ptrlists during list walking
13 * document the data structures
14 * document flow of data / architecture / code structure
16 Core
17 ----
18 * if a variable has its address taken but in an unreachable BB then
19   its MOD_ADDRESSABLE may be wrong and it won't be SSA converted.
20   - let kill_insn() check killing of SYMADDR,
21   - add the sym into a list and
22   - recalculate the addressability before memops's SSA conversion
23 * bool_ctype should be split into internal 1-bit / external 8-bit
25 Testsuite
26 ---------
27 * there are 60 failing tests. They should be fixed
28   (but most are non-trivial to fix).
30 Misc
31 ----
32 * GCC's -Wenum-compare / clangs's -Wenum-conversion -Wassign-enum
33 * parse __attribute_((fallthrough))
34 * add support for format(printf())  (WIP by Ben Dooks)
35 * make use of UNDEFs (issues warnings, simplification, ... ?)
36 * make memory accesses more explicit: add EXPR_ACCESS (wip)
37 * it would be nice to do our own parsing of floating point (wip)
38 * some header files needed for crypto/ need __vector or __fp16
39 * some even need __complex
41 Optimization
42 ------------
43 * a lot of small simplifications are waiting to be upstreamed
44 * the domtree need to be rebuilt (or updated)
45 * critical edges need to be split
46 * the current way of doing CSE uses a lot of time
47 * add SSA based DCE
48 * add SSA based PRE
49 * Add SSA based SCCP
50 * add a pass to inline small functions during simplification.
51 * use better/more systematic use of internal verification framework
52 * tracking of operands size should be improved (WIP)
53 * OP_INLINE is sometimes in the way
54 * would be nice to strictly separate phases that don't changes the
55   CFG and thus the dominance tree.
59 * OP_SET should return a bool, always
60 * add IR instructions for va_arg() & friends
61 * add a possibility to import of file in "IR assembly"
62 * dump the symtable
63 * dump the CFG
65 LLVM
66 ----
67 * fix ...
69 Internal backends
70 -----------------
71 * it would be nice the upstream the code generator
72 * add a pass to transform 3-addresses code to 2-addresses
73 * add some basic register allocation
74 * add a pass to order the BBs and changes 2-ways CBR into one-way branches
75 * what can be done for x86?
76 * add support to add constraints in the MD rules
78 Longer term/to investigate
79 --------------------------
80 * attributes are represented as ctypes's alignment, modifiers & contexts
81   but plenty of attributes doesn't fit, for example they need arguments.
82   * format(printf, ...),
83   * section("...")
84   * assume_aligned(alignment[, offsert])
85   * error("message"), warning("message")
86   * ...
87 * should support "-Werror=..." ?
88 * All warning messages should include the option how to disable it.
89   For example:
91         "warning: Variable length array is used."
93   should be something like:
95         "warning: Variable length array is used. (-Wno-vla)"
97 * ptrlists must not have elements removed while being iterated;
98   this should somehow be enforced.
99 * having 'struct symbol' used to represent symbols *and* types is
100   quite handy but it also creates lots of problems and complications
101 * Possible mixup of symbol for a function designator being not a pointer?
102   This seems to make evaluation of function pointers much more complex
103   than needed.
104 * extend test-inspect to inspect more AST fields.
105 * extend test-inspect to inspect instructions.