1 * Fix DCE to elminate br <c>, %L1, %L1 so that it can optimize the main of
2 fib.ll better. Currently I have to do this to get best results:
3 as < fib.ll | opt -inline -sccp -dce -sccp -dce |dis
4 * Fix DCE to work better, so that SCCP can show it's true value.
6 * Fix the const pool printer to print out constants in some sort of "sorted"
7 order. Then enable TestOptimizer.sh to diff -sccp output. Currently it
8 doesn't work because the diff fails because of ordering of the constant
10 * Enable DoConstantPoolMerging to do trivial DCE of constant values.
11 * Should provide "castTerminator, castPHI, etc" functions in Instruction, and
12 similar functions in other classes, that effectively do dynamic casts. This
13 would allow code like this:
14 if (I->isTerminator()) {
15 TerminatorInst *TI = (TerminatorInst*)I;
19 if (TerminatorInst *TI = I->castTerminatorInst()) {
22 * Think about whether edge split SSA form would be useful to do.
23 * Inlining should attempt to give block names the same name in the inlined
24 method (using SymbolTable::getUniqueName)
25 * The dropAllReferences code can be a noop when NDEBUG!!!
27 * pred/succ iterators on basic blocks don't handle switch statements correctly
28 * Enhance BB to make predecessor handling easier (to update PHI nodes)
29 * Provide a pass that eliminates critical edges from the CFG
30 * Provide a print pass to print out xvcg format files for vis
31 * I need to provide an option to the bytecode loader to ignore memory
32 dependance edges. Instead, the VM would just treat memory operations
33 (load, store, getfield, putfield, call) as pinned instructions.
34 * I need to have a way to prevent taking the address of a constant pool
35 reference. You should only be able to take the address of a variable.
36 Maybe taking the address of a constant copies it? What about virtual
37 function tables? Maybe a const pointer would be better...
38 * Structures should be accessed something like this: ubyte is ok. Limits
39 structure size to 256 members. This can be fixed later by either:
40 1. adding varient that takes ushort
41 2. Splitting structures into nested structures each of half size
42 <float> %f = load *{int, {float}} Str, 1, 0
43 store float %f, *{int, {float}} Str, 1, 0
44 * I'm noticing me writing a lot of code that looks like this (dtor material here):
45 ConstPool.dropAllReferences();
46 ConstPool.delete_all();
47 ConstPool.setParent(0);
50 * Need a way to attach bytecode block info at various levels of asm code.
51 * Rename "ConstantPool" to "ConstPool"
52 * Maybe ConstantPool objects should keep themselves sorted as things are
54 * Need to be able to inflate recursive types. %x = { *%x }, %x = %x ()
55 * Recognize and save comments in assembly and bytecode format
56 * Encode line number table in bytecode (like #line), optional table
58 * Encode negative relative offsets in the bytecode file
60 * Implement switch to switch on a constant pool array of type:
61 [{ label, int }] or [label] (lookup vs index switch)
62 * Apparently bison has a %pure_parser option. Maybe useful for Assembly/Parser
64 * Implement a header file that can read either assembly or bytecode, implement
65 a writer that can output either based on what is read with this reader..
66 * Implement the following derived types:
67 * structure/record { int %foo, int %bar} or { %foo = int, int }
69 * "packed format", like this: [4 x sbyte]: Packed SIMD datatype
70 * Maybe 'tailcall' also?
71 * Include a method level bytecode block that defines a mapping between values
72 and registers that defines a minimally register allocated code. This can
73 make me finally address how to encode extensions in assembly.
74 * Bytecode reader should use extensions that may or may not be linked into the
75 application to read blocks. Thus an easy way to ignore symbol table info
76 would be to not link in that reader into the app.