1TODO 2==== 3 4Essential 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 10 11Documentation 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 18 19Core 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 27* Previous declarations and the definition need to be merged. For example, 28 in the code here below, the function definition is **not** static: 29 ``` 30 static void foo(void); 31 void foo(void) { ... } 32 ``` 33 34Testsuite 35-------- 36* there are more than 50 failing tests. They should be fixed 37 (but most are non-trivial to fix). 38 39Misc 40---- 41* GCC's -Wenum-compare / clangs's -Wenum-conversion -Wassign-enum 42* parse __attribute_((fallthrough)) 43* add support for __builtin_unreachable() 44* add support for format(printf()) (WIP by Ben Dooks) 45* make use of UNDEFs (issues warnings, simplification, ... ?) 46* add a pass to inline small functions during simplification. 47 48Optimization 49------------ 50* the current way of doing CSE uses a lot of time 51* add SSA based DCE 52* add SSA based PRE 53* Add SSA based SCCP 54* use better/more systematic use of internal verification framework 55 56IR 57-- 58* OP_SET should return a bool, always 59* add IR instructions for va_arg() & friends 60* add a possibility to import of file in "IR assembly" 61* dump the symtable 62* dump the CFG 63 64LLVM 65---- 66* fix ... 67 68Internal backends 69----------------- 70* add some basic register allocation 71* add a pass to transform 3-addresses code to 2-addresses 72* what can be done for x86? 73 74Longer term/to investigate 75-------------------------- 76* better architecture handling than current machine.h + target.c 77* attributes are represented as ctypes's alignment, modifiers & contexts 78 but plenty of attributes doesn't fit, for example they need arguments. 79 * format(printf, ...), 80 * section("...") 81 * assume_aligned(alignment[, offsert]) 82 * error("message"), warning("message") 83 * ... 84* should support "-Werror=..." ? 85* All warning messages should include the option how to disable it. 86 For example: 87 "warning: Variable length array is used." 88 should be something like: 89 "warning: Variable length array is used. (-Wno-vla)" 90* ptrlists must have elements be removed while being iterated but this 91 is hard to insure it is not done. 92* having 'struct symbol' used to represent symbols *and* types is 93 quite handy but it also creates lots of problems and complications 94* Possible mixup of symbol for a function designator being not a pointer? 95 This seems to make evaluation of function pointers much more complex 96 than needed. 97* extend test-inspect to inspect more AST fields. 98* extend test-inspect to inspect instructions. 99