*** empty log message ***
[libfirm] / TODO
1   14.3.2001 Boris
2   make dist should create an archive which has the directory libfirm/
3   as top-level
4
5 *********** old stuff ***********
6
7
8  * Problem mit endlosen Schleifen loesen.
9
10  + if_while_example ergibt Segmentation Fault da Bad Vorgaenger von Endblock.
11    Optimierung des end blocks geaendert.
12
13  * Automatisches generieren und set_value der Argumente-projs in
14    new_ir_graph
15
16  * Define and implement procedure-global extensions, e.g., the call graph.
17
18  * Implement Confirm node: Added by optimization to annotate dataflow
19    edge with information as (value > 0).  This improves dataflow analysis.
20    These nodes can be derived from Cmp nodes in conjunction with dataflow
21    information.
22
23  * think again about implementation of boolean expressions  (0<1) && (2<3)
24
25  * Adapt tv to operate on the new modes, adapt libfirm, e.g., remove
26    strange constructors.
27
28  * define Nodes for Rotate, Not, Minus, ShrA (Done.)
29    Add evaluation routines to target value, extend optimization,
30    verification to cover these nodes, extend irdump to cover them.
31
32  * do we need remainder (Rem) operator?
33    different sign handling than Mod.  How much processors???
34
35  * Turn Quot, Minus into three letter operator.
36
37 Propositions by Boris, 5.3.2001:
38  + Fehler in FIRM?
39    ---------------
40    + in oo_program_example ist das Feld einfach nur eine entity. Aber alles andere
41      hat einen bestimmten Typ (z.B. method, strct, etc.). Muß es dann nicht auch
42      field geben? Oder werden alle Felder eines Objekts in einem strct organisiert
43      -> HowTo Use FIRM - Doku.
44      ==> Wann eine entitaet ein Feld ist, laesst sich am Typ der Entitaet enkennen.
45          Entitaet ist Feld wenn Owner Klassentyp (oder ev. Struct) und Typ nicht
46          Methodentyp.
47          Speicherbedarf der Entitaet, d.h. ihr mode, laesst sich auch dem Typ ansehen.
48          Manche Typen enthalten explizit den mode (z.B. type_primitive, type_pointer.)
49          Bei anderen haengt die Groesse vom Layout ab:  class, struct.
50          Frage (fehlende Konvention): Ist eine Klasse ein Pointer oder immer nur
51          eine Value-Class??  Je nach dem muss man die Entitaeten modellieren:
52          Klasse = Pointer:  entitaet kann Typ=class haben.
53          Klasse = WerteKlasse: entitaet sollte pointer mit points-to Klasse sein.
54    - fehlende Optimierung: wenn ein Wert einer Ladeoperation nicht gebraucht wird,
55      dann gibt es auch keine Kante dafuer, aber die Ladeoperation bleibt
56      (unnoetigerweise) stehen.
57    - mit set_optimize(1) geht die Optimierung von if(const cmpop const) unvollständig
58      bzw. falsch [da bleibt wohl ein zweiter Block-Knoten ohne Vorgänger]
59  + Verbesserungsvorschläge:
60    ------------------------
61    + Knoten im Typgraphen mit Farbe hinterlegen
62    - Attribute im Firmgraphen nicht im Knoten
63    + Kanten je nach Sematik farbig markieren, vielleicht dann auch Knoten
64      (z.B. rot fuer alles, was mit Steuerfluss zu tun hat)
65    + konfigurierbar, ob Konstanten im Startblock, oder im aktuellen
66      ==> geht schlecht.
67    + von Hochsprachtypen loesen? Signed32 statt int?
68      ==> viel Arbeit, nur Namenskonvention.  Ev wenn target value modul
69          ausgetauscht.
70
71  + change impelmentation of type to use concept as in irnode.
72    Three common fields: kind, ident, mode !!! fill mode with
73    mode_none if applicable.
74
75  + add asserts in type.c that check that proper type is passed.
76    not in get_type_name, get_type_ident.
77
78  + type / entity not good, too much casts.
79    merge type_or_ent union with type union. ??!!
80    allocate always unions.
81    write access routines for type, e.g. get_type_name.
82    change access routines for individual types to select from union.
83
84  + Wann macht man Dispatch Tabellen.  Lower Phase
85
86  + integrate irgmod into ircons.  The routines in there are only needed
87    during ir construction.  (If there are some not needed, remove them.)
88
89  + Build more structured directoriy structure:
90    ir/ir                irgraph, irnode, irop, irmode, type, entity,
91                         common,
92    ir/manipulate        ircons, irgmod, irvrfy
93    ir/optimize          iropt, irflag
94    ir/datastructure     array, obst, pdeq, pset, set
95    ir/include           gmp, host, xfprintf, xgprintf, xmalloc,
96                         xoprintf, xp_help, xprintf
97    ir/compilermodules   ident, xx_ident, tv, ieee754
98    ir/aux               irdump, strerror,
99    where goes           debug, firm, label, mangle, misc, panic, tune?
100
101  + Changes to nodes:
102    - SymConst also returns pointer.
103    - Start returns pointer to segment for globals.
104    - remove copy, clear, type_or_ent
105    - add free
106    - add constructor for shrs
107    - remove Phi0 ruins
108
109  + How shall global variables be modeled in FIRM, if programs as C are
110    translated?  Modeling them as entity of the class defined for the
111    file/compilation unit is not sufficient, as then they are not
112    visible from out of this file.
113    For the uebprakt and kirmes we model them by selection from the
114    area that contains all globals (data segment).  The pointer to
115    this area is provided by the start node.
116    In Sather these were modeled by pointers to string constants containing
117    the name of the global variable (or static field):
118      new_Const (mode_p, tarval_p_from_str ("VAR_A"))
119
120  + port transform_node in iropt to lib.
121
122  + make new Version
123
124 ***************************************************************************
125
126  + add attributes from doku to constructors.
127
128  + add Phi_in stack as field to ir_graph??!!
129
130  + implement ShrA constructor.
131    What are allowed types?
132
133  + add type struct
134
135  + write dumper for type information.
136    write dumper for type and graph.
137    write dumper for control flow graph.
138
139  + dump irgraph with all the type information.  Write function that
140    dumps type information and one that dumps entities.  To integrate
141    this separate dump_node and the recursion, and add the dump_type
142    and dump_entity function in the recursive iterator or write second
143    dump routine.
144
145  + Fix bug in pset/set, so that several tables can be used. iropt/identify
146    aborts. Thanks, Boris!
147
148  + write example program with irreducible control flow:
149
150    /* Phi node with three predecessors: */
151       a = 1
152       if () goto loop
153       a = 2
154       goto loop
155    loop:
156       if () goto exit
157       b = 1
158       goto loop
159    exit:
160       b = a
161
162    /* irreducible two entry loop */
163       b = 1
164       if () goto entry1 else goto entry2
165    entry 1
166       a = 2
167       if () goto exit else goto entry 2
168    entry 2
169       a = 1
170       if () goto exit else goto entry 1
171    exit
172       b = a + b
173
174  + entity must be able to take arrays as owner.  Anything else?
175    --> assert allowed types.
176
177  + Alloc must be able to take any type as owner.  Also primitive types
178    so that allocation to the stack of dereferenced local variables can
179    be modeled.
180
181  + Implement vrfy_graph(end_node) that iterates over the whole graph
182   calling ir_vrfy so that the graph can be verified after each
183    optimization.
184
185  + DONE: Add access routines to ir_graph, ir_mode (?).