e80d94078cd8b4277b05aa4a703e7f0347e39c91
[libfirm] / Changes
1   12.3.2001 Boris
2   added auto documentation in Makefiles, configure, etc
3   example in ir/ir/ircons.c - much must be added
4   creation of documentation by 'make autodoc' in architecture directory
5
6   5.3.2001 Boris
7   added lots of #ifdef HAVE_CONFIG_G #include "config.h" #endif
8   replaced some C++ style comments (//) by standard C comments /**/
9   added autoconf stuff
10   worked this night:
11         - configure (with some features, see --help for more)
12         - make [depend | tags | install]
13         - make [run] in testprograms
14   did not work:
15         - compilation on SunOS
16         - make dist
17         - automatic call of autoconf if required
18
19   5.3.2001 Goetz
20   More colours in vcg output.
21   Fixed bug:  cse found that start block equals it's
22   first successor as both have the Start block as predecessor.
23   This only happens for local_optimize_graph() as during construction
24   the Start block is not entered in the value table.
25   Changed implementation:  irgmod:  local_optimize_graph() did not
26   empty the hash table with the irnodes for cse.  This might cause that
27   cse turns up with a node that seems better but was removed from the
28   graph in an earlier optimization phase.
29   Removed old #if 1 from ircons.c
30   Commented in call of optimization for Block nodes in irgopt.c, copy_preds():
31   Optimizes blocks that had bad predecessors.
32   Same for Phi nodes.
33
34
35   27.2.2001 Goetz
36   Moved struct from irprog.h to irprog_t.h, same for irmode.h.
37   Added a module deb_info in debug.h.  Adapted makefile.  Added example
38   use in iropt.h.
39   Removed use of debug.h in ident.c. Now debug.c|h can be moved to
40   /adt/.
41   Removed inabled code for dead node elimination in irgopt.h.
42   Renamed some missnamed access routines (_of_).  Macros with old names
43   are in old_fctnames.h.
44   Edited makefiles to remove #* and *.flc.
45
46   ??.2.2001 Goetz
47   Some minor bugfixes...
48
49   25.1.2001 Goetz
50   After compacting of in arrays in dead_node_elimination
51   merge blocks and remove Phis with one pred.
52
53   24.1.2001 Goetz
54   Freeing of obstack in dead_node_elimination commented in.
55   Compacting in arrays of Block and Phi nodes in dead_node_
56   elimination.
57   Some more changes...
58
59   15.01.2001 Goetz
60   added set/get_SymConst_type_or_id in irnode.h
61   added field offset to entity in entity.h
62   added field size to type_class in type.h
63   include "gmp.h" in tv.h with "" instead <>
64
65   12.01.2001 Goetz
66   Some changes to make the lib better portable
67
68   29.12.2000 Goetz
69   Initialize max_node_nr in irprog.
70
71   27.12.2000 Goetz
72   Now outputs warning if faulty type in irdump, dump_type_info.
73   Explicit string termination in irdump, vcg_open.
74
75   20.12.2000 Goetz
76   Added external to declaration of irp.
77   Added typedef before pns and pnc_number.
78   irmode.c, init_mode(): We need to memset all new modes as
79   tarval_vrfy reads fields before they are initialized: It
80   compares to min/max when tarvals for min/max are allocated!
81
82   18.12.2000 Goetz
83   Changed parameter of Methods in type.h and type.c from
84   class to clss.  Class is a C++ keyword.
85
86   10.12.2000 Goetz
87   Changed some testprograms to accomodate Uebprakt.
88
89   7.9.2000 Goetz
90   Finished implementation of dump_all_types.
91   Added new testprogram inheritance_example.
92
93   6.9.2000 Chris
94   Added seven access routines in type.[hc]:
95   get_class_n_member, get_class_n_subtype, get_class_n_supertype,
96   get_strct_n_member, add_strct_member, get_strct_member and set_strct_member.
97   Fixed the type_walk_2 for those seven routines.
98
99   6.9.2000 Goetz
100   Added irdump routine dump_all_types.
101   Did changes to irprog, type, typewalk to achieve this.
102   typewalk needs to walk along members, sub and supertypes, this
103   is still missing!  irdump then needs to output these edges.
104
105 ======================================================================
106 ==================== New version: 0.2.5 ==============================
107 ======================================================================
108
109   3.9.2000 Goetz
110   Made new Version: 0.2.5
111
112   15.8.2000 Goetz until 3.9.00
113   Separated irnode.h and many others into two files: one public
114   one private.
115   Added funcionality to extract headers for lib.
116
117   23.8.2000 Goetz
118   type_dump also dumps irg->ent
119   if_example: corrected nr of locals
120
121   16.8.2000 Goetz
122   irgopt: Correct copy of self pointer in start block.
123   irgopt: Correct treatment of loops: pre function in walker
124     breaks all possible loops in Phi and Block nodes.
125   irr_loop_example: wrong Return statement
126   Now I fixed all but one error: in memory_example.
127   This error showed a conceptual problem, so I wrote
128   a slightly different algorithm.  This now runs for
129   all testprograms.
130   dead_node_example: cse is buggy!! merges start and the
131   following block!
132
133   15.8.2000 Goetz
134   looking at bug in dead_node_elimination.
135   Following fixes:
136   irnode:  all get_..._arr functions changed
137   ircons:  new_r_Block: set matured flag.
138   ircons:  new_r_SymConst: needs mode_p for linkage_ptr_info.
139   adapted call_str_example to new concepts.
140
141   2.8.2000 Goetz
142   Implemented simpler Phi construction algorithm that constructs
143   correct code for three_cfpred_example in ircons.  This algorithm
144   generates more Id nodes than the original algorithm and therefore
145   is less effective.
146   Also made some changes to optimizations of Not.
147
148   31.7.2000 Chris
149   Fixed a bug, caused by the recursive use in type.h and entity.h.
150   Deleted the _TYPE_TYPEDEF_ and inserted the _ENTITY_TYPEDEF_ instead.
151   Fixed a problem in if_while testprogram, so it now works.
152
153   20.7.2000 Goetz
154   Fixed bug in optimize(). Returned Null instead n if
155   get_optimize() == false.
156
157   19.7.2000 Christian
158   Added some access routines in type.[hc]. Solved a recursive definition
159   of type_class struct, entity struct and type union.
160
161   18.7.2000 Goetz
162   Separated entity header into pure functional header and header
163   with data types.
164
165   Goetz
166   ... a bunch small changes not documented
167
168   12.7.2000 Goetz
169   Changed output of oo_prog_example: now uses the internal list
170   of all irgs.  Had to implement some of the access routines for
171   that.  Also fixed a bug in irdump.  Main routines did not use
172   current_ir_graph properly.
173
174   12.7.2000 Goetz
175   Implemented some missing parts in irgopt.
176   Added field irg to entity. Only valid if entity is a method.
177   Had to resove a cyclic de[endency between irgraph.h and entity.h
178   for this.
179   Added fields sub and super to type_class for inheritance.
180   Added field main_irg to irprog.
181
182   7.7.2000 Chris
183   Fixed some bugs in irgopt.c
184   Added some missing 'get_new_node' methods, so the new obstack contains
185   the correct nodes.
186
187   6.7.2000 Chris
188   Renamed ir_vrfy to irn_vrfy and vrfy_graphg to irg_vrfy.
189   Solved some copy'n'paste problems. Deleted most debug-code!
190   Added comments to several files.
191
192   6.7.2000 Goetz
193   Fixed bug in _r_ constructors for all four Div operations.
194   Fixed bug in turn_into_tuple: didn't remember the block.
195   Tested transform_node.
196
197   5.7.2000 Goetz
198   Fixed some testprograms to new semantics of firm.
199   Added testprogram global_var_example.
200   Fixed a bug in irop:  Size of Sel node was (entity *) instead of
201   sel_attr.  Therefor array_heap_example aborted.
202   Also found a missing break in typewalk, case iro_Alloc.
203   Added a construct that unifies all things constructed by the lib
204   and needed to represent a program:  irprog.ch
205   This contains a list of all types as well as a list of all ir graphs.
206   I added calls to initialization and constructors so that this is constructed
207   automatically.  I changed firm.c, type.c, irgraph.c and ev. more.
208   Removed strange block struct and constructor from ircons.c.
209   Moved routines for automatic Phi construction from irgmod to ircons.
210   Sorted functions in ircons to reflect the different interfaces.
211   Renamed dataseg to globals to be conformant with documentation.
212   Added conservation of current_ir_graph to irgopt.c.
213   Corrected bug in Makefiles: wrong path to directory ./inlude.
214
215   4.7.2000 Goetz
216   Commented a whole bunch of stuff, e.g. in ircons.h  (Procedure to construct)
217   We should change the naming of the Block constructor.
218   Removed acces routines to attr. "closed" of Block.
219   Removed second implementation of new_ir_node from ircons and some comments
220   concerned with the now resolved cyclic dependency.
221   Fixed some bugs in irgopt so that the compilation goes through.
222
223   29.6.2000 Chris
224   Changed the irnode attribut 'visit' into 'visited'.
225   Added some access functions, like get/set_irn_visit etc.
226
227   28.6.2000 Chris
228   Renamed some access funtion in irgraph.*.
229   Deleted two global flags (ir_visited and block_visited) from irgraph.*.
230   Added two attributes to the irgraph struct. The visited flags belongs
231   to a ir graph, not to a whole program.
232
233   26.6.2000 Chris
234   A new optimization has been finished. The dead-node-elimination copies
235   the existing ir graph from one opstack to another. While walking the
236   graph, only the reachable nodes will be copied, so the "dead-nodes"
237   (unreachable in the controlflow) are removed.
238
239   19.6.2000 Chris
240   Solved some problems in the 'copy_node' function. The in array was not
241   as easy as it seamed.
242
243   16.6.2000 Chris
244   Wrote a new 'post' funtion, for future use in 'dead-node-elimination'
245   optimization, which is needed in the paramter list of 'irg_walk'.
246
247   14.6.2000 Chris
248   Moved 'optimze_in_place_wrapper' from iropt.* tothe new files irgopt.*.
249   New functions 'local_optimze_graph' and 'dead_node_elimination' are added,
250   but not finished.
251
252   31.5.2000 Chris
253   Removed some files from the archive, after dependencies and usage are
254   checked:
255   - 'ir/common/strerror.c'
256   was nowhere used;
257   - 'ir/ident/xx_ident.h'
258   an empty file, only included by 'ident.c', but never used;
259   - 'ir/tv/label.c' and
260   - 'ir/tv/label.h'
261   contained a numeric counter;
262   The files were included in 'tv.h' and implemented in 'tarval.c'. The two
263   functions 'tarval_label' and 'tarval_forall_labeled' were also never used.
264   In the old fiasco compiler, the label thing is used in the backend.
265   Search for 'babil' to see the usage.
266   Also removed the two attributes 'lab' and 'used' in the tarval struct.
267
268   26.5.2000 Chris
269   Moved the 'new_ir_node' constructor from ircons.* to irnode.* and fixed
270   afterwards some recursive includes, so libfirm works again.
271
272   2+3.2000 Goetz
273   Did a lot of changes, which I never commented until now (4.7.00).
274
275   * Added new result to Start node: Pointer to global data segment.
276   * Extended Semantics of SymConst node to represent information for the
277     linker.
278   * Added arithmeitc nodes (Shrs, Minus ...)
279
280   Rearranged the directory structure and adjusted the makefiles.
281   The directories contain:
282   ir:       everything for the intermediate representation (better: src?)
283     /ir:    the ir itself, and standard optimizations.
284     /tv:    the target value module
285     /tr:    the type and entity representation
286     /adt:   abstract data types
287     /common:  stuff needed by all other dirs
288     /debug: debugging Unterstuetzung
289     /ident:
290   include:  external files needen as includes
291   testprograms: examples to test the lib.
292
293   The makefiles generate files with extension .d that contain the dependencies
294   between the files.
295
296   15.2.2000 Goetz
297   Added access routine to attribute link of irnode in irnode.ch.
298   Added get_negated_pnc to irnode.ch.
299
300   14.2.2000 Goetz
301   Added an iterator in iropt that calls the optimization for all nodes.
302   Copied optimize's code to optimize_in_place and removed deallocations.
303   Made set_irn_n in irnode.c public.
304   Added Bad as possible cfg predecessor in is_cfg_node in irnode.  Bads
305   are allowded as cfgpredecessors to represent dead "incoming" control
306   flow.
307   Added call to optimize_in_place in mature_block. Is this useful?
308
309   10.2.2000 Goetz
310   Changed tests from comparing enums to comparing pointers. This is more
311   efficient (is it?) and reads better.  e.g., instead get_irn_opcode == irm_And
312   now get_irn_op == op_And
313
314   10.2.2000 Goetz
315   Compared equivalent_value to the one in the original fiasco.
316   Added a test in case iro_And.
317   Changed implementation of iro_Div. Added routines turn_into_tuple
318     and set_irn_op() in irgmod/irnode.
319   Changed implementation of irn_Minus (although commented out).
320   Now all features are ported or documented for this function.
321
322   10.2.2000 Goetz
323   Compared computed_value to the one in the original fiasco.
324   Added one further optimization in case iro_Proj.
325   Now all features are ported for this function.
326
327   9.2.2000 Goetz
328   Updated comments in ircons.h.
329
330   9.2.2000 Goetz
331   Changed possible attribute of SymConst from type_class to type.
332   SymConst size could be the size of a union, array, ...
333
334   9.2.2000 Goetz
335   Implemented two dumpers that dump type information and a graph with
336   type information.
337
338   9.2.2000 Goetz
339   Implemented a walker that walks over the type informatin that can
340   be reached from an ir node.
341   Added routine get_kind(firm_thing) in common.h, Added file common.c.
342   Added files typewalk.ch and routines to irdump.
343   Added visited flags and initialization to entity and all types.
344   Implemented some of the missing access routines in type.c, entity.c
345
346   9.2.2000 Goetz
347   Implemented constructor for ShrA.
348   Added type struct.
349   Added routine that iterates the graph and verifies all nodes.
350   Added Phi_in stack to irgraph.  This allows to build several
351     graphs at once with respect to the Phi building algorithm.
352
353   9.2.2000 Goetz
354   Implemented dumper for control flow graphs.  Changed irr_* and dead_*
355   examples to dump cfg.
356
357   8.2.2000 Goetz
358   Implemeted explicit stack for the Phi node generation.  See ircons.c.
359
360   8.2.2000 Goetz
361   added include string.h in xoprintf.c to get rid of warning:
362   implicit declaration of function `bcopy'
363
364   7.2.2000 Goetz
365   Worked on iropt.c:
366   Added more cases to equivalent_node.
367   Portet gigo, identify, identify_remember.
368   The set/pset library can not handle several hash tables.  At least,
369   compiling several procedures causes a segmentation fault during access
370   to the tables (oo_program_example).  Need to work on this.
371   transform_node still needs to be ported.
372   some cases in equivalent_node are still missing.
373
374   To get it running I had to remove the call to optimize in the
375   new_Block constructor. It can only be called when the Block is
376   mature.
377
378   7.2.2000 Goetz
379   Introduced a walker that walks only over blocks.  The asserts
380   might be too strict for general graphs, but so far it works.
381   For the walker I introduced an additional flag in the attribute
382   of Blocks, an a global block_visited variable (in irgraph.h).
383   Furhter I modularized dump_ir_node, implemented dump_ir_graph
384   with the existing walker, and added new routines to output a
385   basic block graph.
386   Changed the examples to call the new dump routine.
387
388   7.2.2000 Goetz
389   Added auxiliary routines to ir_node:
390   skip_Proj, skip_Nop, is_Bad ...
391   Changed access routines to use get_irn_n instead of explicit array
392   accesses. Changed get_irn_n to call skip_Id, so that the access routines
393   never will return Id nodes.
394
395   3.2.2000 Goetz
396   Repaired Phi computation, changed new_r_Phi_in.  Added test program to
397   test irregular controlflow.
398
399   2.2.2000 Goetz
400   Updated optimizations computed_value and equivalent_node to new
401   Syntax of FIRM nodes and to use access routines.
402   Added routine skip_Proj in irnode.
403
404   2.2.2000 Boris Boesler
405   Added files irgwalk.c and irgwalk.h. They include a simple function to
406   traverse an ir graph and execute pre and post functions to current node.
407
408   1.2.2000 Goetz
409   Added arrays with parameters and result types to the type informtion
410   of a procedure.  This is needed for the code generation.  Also added
411   the corresponding access routines.
412   Adapted the testprograms.
413
414   1.2.2000 Goetz
415   Found a bug / complication:  the call order
416     get_value   (makes Phi0, put's it into graph_arr)
417     set_value   (overwrites Phi0 in graph_arr)
418     mature_block (upgrades Phi0, puts it again into graph_arr, overwriting
419                   the proper value.)
420   fails.  Added test wether graph_arr is already set in phi_merge.
421
422   Added tons of comments to explain Phi generation -- the stack hack.
423
424
425   27.1.2000 Goetz
426   irdump now outputs the pnc_number for projs of Cmp nodes.
427   Added routine to access the pnc_string.
428
429   27.1.2000 Goetz
430   Added result "dataseg" to Start node, with all it's consequences.
431   We need this for the compiler lab to translate global variables.
432   Now they can be selected from the data segment, and the start
433   node supplies the pointer to this segment.
434   These changes are guarded by preprocessor variable UEBPRAKT in
435   common.h
436   Changed files: common.h, irgraph.ch, irnode.h
437
438   26.1.2000 Goetz
439   Testprograms:
440   removed array_example, added array-heap_example and
441   array-stack_example and adapted makefile.
442   ir_lib:
443   Entity now also allows type_method as owner. This is to model
444   the stack, Sel nodes that select a variable (array) from the
445   stack need an entity that describes what they select.  This
446   entity gets the type of the enclosing procedure as owner.
447
448   24.1.2000 Chris
449   Added future access routines in `irmode.[ch]' as comments,
450     that all attributes in the ir_mode struct can be user-defined.
451   Added access routines in `irgraph.[ch]', for all attributes.
452
453   22.1.2000 Chris
454   Moved verify routines from `irgraph.[ch]' to own files `irvrfy.[ch]'.
455   Added `irvrfy.[ch]' to MAKEFILE
456   Added "inline" before access routines in `irnode.h', that no warnings
457     will appear furthermore.
458   Added three more access routines in `irmode.[ch]':
459         struct tarval *get_min_of_mode (ir_mode *mode);
460         struct tarval *get_max_of_mode (ir_mode *mode);
461         struct tarval *get_null_of_mode (ir_mode *mode);
462
463   21.1.2000 Goetz
464   Adaption of Alloc, Sel and Entity to new types:
465     Changed array_example to use type instead of type_class.
466     Changed entity to allow all types as owner instead of
467       only type_class.  Added routine "assert_legal_owner_of_ent(type* type)".
468     Changed alloc to allow allocating variables of any type instead of
469       only type_class.
470     Adapted all testprograms to avoid warnings.
471
472   removed dtest ... from Makefile, replaced by test.
473
474   20.1.2000 Goetz
475   Added "run" to makefile, added array_example to makefile of testprograms.
476   Corrected testprogram array
477   Changed assert in irvrfy -- Conv.
478   Started Change log.
479   Started TODO log.