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