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