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