1TODO 2==== 3 4Essential 5--------- 6* SSA is broken by simplify_loads() & branches rewriting/simplification 7* add support for bitwise enums (wip) 8 9Documentation 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 15 16Core 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 24 25Testsuite 26--------- 27* there are 60 failing tests. They should be fixed 28 (but most are non-trivial to fix). 29 30Misc 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 40 41Optimization 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. 56 57IR 58-- 59* pseudos are untyped, it's usually OK but often it complicates things: 60 61 - PSEUDO_REGs are defined by instructions and their type is normally 62 retrievable via this defining instruction but in some cases they're not: 63 for example, pseudos defined by ASM output. 64 - PSEUDO_ARGs are considered as defined by OP_ENTRY and are used like 65 this for liveness trackability but their type can't simply be 66 retrieved via this instruction like PSEUDO_REGs are (with ->def->type). 67 - PSEUDO_VALs are completely typeless. 68 69 Maybe a few bits should be used to store some kind of low-level type. 70* OP_SET should return a bool, always 71* add IR instructions for va_arg() & friends 72* add a possibility to import of file in "IR assembly" 73* dump the symtable 74* dump the CFG 75 76LLVM 77---- 78* fix ... 79 80Internal backends 81----------------- 82* it would be nice the upstream the code generator 83* add a pass to transform 3-addresses code to 2-addresses 84* add some basic register allocation 85* add a pass to order the BBs and changes 2-ways CBR into one-way branches 86* what can be done for x86? 87* add support to add constraints in the MD rules 88 89Longer term/to investigate 90-------------------------- 91* attributes are represented as ctypes's alignment, modifiers & contexts 92 but plenty of attributes doesn't fit, for example they need arguments. 93 * format(printf, ...), 94 * section("...") 95 * assume_aligned(alignment[, offsert]) 96 * error("message"), warning("message") 97 * ... 98* should support "-Werror=..." ? 99* All warning messages should include the option how to disable it. 100 For example: 101 102 "warning: Variable length array is used." 103 104 should be something like: 105 106 "warning: Variable length array is used. (-Wno-vla)" 107 108* ptrlists must not have elements removed while being iterated; 109 this should somehow be enforced. 110* having 'struct symbol' used to represent symbols *and* types is 111 quite handy but it also creates lots of problems and complications 112* Possible mixup of symbol for a function designator being not a pointer? 113 This seems to make evaluation of function pointers much more complex 114 than needed. 115* extend test-inspect to inspect more AST fields. 116* extend test-inspect to inspect instructions. 117