2 Add state management for loops (consistent, inconsistent, invalid).
5 It sucks that Call and CallBegin are different nodes. Change this!!!!
6 (as for Filter: Phi/Proj).
9 Vorgaengernummern am Looptree auf Kanten ausgeben.
11 * 8.12.03 Goetz und Till
12 Alloc Semantik: Der Alloc Knoten koennte wissen, ob der
13 allozierte Speicher zu Null initialisiert ist. Dies nehmen
14 wir im Jack Java Compiler an, im CRS C Compiler jedoch nicht.
15 Ist das nicht explizit im Allok Knoten vermerkt, kann eine
16 Optimierung nur in Abhaengigkeit vom Frontend darauf aufbauen.
17 (z.B. heapanal nimmt any an, statt null.)
20 Wenn man in Arrays.java in der Methode ArrObject.f() die
21 ersten zwei prints auskommentiert und pass_array_test die
22 for-Schleife durch ein i = 0, while(true).. ersetzt, stürzt der
23 Compiler in get_Block_idom ab; der übergebene Zeiger ist ein
27 Wir haben ev. einen Fehler in scc gefunden: Matthias hat eine
28 Enlosrekursion a() { b(); }, b() { a(); } in Java implementiert.
29 Darauf ist in is_head die Assertion
30 assert(get_irn_uplink(pred) >= get_irn_uplink(root));
34 Cast: irsimpletype: implement type analyses for one node. Test the
35 effort of that analyses. Add optimization to iropt that removes
39 Firm const nodes should have a type.
40 In jack all nodes are typed now, except the Const nodes. Only const from
44 Diverse dynamische arrays haben ein erstes, unverwendetes element. Z.B.
45 class members. Entfernen um Speicher zu sparen.
46 Ev. auch attribute an firm Knoten optimieren, per bitfield.
52 new_ir_mode(ident* name, int size, int alignment, mode_sort sort);
53 modecode ist der naechste frei int > maxenum.
54 Und der konstruktor sollte auch nach den zwei inits aufgerufen werden koennen.
55 was spricht dagegen? (die zwei inits stehen in init_firm(), ein benutzer kann
56 schwer dazwischen andere methoden aufrufen.)
60 - if overflow either return no tarval or return result of overflow
61 computation. Offer to output a warning. (configurable)
62 - Div: configure rounding (up/down) in init_firm, remark in each Div node
63 rounding sheme, default by initializations, pass rounding sheme
65 - impelement tarval_bitpattern
66 - make routine that outputs parts < 32 bits from any tarval
67 at given position in a C type that is exactly 32 bits.
68 For this test C types for their size or use int32 in integer.h
69 (is this standard C??)
70 - add routine that outputs the position of the largest set bit.
73 Representation of value compounds is not good, especially with
77 We can not represent bitfield members of structs in C.
78 Decision: generate explicit code for it, using shifts etc.
82 If parameter variables are dereferenced they must be represented
83 by an entity in the stack frame type. We need a mechanism to
84 find out which fields were parameters so that the parameter
85 passing space on the frame can be used for the parameters.
88 SymConst mit ident taugt nicht: Wenn man z.B. die Prozedur kennt
89 sollte man die entitaet der Prozedur angeben koennen. Ermoeglicht
90 einfachere Navigation im Callgraphen.
91 --> Verwende Const mit entity.
94 Aufbau Exceptions tut nicht:
95 1) mache exception handle block
96 2) baue code auf, verzweige von fragile ops zu dem Handler
97 3) mature exception block
98 --> Dann werden natuerlich die Werte am Ende der Bloecke mit den
99 fragile ops verwendet! Diese sind ev. nicht berechnet. Trifft
100 insbesondere auf memory zu ...
102 immExcBlock konstruktor. Neuer "mature" status. immExcBlocks duerfen
103 keine zyklen bilden. In immExcBlocks werden PhiKnoten sofort eingesetzt,
104 aber wie immBlock mit flexibler vorgaenger liste. add_in_edge ergaenzt
105 bei allen Phi Knoten dann sofort die neu bekannten Werte. Jetzt kann
106 genau der Status zum Zeitpunkt der Exception abgebildet werden.
109 Model Stack frame of a method as class type as for Global type?
110 (Class so that methods defined within methods can be represented?)
111 So far local entities are added to GlobalType.
114 Implement support for endless loops.
115 (Add Jump target block to a list if optimizing Cond nodes.
116 Extend walker to start walking at this list.
117 Extend dead node elimination to update and compact this list.
118 Extend inlining to inline this list.)
121 Implement checking whether layout is fixed when setting corresponding
122 flag. See firmtut, 3.1.4.
123 Maybe write a checker for the type information.
126 What happens if undefined values are allowed? See ircons.c,
127 grep for get_irg_start_block.
130 Does the array type contain a field with the array entity?
131 This entity should be constructed automatically with the array type.
134 All compound types need a flag saying whether the order of the members
138 Add element_type to array constructor
141 mode, size in type: Wann gibt es einen mode, wann die size?
142 Kann man den mode aendern? Nicht bei prim, enum, pointer da
143 schon irreversibel in Programmcode umgesetzt. Die anderen
144 haben keinen mode. Reicht daher intern ein Feld? Muss man
145 in get_type_mode die typen asserten, und set_mode verbieten,
146 dafuer im enum konstruktor mode mitgeben?
149 make dist should create an archive which has the directory libfirm/
153 - make dist should create an archive which has the directory libfirm/
154 as top-level [DONE:28.3.2001 Boris]
155 - Datei 'Copyright' oder 'Copying' mit entsprechendem Copyrightverweis
157 *********** old stuff ***********
159 + Problem mit endlosen Schleifen loesen.
161 * Automatisches generieren und set_value der Argumente-projs in
164 + Define and implement procedure-global extensions, e.g., the call graph.
166 * Implement Confirm node: Added by optimization to annotate dataflow
167 edge with information as (value > 0). This improves dataflow analysis.
168 These nodes can be derived from Cmp nodes in conjunction with dataflow
171 + think again about implementation of boolean expressions (0<1) && (2<3)
174 + Add evaluation routines for Rotate, Not, Minus, ShrA to target value,
175 extend optimization to cover these nodes.
177 * do we need remainder (Rem) operator?
178 different sign handling than Mod. How much processors???
180 * Turn Quot, Minus into three letter operator.
182 Propositions by Boris, 5.3.2001:
185 + in oo_program_example ist das Feld einfach nur eine entity. Aber alles andere
186 hat einen bestimmten Typ (z.B. method, strct, etc.). Muß es dann nicht auch
187 field geben? Oder werden alle Felder eines Objekts in einem strct organisiert
188 -> HowTo Use FIRM - Doku.
189 ==> Wann eine entitaet ein Feld ist, laesst sich am Typ der Entitaet enkennen.
190 Entitaet ist Feld wenn Owner Klassentyp (oder ev. Struct) und Typ nicht
192 Speicherbedarf der Entitaet, d.h. ihr mode, laesst sich auch dem Typ ansehen.
193 Manche Typen enthalten explizit den mode (z.B. type_primitive, type_pointer.)
194 Bei anderen haengt die Groesse vom Layout ab: class, struct.
195 Frage (fehlende Konvention): Ist eine Klasse ein Pointer oder immer nur
196 eine Value-Class?? Je nach dem muss man die Entitaeten modellieren:
197 Klasse = Pointer: entitaet kann Typ=class haben.
198 Klasse = WerteKlasse: entitaet sollte pointer mit points-to Klasse sein.
199 - fehlende Optimierung: wenn ein Wert einer Ladeoperation nicht gebraucht wird,
200 dann gibt es auch keine Kante dafuer, aber die Ladeoperation bleibt
201 (unnoetigerweise) stehen.
202 - mit set_optimize(1) geht die Optimierung von if(const cmpop const) unvollständig
203 bzw. falsch [da bleibt wohl ein zweiter Block-Knoten ohne Vorgänger]
204 + Verbesserungsvorschläge:
205 ------------------------
206 + Knoten im Typgraphen mit Farbe hinterlegen
207 - Attribute im Firmgraphen nicht im Knoten
208 + Kanten je nach Sematik farbig markieren, vielleicht dann auch Knoten
209 (z.B. rot fuer alles, was mit Steuerfluss zu tun hat)
210 + konfigurierbar, ob Konstanten im Startblock, oder im aktuellen
212 + von Hochsprachtypen loesen? Signed32 statt int?
213 ==> viel Arbeit, nur Namenskonvention. Ev wenn target value modul
216 + if_while_example ergibt Segmentation Fault da Bad Vorgaenger von Endblock.
217 Optimierung des end blocks geaendert.
219 + define Nodes for Rotate, Not, Minus, ShrA. Extend irdump, verification.
221 + change impelmentation of type to use concept as in irnode.
222 Three common fields: kind, ident, mode !!! fill mode with
223 mode_none if applicable.
225 + add asserts in type.c that check that proper type is passed.
226 not in get_type_name, get_type_ident.
228 + type / entity not good, too much casts.
229 merge type_or_ent union with type union. ??!!
230 allocate always unions.
231 write access routines for type, e.g. get_type_name.
232 change access routines for individual types to select from union.
234 + Wann macht man Dispatch Tabellen. Lower Phase
236 + integrate irgmod into ircons. The routines in there are only needed
237 during ir construction. (If there are some not needed, remove them.)
239 + Build more structured directoriy structure:
240 ir/ir irgraph, irnode, irop, irmode, type, entity,
242 ir/manipulate ircons, irgmod, irvrfy
243 ir/optimize iropt, irflag
244 ir/datastructure array, obst, pdeq, pset, set
245 ir/include gmp, host, xfprintf, xgprintf, xmalloc,
246 xoprintf, xp_help, xprintf
247 ir/compilermodules ident, xx_ident, tv, ieee754
248 ir/aux irdump, strerror,
249 where goes debug, firm, label, mangle, misc, panic, tune?
252 - SymConst also returns pointer.
253 - Start returns pointer to segment for globals.
254 - remove copy, clear, type_or_ent
256 - add constructor for shrs
259 + How shall global variables be modeled in FIRM, if programs as C are
260 translated? Modeling them as entity of the class defined for the
261 file/compilation unit is not sufficient, as then they are not
262 visible from out of this file.
263 For the uebprakt and kirmes we model them by selection from the
264 area that contains all globals (data segment). The pointer to
265 this area is provided by the start node.
266 In Sather these were modeled by pointers to string constants containing
267 the name of the global variable (or static field):
268 new_Const (mode_p, tarval_p_from_str ("VAR_A"))
270 + port transform_node in iropt to lib.
274 ***************************************************************************
276 + add attributes from doku to constructors.
278 + add Phi_in stack as field to ir_graph??!!
280 + implement ShrA constructor.
281 What are allowed types?
285 + write dumper for type information.
286 write dumper for type and graph.
287 write dumper for control flow graph.
289 + dump irgraph with all the type information. Write function that
290 dumps type information and one that dumps entities. To integrate
291 this separate dump_node and the recursion, and add the dump_type
292 and dump_entity function in the recursive iterator or write second
295 + Fix bug in pset/set, so that several tables can be used. iropt/identify
296 aborts. Thanks, Boris!
298 + write example program with irreducible control flow:
300 /* Phi node with three predecessors: */
312 /* irreducible two entry loop */
314 if () goto entry1 else goto entry2
317 if () goto exit else goto entry 2
320 if () goto exit else goto entry 1
324 + entity must be able to take arrays as owner. Anything else?
325 --> assert allowed types.
327 + Alloc must be able to take any type as owner. Also primitive types
328 so that allocation to the stack of dereferenced local variables can
331 + Implement vrfy_graph(end_node) that iterates over the whole graph
332 calling ir_vrfy so that the graph can be verified after each
335 + DONE: Add access routines to ir_graph, ir_mode (?).