Add another TODO: sigh
[oota-llvm.git] / docs / ChrisNotes.txt
1 * Need to implement getelementptr, load, and store for indirection through
2   arrays and multidim arrays
3 * BytecodeWriter should use a deque<unsigned char> instead of vector!!!
4 * Eliminate the method signature from a call instruction.  It should look like
5   this: call int %func(int 2, int %reg118)
6 * Indirect calls should use the icall instruction
7 * Rewrite the llvm parser/lexer in http://www.antlr.org when time permits.
8   They actually do C++.  Imagine that.
9 * Need to implement constant propogation of cast instructions!
10 * Fix DCE to elminate br <c>, %L1, %L1 so that it can optimize the main of
11   fib.ll better.  Currently I have to do this to get best results:
12      as < fib.ll | opt -inline -sccp -dce -sccp -dce |dis
13 * Fix DCE to work better, so that SCCP can show it's true value.
14 * Implement ADCE
15 * Fix the const pool printer to print out constants in some sort of "sorted"
16   order.  Then enable TestOptimizer.sh to diff -sccp output.  Currently it 
17   doesn't work because the diff fails because of ordering of the constant 
18   pool. :(
19 * Maybe ConstantPool objects should keep themselves sorted as things are 
20   inserted.
21 * Enable DoConstantPoolMerging to do trivial DCE of constant values.
22 * Should provide "castTerminator, castPHI, etc" functions in Instruction, and
23   similar functions in other classes, that effectively do dynamic casts.  This
24   would allow code like this:
25     if (I->isTerminator()) {
26       TerminatorInst *TI = (TerminatorInst*)I;
27       ...
28     }
29   to be written as:
30     if (TerminatorInst *TI = I->castTerminatorInst()) {
31        ...
32     }
33 * Think about whether edge split SSA form would be useful to do.
34 * Inlining should attempt to give block names the same name in the inlined 
35   method (using SymbolTable::getUniqueName)
36 * The dropAllReferences code can be a noop when NDEBUG!!!
37 * Finish xvcg output
38 * pred/succ iterators on basic blocks don't handle switch statements correctly
39 * Provide a pass that eliminates critical edges from the CFG
40 * Provide a print pass to print out xvcg format files for vis
41 * I need to provide an option to the bytecode loader to ignore memory 
42   dependance edges.  Instead, the VM would just treat memory operations 
43   (load, store, getfield, putfield, call) as pinned instructions.
44 * I need to have a way to prevent taking the address of a constant pool
45   reference.  You should only be able to take the address of a variable.
46   Maybe taking the address of a constant copies it?  What about virtual 
47   function tables?  Maybe a const pointer would be better...
48 * Need a way to attach bytecode block info at various levels of asm code.
49 * Need to be able to inflate recursive types.  %x = { *%x }, %x = %x ()
50 * Recognize and save comments in assembly and bytecode format
51 * Encode line number table in bytecode (like #line), optional table
52
53 * Encode negative relative offsets in the bytecode file
54
55 * Implement switch to switch on a constant pool array of type: 
56   [{ label, int }] or [label]   (lookup vs index switch)
57 * Apparently bison has a %pure_parser option.  Maybe useful for Assembly/Parser
58
59 * Implement a header file that can read either assembly or bytecode, implement 
60   a writer that can output either based on what is read with this reader..
61 * Implement the following derived types:
62   * pointer                          int *
63   * "packed format", like this:    [4 x sbyte]: Packed SIMD datatype
64 * Maybe 'tailcall' also?
65 * Include a method level bytecode block that defines a mapping between values 
66   and registers that defines a minimally register allocated code.  This can
67   make me finally address how to encode extensions in assembly.
68 * Bytecode reader should use extensions that may or may not be linked into the
69   application to read blocks.  Thus an easy way to ignore symbol table info
70   would be to not link in that reader into the app.