removed automatic generation of shared library.
[libfirm] / TODO
1   * 14.8.2003 Goetz
2     Diverse dynamische arrays haben ein erstes, unverwendetes element. Z.B.
3     class members.  Entfernen um Speicher zu sparen.
4     Ev. auch attribute an firm Knoten optimieren, per bitfield.
5
6   * 24.3.2003 Goetz
7     tarval requirements:
8     zu register_mode:
9     Ich haette ganz gerne
10       new_ir_mode(ident* name, int size, int alignment, mode_sort sort);
11     modecode ist der naechste frei int > maxenum.
12     Und der konstruktor sollte auch nach den zwei inits aufgerufen werden koennen.
13     was spricht dagegen?  (die zwei inits stehen in init_firm(), ein benutzer kann
14     schwer dazwischen andere methoden aufrufen.)
15
16   * 24.3.2003 Goetz
17     tarval requirements:
18     - if overflow either return no tarval or return result of overflow
19       computation.  Offer to output a warning. (configurable)
20     - Div:  configure rounding (up/down) in init_firm, remark in each Div node
21       rounding sheme, default by initializations, pass rounding sheme
22       to tarval module
23     - impelement tarval_bitpattern
24     - make routine that outputs parts < 32 bits from any tarval
25       at given position in a C type that is exactly 32 bits.
26       For this test C types for their size or use int32 in integer.h
27       (is this standard C??)
28     - add routine that outputs the position of the largest set bit.
29
30   * 29.10.2002 Goetz
31     Representation of value compounds is not good, especially with
32     calls.
33
34   * 29.10.2002 Goetz
35     We can not represent bitfield members of structs in C.
36     A struct can have fields with n bits, n e.g. set to 3...
37
38   * 29.10.2002 Goetz
39     If parameter variables are dereferenced they must be represented
40     by an entity in the stack frame type.  We need a mechanism to
41     find out which fields were parameters so that the parameter
42     passing space on the frame can be used for the parameters.
43
44   + 19.11.2001 Goetz
45     SymConst mit ident taugt nicht:  Wenn man z.B. die Prozedur kennt
46     sollte man die entitaet der Prozedur angeben koennen.  Ermoeglicht
47     einfachere Navigation im Callgraphen.
48     --> Verwende Const mit entity.
49
50   + 13.11.2001 Goetz
51     Aufbau Exceptions tut nicht:
52     1) mache exception handle block
53     2) baue code auf, verzweige von fragile ops zu dem Handler
54     3) mature exception block
55     --> Dann werden natuerlich die Werte am Ende der Bloecke mit den
56        fragile ops verwendet!  Diese sind ev. nicht berechnet.  Trifft
57        insbesondere auf memory zu ...
58     Loesung z.B.:
59     immExcBlock konstruktor.  Neuer "mature" status.  immExcBlocks duerfen
60     keine zyklen bilden.  In immExcBlocks werden PhiKnoten sofort eingesetzt,
61     aber wie immBlock mit flexibler vorgaenger liste.  add_in_edge ergaenzt
62     bei allen Phi Knoten dann sofort die neu bekannten Werte.  Jetzt kann
63     genau der Status zum Zeitpunkt der Exception abgebildet werden.
64
65   + 7.11.2001 Goetz
66     Model Stack frame of a method as class type as for Global type?
67     (Class so that methods defined within methods can be represented?)
68     So far local entities are added to GlobalType.
69
70   + 7.11.2001 Goetz
71     Implement support for endless loops.
72     (Add Jump target block to a list if optimizing Cond nodes.
73     Extend walker to start walking at this list.
74     Extend dead node elimination to update and compact this list.
75     Extend inlining to inline this list.)
76
77   * 7.11.2001 Goetz
78     Implement checking whether layout is fixed when setting corresponding
79     flag.  See firmtut, 3.1.4.
80     Maybe write a checker for the type information.
81
82   * 19.6.2001 Goetz
83     What happens if undefined values are allowed?  See ircons.c,
84     grep for get_irg_start_block.
85
86   + 23.5.2001 Goetz
87     Does the array type contain a field with the array entity?
88     This entity should be constructed automatically with the array type.
89
90   * 23.5.2005 Goetz
91     All compound types need a flag saying whether the order of the members
92     must be conserved.
93
94   + 23.5.2001 Goetz
95     Add element_type to array constructor
96
97   + 15.3.2001 Goetz
98     mode, size in type:  Wann gibt es einen mode, wann die size?
99     Kann man den mode aendern?  Nicht bei prim, enum, pointer da
100     schon irreversibel in Programmcode umgesetzt.  Die anderen
101     haben keinen mode.  Reicht daher intern ein Feld?  Muss man
102     in get_type_mode die typen asserten, und set_mode verbieten,
103     dafuer im enum konstruktor mode mitgeben?
104
105   + 14.3.2001 Boris
106     make dist should create an archive which has the directory libfirm/
107     as top-level
108 =======
109   14.3.2001 Boris
110   - make dist should create an archive which has the directory libfirm/
111     as top-level [DONE:28.3.2001 Boris]
112   - Datei 'Copyright' oder 'Copying' mit entsprechendem Copyrightverweis
113
114 *********** old stuff ***********
115
116  + Problem mit endlosen Schleifen loesen.
117
118  * Automatisches generieren und set_value der Argumente-projs in
119    new_ir_graph
120
121  + Define and implement procedure-global extensions, e.g., the call graph.
122
123  * Implement Confirm node: Added by optimization to annotate dataflow
124    edge with information as (value > 0).  This improves dataflow analysis.
125    These nodes can be derived from Cmp nodes in conjunction with dataflow
126    information.
127
128  * think again about implementation of boolean expressions  (0<1) && (2<3)
129
130  * Add evaluation routines for Rotate, Not, Minus, ShrA to target value,
131    extend optimization to cover these nodes.
132
133  * do we need remainder (Rem) operator?
134    different sign handling than Mod.  How much processors???
135
136  * Turn Quot, Minus into three letter operator.
137
138 Propositions by Boris, 5.3.2001:
139  + Fehler in FIRM?
140    ---------------
141    + in oo_program_example ist das Feld einfach nur eine entity. Aber alles andere
142      hat einen bestimmten Typ (z.B. method, strct, etc.). Muß es dann nicht auch
143      field geben? Oder werden alle Felder eines Objekts in einem strct organisiert
144      -> HowTo Use FIRM - Doku.
145      ==> Wann eine entitaet ein Feld ist, laesst sich am Typ der Entitaet enkennen.
146          Entitaet ist Feld wenn Owner Klassentyp (oder ev. Struct) und Typ nicht
147          Methodentyp.
148          Speicherbedarf der Entitaet, d.h. ihr mode, laesst sich auch dem Typ ansehen.
149          Manche Typen enthalten explizit den mode (z.B. type_primitive, type_pointer.)
150          Bei anderen haengt die Groesse vom Layout ab:  class, struct.
151          Frage (fehlende Konvention): Ist eine Klasse ein Pointer oder immer nur
152          eine Value-Class??  Je nach dem muss man die Entitaeten modellieren:
153          Klasse = Pointer:  entitaet kann Typ=class haben.
154          Klasse = WerteKlasse: entitaet sollte pointer mit points-to Klasse sein.
155    - fehlende Optimierung: wenn ein Wert einer Ladeoperation nicht gebraucht wird,
156      dann gibt es auch keine Kante dafuer, aber die Ladeoperation bleibt
157      (unnoetigerweise) stehen.
158    - mit set_optimize(1) geht die Optimierung von if(const cmpop const) unvollständig
159      bzw. falsch [da bleibt wohl ein zweiter Block-Knoten ohne Vorgänger]
160  + Verbesserungsvorschläge:
161    ------------------------
162    + Knoten im Typgraphen mit Farbe hinterlegen
163    - Attribute im Firmgraphen nicht im Knoten
164    + Kanten je nach Sematik farbig markieren, vielleicht dann auch Knoten
165      (z.B. rot fuer alles, was mit Steuerfluss zu tun hat)
166    + konfigurierbar, ob Konstanten im Startblock, oder im aktuellen
167      ==> geht schlecht.
168    + von Hochsprachtypen loesen? Signed32 statt int?
169      ==> viel Arbeit, nur Namenskonvention.  Ev wenn target value modul
170          ausgetauscht.
171
172  + if_while_example ergibt Segmentation Fault da Bad Vorgaenger von Endblock.
173    Optimierung des end blocks geaendert.
174
175  + define Nodes for Rotate, Not, Minus, ShrA.  Extend irdump, verification.
176
177  + change impelmentation of type to use concept as in irnode.
178    Three common fields: kind, ident, mode !!! fill mode with
179    mode_none if applicable.
180
181  + add asserts in type.c that check that proper type is passed.
182    not in get_type_name, get_type_ident.
183
184  + type / entity not good, too much casts.
185    merge type_or_ent union with type union. ??!!
186    allocate always unions.
187    write access routines for type, e.g. get_type_name.
188    change access routines for individual types to select from union.
189
190  + Wann macht man Dispatch Tabellen.  Lower Phase
191
192  + integrate irgmod into ircons.  The routines in there are only needed
193    during ir construction.  (If there are some not needed, remove them.)
194
195  + Build more structured directoriy structure:
196    ir/ir                irgraph, irnode, irop, irmode, type, entity,
197                         common,
198    ir/manipulate        ircons, irgmod, irvrfy
199    ir/optimize          iropt, irflag
200    ir/datastructure     array, obst, pdeq, pset, set
201    ir/include           gmp, host, xfprintf, xgprintf, xmalloc,
202                         xoprintf, xp_help, xprintf
203    ir/compilermodules   ident, xx_ident, tv, ieee754
204    ir/aux               irdump, strerror,
205    where goes           debug, firm, label, mangle, misc, panic, tune?
206
207  + Changes to nodes:
208    - SymConst also returns pointer.
209    - Start returns pointer to segment for globals.
210    - remove copy, clear, type_or_ent
211    - add free
212    - add constructor for shrs
213    - remove Phi0 ruins
214
215  + How shall global variables be modeled in FIRM, if programs as C are
216    translated?  Modeling them as entity of the class defined for the
217    file/compilation unit is not sufficient, as then they are not
218    visible from out of this file.
219    For the uebprakt and kirmes we model them by selection from the
220    area that contains all globals (data segment).  The pointer to
221    this area is provided by the start node.
222    In Sather these were modeled by pointers to string constants containing
223    the name of the global variable (or static field):
224      new_Const (mode_p, tarval_p_from_str ("VAR_A"))
225
226  + port transform_node in iropt to lib.
227
228  + make new Version
229
230 ***************************************************************************
231
232  + add attributes from doku to constructors.
233
234  + add Phi_in stack as field to ir_graph??!!
235
236  + implement ShrA constructor.
237    What are allowed types?
238
239  + add type struct
240
241  + write dumper for type information.
242    write dumper for type and graph.
243    write dumper for control flow graph.
244
245  + dump irgraph with all the type information.  Write function that
246    dumps type information and one that dumps entities.  To integrate
247    this separate dump_node and the recursion, and add the dump_type
248    and dump_entity function in the recursive iterator or write second
249    dump routine.
250
251  + Fix bug in pset/set, so that several tables can be used. iropt/identify
252    aborts. Thanks, Boris!
253
254  + write example program with irreducible control flow:
255
256    /* Phi node with three predecessors: */
257       a = 1
258       if () goto loop
259       a = 2
260       goto loop
261    loop:
262       if () goto exit
263       b = 1
264       goto loop
265    exit:
266       b = a
267
268    /* irreducible two entry loop */
269       b = 1
270       if () goto entry1 else goto entry2
271    entry 1
272       a = 2
273       if () goto exit else goto entry 2
274    entry 2
275       a = 1
276       if () goto exit else goto entry 1
277    exit
278       b = a + b
279
280  + entity must be able to take arrays as owner.  Anything else?
281    --> assert allowed types.
282
283  + Alloc must be able to take any type as owner.  Also primitive types
284    so that allocation to the stack of dereferenced local variables can
285    be modeled.
286
287  + Implement vrfy_graph(end_node) that iterates over the whole graph
288   calling ir_vrfy so that the graph can be verified after each
289    optimization.
290
291  + DONE: Add access routines to ir_graph, ir_mode (?).