diff options
| -rw-r--r-- | Documentation/TODO.md | 98 | ||||
| -rw-r--r-- | Documentation/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/project-ideas.md | 51 |
3 files changed, 99 insertions, 52 deletions
diff --git a/Documentation/TODO.md b/Documentation/TODO.md new file mode 100644 index 00000000..cbda1c39 --- /dev/null +++ b/Documentation/TODO.md @@ -0,0 +1,98 @@ +TODO +==== + +Essential +--------- +* SSA is broken by simplify_loads() & branches rewriting/simplification +* attributes of struct, union & enums are ignored (and possibly in other + cases too). +* add support for bitwise enums + +Documentation +------------- +* document the extensions +* document the API +* document the limitations of modifying ptrlists during list walking +* document the data structures +* document flow of data / architecture / code structure + +Core +---- +* if a variable has its address taken but in an unreachable BB then + its MOD_ADDRESSABLE may be wrong and it won't be SSA converted. + - let kill_insn() check killing of SYMADDR, + - add the sym into a list and + - recalculate the addressability before memops's SSA conversion +* bool_ctype should be split into internal 1-bit / external 8-bit +* Previous declarations and the definition need to be merged. For example, + in the code here below, the function definition is **not** static: + ``` + static void foo(void); + void foo(void) { ... } + ``` + +Testsuite +-------- +* there are more than 50 failing tests. They should be fixed + (but most are non-trivial to fix). + +Misc +---- +* GCC's -Wenum-compare / clangs's -Wenum-conversion -Wassign-enum +* parse __attribute_((fallthrough)) +* add support for __builtin_unreachable() +* add support for format(printf()) (WIP by Ben Dooks) +* make use of UNDEFs (issues warnings, simplification, ... ?) +* add a pass to inline small functions during simplification. + +Optimization +------------ +* the current way of doing CSE uses a lot of time +* add SSA based DCE +* add SSA based PRE +* Add SSA based SCCP +* use better/more systematic use of internal verification framework + +IR +-- +* OP_SET should return a bool, always +* add IR instructions for va_arg() & friends +* add a possibility to import of file in "IR assembly" +* dump the symtable +* dump the CFG + +LLVM +---- +* fix ... + +Internal backends +----------------- +* add some basic register allocation +* add a pass to transform 3-addresses code to 2-addresses +* what can be done for x86? + +Longer term/to investigate +-------------------------- +* better architecture handling than current machine.h + target.c +* attributes are represented as ctypes's alignment, modifiers & contexts + but plenty of attributes doesn't fit, for example they need arguments. + * format(printf, ...), + * section("...") + * assume_aligned(alignment[, offsert]) + * error("message"), warning("message") + * ... +* should support "-Werror=..." ? +* All warning messages should include the option how to disable it. + For example: + "warning: Variable length array is used." + should be something like: + "warning: Variable length array is used. (-Wno-vla)" +* ptrlists must have elements be removed while being iterated but this + is hard to insure it is not done. +* having 'struct symbol' used to represent symbols *and* types is + quite handy but it also creates lots of problems and complications +* Possible mixup of symbol for a function designator being not a pointer? + This seems to make evaluation of function pointers much more complex + than needed. +* extend test-inspect to inspect more AST fields. +* extend test-inspect to inspect instructions. diff --git a/Documentation/index.rst b/Documentation/index.rst index 9825c8cd..f8ca0dce 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -30,7 +30,7 @@ How to contribute :maxdepth: 1 submitting-patches - project-ideas + TODO Indices and tables ================== diff --git a/Documentation/project-ideas.md b/Documentation/project-ideas.md deleted file mode 100644 index bff5f3d6..00000000 --- a/Documentation/project-ideas.md +++ /dev/null @@ -1,51 +0,0 @@ -Why hacking on sparse -===================== - -1. sparse is small. - The full project compiles in less than 10 seconds on old and not performing laptop. -2. sparse is fast. - Typically, sparse can check a C file 1/10 of time it takes for gcc to generate object files. -3. sparse can digest the full kernel source files. - With sparse-llvm, sparse uses llvm as back end to emit real machine code. - -New developer hacking on sparse ------------------------------- - -* All sparse warning messages should include the option how - to disable it. - e.g. "pre-process.c:20*:28: warning: Variable length array is used." - should be something like - "pre-process.c:20*:28: warning: Variable length array is -used. (-Wno-vla)" -* extend test-inspect to inspect more AST fields. -* extend test-inspect to inspect instructions. -* adding architecture handling in sparse similar to cgcc -* parallel processing of test-suite -* Howto: fix the kernel rcu related checker warnings -* option to disable AST level inline. -* debug: debug version of sparse do all the verification double check -* test suite: verify and compare IR (suggested by Dibyendu Majumdar) -* checker error output database - -For experienced developers --------------------------- - -* merge C type on incremental declare of C type and function prototype. -* move attribute out of ctype to allow easier to add new attribute. -* serialize, general object walking driven by data structures. -* serialize, write sparse byte code into file -* serialize, load sparse byte code from file. -* symbol index/linker, know which symbol in which byte code file. -* inline function in instruction level -* cross function checking -* debug: optimization step by step log -* debug: fancy animation of CFG -* phi node location (Luc has patch) -* revisit crazy programmer warning, invalid SSA form. -* ptrlist, looping while modify inside the loop. -* dead code elimination using ssa -* constant propagation using ssa. -* x86/arm back end instruction set define -* register allocation. -* emit x86/arm machine level code - |
