2 Representation of value compounds is not good, especially with
6 We can not represent bitfield members of structs in C.
7 A struct can have fields with n bits, n e.g. set to 3...
10 If parameter variables are dereferenced they must be represented
11 by an entity in the stack frame type. We need a mechanism to
12 find out which fields were parameters so that the parameter
13 passing space on the frame can be used for the parameters.
16 SymConst mit ident taugt nicht: Wenn man z.B. die Prozedur kennt
17 sollte man die entitaet der Prozedur angeben koennen. Ermoeglicht
18 einfachere Navigation im Callgraphen.
19 --> Verwende Const mit entity.
22 Aufbau Exceptions tut nicht:
23 1) mache exception handle block
24 2) baue code auf, verzweige von fragile ops zu dem Handler
25 3) mature exception block
26 --> Dann werden natuerlich die Werte am Ende der Bloecke mit den
27 fragile ops verwendet! Diese sind ev. nicht berechnet. Trifft
28 insbesondere auf memory zu ...
30 immExcBlock konstruktor. Neuer "mature" status. immExcBlocks duerfen
31 keine zyklen bilden. In immExcBlocks werden PhiKnoten sofort eingesetzt,
32 aber wie immBlock mit flexibler vorgaenger liste. add_in_edge ergaenzt
33 bei allen Phi Knoten dann sofort die neu bekannten Werte. Jetzt kann
34 genau der Status zum Zeitpunkt der Exception abgebildet werden.
37 Model Stack frame of a method as class type as for Global type?
38 (Class so that methods defined within methods can be represented?)
39 So far local entities are added to GlobalType.
42 Implement support for endless loops.
43 (Add Jump target block to a list if optimizing Cond nodes.
44 Extend walker to start walking at this list.
45 Extend dead node elimination to update and compact this list.
46 Extend inlining to inline this list.)
49 Implement checking whether layout is fixed when setting corresponding
50 flag. See firmtut, 3.1.4.
51 Maybe write a checker for the type information.
54 What happens if undefined values are allowed? See ircons.c,
55 grep for get_irg_start_block.
58 Does the array type contain a field with the array entity?
59 This entity should be constructed automatically with the array type.
62 All compound types need a flag saying whether the order of the members
66 Add element_type to array constructor
69 mode, size in type: Wann gibt es einen mode, wann die size?
70 Kann man den mode aendern? Nicht bei prim, enum, pointer da
71 schon irreversibel in Programmcode umgesetzt. Die anderen
72 haben keinen mode. Reicht daher intern ein Feld? Muss man
73 in get_type_mode die typen asserten, und set_mode verbieten,
74 dafuer im enum konstruktor mode mitgeben?
77 make dist should create an archive which has the directory libfirm/
81 - make dist should create an archive which has the directory libfirm/
82 as top-level [DONE:28.3.2001 Boris]
83 - Datei 'Copyright' oder 'Copying' mit entsprechendem Copyrightverweis
85 *********** old stuff ***********
87 + Problem mit endlosen Schleifen loesen.
89 * Automatisches generieren und set_value der Argumente-projs in
92 + Define and implement procedure-global extensions, e.g., the call graph.
94 * Implement Confirm node: Added by optimization to annotate dataflow
95 edge with information as (value > 0). This improves dataflow analysis.
96 These nodes can be derived from Cmp nodes in conjunction with dataflow
99 * think again about implementation of boolean expressions (0<1) && (2<3)
101 * Add evaluation routines for Rotate, Not, Minus, ShrA to target value,
102 extend optimization to cover these nodes.
104 * do we need remainder (Rem) operator?
105 different sign handling than Mod. How much processors???
107 * Turn Quot, Minus into three letter operator.
109 Propositions by Boris, 5.3.2001:
112 + in oo_program_example ist das Feld einfach nur eine entity. Aber alles andere
113 hat einen bestimmten Typ (z.B. method, strct, etc.). Muß es dann nicht auch
114 field geben? Oder werden alle Felder eines Objekts in einem strct organisiert
115 -> HowTo Use FIRM - Doku.
116 ==> Wann eine entitaet ein Feld ist, laesst sich am Typ der Entitaet enkennen.
117 Entitaet ist Feld wenn Owner Klassentyp (oder ev. Struct) und Typ nicht
119 Speicherbedarf der Entitaet, d.h. ihr mode, laesst sich auch dem Typ ansehen.
120 Manche Typen enthalten explizit den mode (z.B. type_primitive, type_pointer.)
121 Bei anderen haengt die Groesse vom Layout ab: class, struct.
122 Frage (fehlende Konvention): Ist eine Klasse ein Pointer oder immer nur
123 eine Value-Class?? Je nach dem muss man die Entitaeten modellieren:
124 Klasse = Pointer: entitaet kann Typ=class haben.
125 Klasse = WerteKlasse: entitaet sollte pointer mit points-to Klasse sein.
126 - fehlende Optimierung: wenn ein Wert einer Ladeoperation nicht gebraucht wird,
127 dann gibt es auch keine Kante dafuer, aber die Ladeoperation bleibt
128 (unnoetigerweise) stehen.
129 - mit set_optimize(1) geht die Optimierung von if(const cmpop const) unvollständig
130 bzw. falsch [da bleibt wohl ein zweiter Block-Knoten ohne Vorgänger]
131 + Verbesserungsvorschläge:
132 ------------------------
133 + Knoten im Typgraphen mit Farbe hinterlegen
134 - Attribute im Firmgraphen nicht im Knoten
135 + Kanten je nach Sematik farbig markieren, vielleicht dann auch Knoten
136 (z.B. rot fuer alles, was mit Steuerfluss zu tun hat)
137 + konfigurierbar, ob Konstanten im Startblock, oder im aktuellen
139 + von Hochsprachtypen loesen? Signed32 statt int?
140 ==> viel Arbeit, nur Namenskonvention. Ev wenn target value modul
143 + if_while_example ergibt Segmentation Fault da Bad Vorgaenger von Endblock.
144 Optimierung des end blocks geaendert.
146 + define Nodes for Rotate, Not, Minus, ShrA. Extend irdump, verification.
148 + change impelmentation of type to use concept as in irnode.
149 Three common fields: kind, ident, mode !!! fill mode with
150 mode_none if applicable.
152 + add asserts in type.c that check that proper type is passed.
153 not in get_type_name, get_type_ident.
155 + type / entity not good, too much casts.
156 merge type_or_ent union with type union. ??!!
157 allocate always unions.
158 write access routines for type, e.g. get_type_name.
159 change access routines for individual types to select from union.
161 + Wann macht man Dispatch Tabellen. Lower Phase
163 + integrate irgmod into ircons. The routines in there are only needed
164 during ir construction. (If there are some not needed, remove them.)
166 + Build more structured directoriy structure:
167 ir/ir irgraph, irnode, irop, irmode, type, entity,
169 ir/manipulate ircons, irgmod, irvrfy
170 ir/optimize iropt, irflag
171 ir/datastructure array, obst, pdeq, pset, set
172 ir/include gmp, host, xfprintf, xgprintf, xmalloc,
173 xoprintf, xp_help, xprintf
174 ir/compilermodules ident, xx_ident, tv, ieee754
175 ir/aux irdump, strerror,
176 where goes debug, firm, label, mangle, misc, panic, tune?
179 - SymConst also returns pointer.
180 - Start returns pointer to segment for globals.
181 - remove copy, clear, type_or_ent
183 - add constructor for shrs
186 + How shall global variables be modeled in FIRM, if programs as C are
187 translated? Modeling them as entity of the class defined for the
188 file/compilation unit is not sufficient, as then they are not
189 visible from out of this file.
190 For the uebprakt and kirmes we model them by selection from the
191 area that contains all globals (data segment). The pointer to
192 this area is provided by the start node.
193 In Sather these were modeled by pointers to string constants containing
194 the name of the global variable (or static field):
195 new_Const (mode_p, tarval_p_from_str ("VAR_A"))
197 + port transform_node in iropt to lib.
201 ***************************************************************************
203 + add attributes from doku to constructors.
205 + add Phi_in stack as field to ir_graph??!!
207 + implement ShrA constructor.
208 What are allowed types?
212 + write dumper for type information.
213 write dumper for type and graph.
214 write dumper for control flow graph.
216 + dump irgraph with all the type information. Write function that
217 dumps type information and one that dumps entities. To integrate
218 this separate dump_node and the recursion, and add the dump_type
219 and dump_entity function in the recursive iterator or write second
222 + Fix bug in pset/set, so that several tables can be used. iropt/identify
223 aborts. Thanks, Boris!
225 + write example program with irreducible control flow:
227 /* Phi node with three predecessors: */
239 /* irreducible two entry loop */
241 if () goto entry1 else goto entry2
244 if () goto exit else goto entry 2
247 if () goto exit else goto entry 1
251 + entity must be able to take arrays as owner. Anything else?
252 --> assert allowed types.
254 + Alloc must be able to take any type as owner. Also primitive types
255 so that allocation to the stack of dereferenced local variables can
258 + Implement vrfy_graph(end_node) that iterates over the whole graph
259 calling ir_vrfy so that the graph can be verified after each
262 + DONE: Add access routines to ir_graph, ir_mode (?).