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