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